-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Remove a popover menu min-width. #33995
Conversation
Size Change: -1.67 kB (0%) Total Size: 1.03 MB
ℹ️ View Unchanged
|
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.
LGTM! Thank you :)
Thanks for the review. I gave it a good extra spin to see that popovers were behaving: I found one that was misbehaving: So I pushed a small tweak: @draganescu I see your name in the context of that code, can you give c69e72b a quick sanity check? Thank you. After that, I'd love to land this as it unblocks a vertical headings PR. |
Going to land this one, as the min-width is arbitrary, and the component becomes more flexible without it. |
Description
This PR removes a min-width from the dropdown component. The min-width is meant to ensure that items inside don't collapse or become as small as possible by leveraging word wrapping, which is what happens if we only remove the min-width:
For that reason, I've also added a whitespace rule that ensures that menu items never wrap, as they arguably shouldn't ever do:
It would have been easy to add just the whitespace rule to the particular "open in new window" element. However in a desire to keep the behavior of the child item the responsibility of the parent, this PR puts the CSS directly in the dropdown component.
What do you think?
The PR itself will also benefit #32926.
How has this been tested?
Please test every dropdown that opens a popover menu, and verify none of them look squished.
Checklist:
*.native.js
files for terms that need renaming or removal).