-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Prevent scrollbar overflow in footer disclosures #1293
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ken! Made some observation that are not due to your PR I believe. Let me know if you would like me to create a new issue. 🙏
Otherwise, it looks good!
Tested:
- Different settings range,
- Different Color scheme
- Safari, Chrome
- No JS experience
No JS (Issue opened #1300)
- The tertiary button style seems they have lost their styling (no border visible), even if border is set to 1 and 100% opacity.
Mobile (Issue opened #1301)
- Noticed on small screen the space between the select is very narrow. They could wrap earlier. Tested on my Android Samsung A70
- Seems to happen in the editor with shorter select option.
- Related to the above, the dropdown is off screen
Thanks @melissaperreault I agree, definitely things to address. But maybe let's go ahead and make an issue to clean up all that stuff so it doesn't hold up this update. |
The same happens to the cart note I believe but since it's going to need a different approach it most likely should be a different issue/PR. |
Hmm yeah I remember that, guess we never logged that in the same issue. But I just did a quick audit and it's also going to be an issue with the textarea on blogs and contact. I was gonna throw that in, but I'm not sure what approach to use for it, given an overflow: hidden would also hide the focus border animation 🤔 Let's plan to handle separately for now. cc @ludoboludo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me when testing and voice over was clear when navigating it.
Just the one thing is maybe a bit more spacing to fully display the focus ring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍 Just noticed a few things when playing with the global settings
overflow-y: auto; | ||
font-size: 1.4rem; | ||
padding-bottom: 0.5rem; | ||
padding-top: 0.5rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also an issue on cart note:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm considering the text area issue separately because it's more complex.
The same happens to the cart note I believe but since it's going to need a different approach it most likely should be a different issue/PR. It's also kind of an edge case since it only comes up if you write a lot of info in the cart note: screenshot
Hmm yeah I remember that, guess we never logged that in the same issue. But I just did a quick audit and it's also going to be an issue with the textarea on blogs and contact. I was gonna throw that in, but I'm not sure what approach to use for it, given an overflow: hidden would also hide the focus border animation 🤔 Let's plan to handle separately for now. cc ludoboludo
min-width: 12rem; | ||
width: max-content; | ||
} | ||
|
||
.disclosure__item { | ||
position: relative; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we add corner radius, the scrollbar gets a bit cut off: https://screenshot.click/10-34-vbl98-jvwxu.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing we can do about that with this approach (the solution specifically aims to mask the scrollbar). The only other possible solution (that I see anyway) to is just give the scrollable list enough margin so it stays away from the corners (which is kinda ugly).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am aligned that we can live with the tradeoff of cutting it off. Merchant would have other ways to go around this like reducing the border thickness and roundness if they have long list of currency/country. Very edge case!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🚢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🎉 🚢
* Prevent scrollbar overflow in footer disclosures * Add scroll padding
Why are these changes introduced?
Fixes #997
What approach did you take?
When the footer locale popups have corner radius, the scroll bar can overflow outside the popup. This is because the disclosure list is using
overflow-y: auto
. To keep the list scrollable but contain the content within the border radius I've wrapped the list in a new<div class="disclosure__list-wrapper">
element. This requires some minor changes to both the css and the js.disclosure__list-wrapper
should now be the element concerned with the global setting styles and the visibility/positioning of the dialog on the page.New pattern:
Other considerations
I believe the changes to markup are safe and didn't notice any changes in the way VO announces the modified pattern, but flagging here in case this does affect expectations from an a11y perspective in some way.
Tip: Disabling whitespace during review will improve readability of these diffs.
Demo links
Checklist