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

MenuItem: Add 40px size prop on Button #66596

Merged
merged 5 commits into from
Oct 31, 2024
Merged

MenuItem: Add 40px size prop on Button #66596

merged 5 commits into from
Oct 31, 2024

Conversation

mirka
Copy link
Member

@mirka mirka commented Oct 30, 2024

In preparation for #65751

What?

Adds __next40pxDefaultSize prop to the Button in MenuItem.

Testing Instructions

See the MenuItem stories in Storybook. The heights should now be 40px instead of 36px.

MenuItem with 40px height

(These changes mostly won't be seen in the app until we update the styles for DropdownMenu, which is currently overriding the MenuItem styles 😅)

@mirka mirka added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Oct 30, 2024
@mirka mirka self-assigned this Oct 30, 2024
Copy link

github-actions bot commented Oct 30, 2024

Flaky tests detected in a310d09.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11599831079
📝 Reported issues:

@mirka mirka marked this pull request as ready for review October 30, 2024 14:31
@mirka mirka requested a review from ajitbohra as a code owner October 30, 2024 14:31
@mirka mirka requested a review from a team October 30, 2024 14:31
Copy link

github-actions bot commented Oct 30, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

LGTM, works as expected 👍

Also confirming this is the case wherever I tested:

(These changes mostly won't be seen in the app until we update the styles for DropdownMenu, which is currently overriding the MenuItem styles 😅)

Can you name any instances where MenuItem isn't used in a DropdownMenu so we can test them and ensure they work well?

@mirka
Copy link
Member Author

mirka commented Oct 30, 2024

Can you name any instances where MenuItem isn't used in a DropdownMenu so we can test them and ensure they work well?

I'm finding that the non-DropdownMenu implementations mimic the DropdownMenu internals, so they use NavigableMenu. Searching for instances of NavigableMenu seem to surface the MenuItem instances in question.

For example this media replace dropdown:

Media replace dropdown

Or the Video block Text tracks dropdown:

Video block text tracks dropdown

@mirka mirka enabled auto-merge (squash) October 30, 2024 18:56
@mirka mirka merged commit 37e8b9c into trunk Oct 31, 2024
63 checks passed
@mirka mirka deleted the menu-item-button-40px branch October 31, 2024 05:38
@github-actions github-actions bot added this to the Gutenberg 19.7 milestone Oct 31, 2024
karthick-murugan pushed a commit to karthick-murugan/gutenberg that referenced this pull request Nov 13, 2024
* MenuItem: Add 40px size prop on Button

* Add changelog

* Update snapshots

Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants