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

ToolbarButton: Set size to "compact" #67440

Merged
merged 4 commits into from
Dec 2, 2024
Merged

ToolbarButton: Set size to "compact" #67440

merged 4 commits into from
Dec 2, 2024

Conversation

mirka
Copy link
Member

@mirka mirka commented Nov 29, 2024

In preparation for #65751

What?

Add a size="compact" to the internal Button used in ToolbarButton.

Why?

The size styles are largely overridden by ToolbarButton, but this size variant is closest to what is intended. This PR is mostly just to prevent breakage when the Button size default changes to 40px. There should be no visual changes.

Testing Instructions

See the Storybook stories for Toolbar. There should be no visual changes, including changes in focus indicators or click target sizes.

There are two internal implementation "variants" in the ToolbarButton — flip this logic to check both:

@mirka mirka added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Nov 29, 2024
@mirka mirka self-assigned this Nov 29, 2024
@mirka mirka marked this pull request as ready for review November 29, 2024 20:59
@mirka mirka requested a review from ajitbohra as a code owner November 29, 2024 20:59
Copy link

github-actions bot commented Nov 29, 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.

@mirka mirka requested a review from a team November 29, 2024 20:59
@mirka mirka requested a review from ellatrix as a code owner November 29, 2024 21:02
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.

No visual changes for either variants 👍

Screenshot 2024-12-02 at 16 31 52

@mirka mirka enabled auto-merge (squash) December 2, 2024 17:34
@mirka mirka merged commit fe8e832 into trunk Dec 2, 2024
63 checks passed
@mirka mirka deleted the toolbar-button-size branch December 2, 2024 18:09
@github-actions github-actions bot added this to the Gutenberg 19.9 milestone Dec 2, 2024
@richtabor
Copy link
Member

Any chance this PR resulted in this regression? When selecting a template part from editing a page.

CleanShot 2024-12-02 at 14 38 59

@mirka
Copy link
Member Author

mirka commented Dec 2, 2024

@richtabor Thanks for flagging! Addressed in #67502

im3dabasia pushed a commit to im3dabasia/gutenberg that referenced this pull request Dec 4, 2024
* ToolbarButton: Set size to "compact"

* Add changelog

* Update snapshots

Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
michalczaplinski pushed a commit that referenced this pull request Dec 5, 2024
* ToolbarButton: Set size to "compact"

* 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] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants