Skip to content

ToolbarButton: Set size to "compact"#67440

Merged
mirka merged 4 commits into
trunkfrom
toolbar-button-size
Dec 2, 2024
Merged

ToolbarButton: Set size to "compact"#67440
mirka merged 4 commits into
trunkfrom
toolbar-button-size

Conversation

@mirka

@mirka mirka commented Nov 29, 2024

Copy link
Copy Markdown
Member

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
@github-actions

github-actions Bot commented Nov 29, 2024

Copy link
Copy Markdown

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 <0mirka00@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>

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

@tyxla tyxla left a comment

Copy link
Copy Markdown
Member

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
@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
Copy Markdown
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

mirka commented Dec 2, 2024

Copy link
Copy Markdown
Member Author

@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 <0mirka00@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
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 <0mirka00@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
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