Opened 7 weeks ago
Closed 4 days ago
#65388 closed enhancement (fixed)
Button: Migrate to width block support
| Reported by: | aaronrobertshaw | Owned by: | ramonopoly |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Editor | Version: | trunk |
| Severity: | normal | Keywords: | gutenberg-merge has-patch has-unit-tests |
| Cc: | Focuses: |
Description
This ticket tracks backporting changes from Gutenberg to WordPress Core.
Gutenberg PR: https://github.com/WordPress/gutenberg/pull/74242
It migrates the Button block from its ad-hoc width attribute to the standard dimensions.width block support, enabling width configuration via global styles and theme.json while preserving backward compatibility for existing buttons.
Change History (12)
This ticket was mentioned in PR #12046 on WordPress/wordpress-develop by @aaronrobertshaw.
7 weeks ago
#1
- Keywords has-patch has-unit-tests added
@ramonopoly commented on PR #12046:
7 weeks ago
#2
I know it's a draft, but I checked update_button_width_declarations and get_styles_for_block against the changes in https://github.com/WordPress/gutenberg/pull/74242 👍🏻
What is the bot doing deleting the theme.json changes? f6e2ddd0ef9a8d307db053082cc4d238f5de18f7 🤔
@aaronrobertshaw commented on PR #12046:
7 weeks ago
#3
What is the bot doing deleting the theme.json changes? https://github.com/WordPress/wordpress-develop/commit/f6e2ddd0ef9a8d307db053082cc4d238f5de18f7 🤔
No idea, to be honest. I'll have to look into it.
This ticket was mentioned in Slack in #core by adrianduffell. View the logs.
9 days ago
adrianduffell commented on PR #12046:
9 days ago
#5
@aaronrobertshaw is this ready for review?
#6
@
9 days ago
With the 7.1 beta approaching, this has a chance to be included if the PR can be reviewed in the coming days.
@isabel_brison commented on PR #12046:
9 days ago
#7
Looks like there's a couple more places using update_button_width_declarations in the corresponding gutenberg class:
- within
foreach ( array_keys( $responsive_media_queries ) as $breakpoint )loop inget_styles_for_block - in the
process_pseudo_selectorsfunction.
would be worth adding those in here too. Other than that, LGTM!
@aaronrobertshaw commented on PR #12046:
8 days ago
#8
Thanks for the nudge, I've been caught up on other things and left this on the backburner too long 😬
would be worth adding those in here too. Other than that, LGTM
Yep, part of things moving on with states and responsive styles after this was spun up. I'll cross check everything, update this accordingly, and flag of review.
@ramonopoly commented on PR #12046:
5 days ago
#9
@aaronrobertshaw this one is still a draft. what's missing? are you able to take care of it?
@aaronrobertshaw commented on PR #12046:
5 days ago
#10
I've crossed checked Gutenberg's call sites for updating the button block's width declarations after the recent state and responsive styling updates. The count and locations match between Gutenberg and Core now so I think this is good to go now.
@ramonopoly commented on PR #12046:
4 days ago
#11
Thanks for taking care of that. I'll give it a run today. Cheers!
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Backport of Gutenberg PR https://github.com/WordPress/gutenberg/pull/74242
Trac ticket: https://core.trac.wordpress.org/ticket/65388
This migrates the Button block to the dimensions.width block support.
This PR backports:
calc()conversion for percentage button widths inWP_Theme_JSON,WP_Theme_JSONtests.Dependency: Requires https://github.com/WordPress/wordpress-develop/pull/10869 (Theme JSON: Define preset CSS vars for blocks based on feature selectors) to be committed first.