Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHS-5872: Implementation light accordion bg and tables #1644

Merged

Conversation

mariannuar
Copy link
Collaborator

@mariannuar mariannuar commented Oct 2, 2024

READY FOR REVIEW

Summary

New implementation to light accordion in Colorful and fix table

Need Review By (Date)

10/09

Urgency

medium

Steps to Test

  1. Go to https://hs-colorful-0nw8b62tacchew4wasu5nelijddayriq.tugboatqa.com/accordions/accordions-light
  2. When open, verify the Light Accordion now has a border around the content and also the background it's white. Check the design
  3. Please, verify the rest of Accordions with a table and confirm that the table it's not wider than the container anymore. Test this in Traditional too.

PR Checklist


@ahughes3 ahughes3 temporarily deployed to Tugboat October 2, 2024 22:19 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat October 2, 2024 22:27 Destroyed
@mariannuar mariannuar self-assigned this Oct 2, 2024
@mariannuar mariannuar requested a review from cienvaras October 2, 2024 22:59
Base automatically changed from 11.2.5-release to develop October 3, 2024 15:39
Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariannuar Colors look good, there's just a change needed on the table overflow fix. Let me know if you have any questions.

Comment on lines 282 to 296

// Fix tables in accordions
.ptype-hs-accordion details {
&[open] {
.revealed-details {
.hb-table-wrap {
overflow-x: hidden;
}

.hb-table-pattern {
width: auto;
}
}
}
}
Copy link
Collaborator

@cienvaras cienvaras Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overflow-x: auto on the table wrapper is intentional, I'm pretty sure it's there to make the table readable in all resolutions. I'll check with Tori if that's something they want to keep, but for now let's remove this change to keep the overflow auto.

Also, width: auto on the table could make small tables to shrink.

There's a bug that needs to be fixed though. Right now some tables have a scrollbar even when it's not needed, because they have a 100% width but the box-sizing is set to content-box. This makes the border not being included in the 100% and causing the table to always overflows by 2px.

To fix it, let change the box-sizing for the table element:

.hb-table-pattern {
  // ...
  box-sizing: border-box;
}

Let's fix this globally in docroot/themes/humsci/humsci_basic/src/scss/components/_pattern.table-pattern.scss.

@cienvaras cienvaras changed the base branch from develop to 11.3.1-release October 7, 2024 15:36
@ahughes3 ahughes3 temporarily deployed to Tugboat October 7, 2024 18:05 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat October 7, 2024 18:26 Destroyed
@mariannuar
Copy link
Collaborator Author

@cienvaras Got it. Thanks for the feedback! Just a heads up that I added that box-sizing to the hb-table-wrap class instead of hb-table-pattern because, there are scenarios that the table can be in a wysiwyg (see example in the first Accordion with a course table. There are two kind of tables there. This is ready for review again!

@mariannuar mariannuar requested a review from cienvaras October 7, 2024 18:33
Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariannuar Looks great, thanks!

@ahughes3 Ready for your review.

@cienvaras cienvaras requested a review from ahughes3 October 8, 2024 00:06
@cienvaras cienvaras assigned ahughes3 and unassigned mariannuar Oct 8, 2024
@ahughes3 ahughes3 assigned joegl and unassigned ahughes3 Oct 8, 2024
@ahughes3 ahughes3 requested a review from joegl October 8, 2024 13:21
@joegl joegl merged commit d11b0c4 into 11.3.1-release Oct 9, 2024
17 checks passed
@joegl joegl deleted the shs-5872--implementation-light-accordion-bg-and-tables branch October 9, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants