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

DropdownMenuV2: do not collapse suffix width #57238

Merged
merged 2 commits into from Dec 20, 2023

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Dec 19, 2023

What?

Splitting from #55625, this PR tweaks the styles of suffix in the new experimental DropdownMenu item styles, so that the suffix doesn't collapse its width.

Why?

Better look

How?

  • By tweaking the flex-grow and flex-basis CSS properties
  • By using the fit-content keyword for both the width and the flex-basis CSS properties

Testing Instructions

Add more content to a menu item suffix, observe how the dropdown menu item deals with resizing its suffix and contents.

Screenshots or screencast

Before (trunk) After (this PR)
Screenshot 2023-12-20 at 00 33 18 Screenshot 2023-12-20 at 00 33 00

@ciampo ciampo self-assigned this Dec 19, 2023
@ciampo ciampo added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Dec 19, 2023
@ciampo ciampo added this to In progress (owned) ⏳ in WordPress Components via automation Dec 19, 2023
@ciampo ciampo requested review from oandregal, ntsekouras and a team December 19, 2023 23:40
Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@ciampo ciampo merged commit cf2950e into trunk Dec 20, 2023
52 checks passed
WordPress Components automation moved this from In progress (owned) ⏳ to Done 🎉 Dec 20, 2023
@ciampo ciampo deleted the fix/dropdown-menu-v2-ariakit-menu-item-suffix-layout branch December 20, 2023 10:39
@github-actions github-actions bot added this to the Gutenberg 17.4 milestone Dec 20, 2023
@bph bph added [Type] Bug An existing feature does not function as intended and removed [Type] Enhancement A suggestion for improvement. labels Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants