theme.json schema: fix pseudo-class definition for button block#76272
theme.json schema: fix pseudo-class definition for button block#76272
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 29c33d3. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22789959639
|
| "stylesBlocksPseudoSelectorsProperties": { | ||
| "type": "object", | ||
| "properties": { | ||
| ":active": { |
There was a problem hiding this comment.
Thanks for changing the order too!
MaggieCabrera
left a comment
There was a problem hiding this comment.
Great catch, this looks good to me and tests well
Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: 6557c19 |
This updates the pinned hash from the `gutenberg` from `f4d8a5803aa2fbe26e7d9af4d17e80a622b7bab8` to `7b7fa2bc97a8029a302bd6511cf0d206b5953172`. The following changes are included: - Sort registry files by handle/ID. (WordPress/gutenberg#75755) - Obey undoIgnore flag in editEntityRecord (WordPress/gutenberg#76206) - RTC: Fix `post-editor-template-mode` E2E test (WordPress/gutenberg#76209) - Publish built Gutenberg plugin to the GitHub Container Registry (WordPress/gutenberg#75844) (WordPress/gutenberg#76273) - Connectors: Improve placeholder text and make it translatable (WordPress/gutenberg#75996) - Block context menu: context menu not closing for disconnecting unsynced pattern menu items (WordPress/gutenberg#75405) - Connectors: Improve responsive layout for small viewports (WordPress/gutenberg#76231) - theme.json schema: fix pseudo-class definition for button block (WordPress/gutenberg#76272) - Navigation block: fix submenu chevron toggle on touch devices (WordPress/gutenberg#76197) See #64595, #64393. git-svn-id: https://develop.svn.wordpress.org/trunk@61868 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `f4d8a5803aa2fbe26e7d9af4d17e80a622b7bab8` to `7b7fa2bc97a8029a302bd6511cf0d206b5953172`. The following changes are included: - Sort registry files by handle/ID. (WordPress/gutenberg#75755) - Obey undoIgnore flag in editEntityRecord (WordPress/gutenberg#76206) - RTC: Fix `post-editor-template-mode` E2E test (WordPress/gutenberg#76209) - Publish built Gutenberg plugin to the GitHub Container Registry (WordPress/gutenberg#75844) (WordPress/gutenberg#76273) - Connectors: Improve placeholder text and make it translatable (WordPress/gutenberg#75996) - Block context menu: context menu not closing for disconnecting unsynced pattern menu items (WordPress/gutenberg#75405) - Connectors: Improve responsive layout for small viewports (WordPress/gutenberg#76231) - theme.json schema: fix pseudo-class definition for button block (WordPress/gutenberg#76272) - Navigation block: fix submenu chevron toggle on touch devices (WordPress/gutenberg#76197) See #64595, #64393. Built from https://develop.svn.wordpress.org/trunk@61868 git-svn-id: http://core.svn.wordpress.org/trunk@61155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
What?
#71418 added pseudo-class support for the button block, but its schema is not correct. Even though the four pseudo-classes are available directly under
styles.core/button, the code editor will warn us about them as invalid properties.How?
In this PR, the diff is a little hard to see, but the definitions that were actually changed are the following three places.
stylesBlocksPropertiesComplete.core/buttonstylesVariationBlocksPropertiesComplete.core/buttonstylesBlocksPseudoSelectorsPropertyNamesTesting Instructions
Update
test/emptytheme/theme.jsonwith the following code:{ "$schema": "../../schemas/json/theme.json", "version": 3, "styles": { "blocks": { "core/button": { ":active": {}, ":focus": {}, ":focus-visible": {}, ":hover": {}, ":link": {}, "color": {}, "invalid": {}, "variations": { "my-variation": { ":active": {}, ":focus": {}, ":focus-visible": {}, ":hover": {}, ":link": {}, "color": {}, "invalid": {} } } }, "core/paragraph": { ":active": {}, ":focus": {}, ":focus-visible": {}, ":hover": {}, ":link": {}, "color": {}, "variations": { "my-variation": { ":active": {}, ":focus": {}, ":focus-visible": {}, ":hover": {}, ":link": {}, "color": {} } } } } } }This PR should fix unintended warnings for the following defginitions:
styles.blocks.core/button.:activestyles.blocks.core/button.:focusstyles.blocks.core/button.:focus-visiblestyles.blocks.core/button.:hoverstyles.blocks.core/button.variations.{vairation-name}.:activestyles.blocks.core/button.variations.{vairation-name}.:focusstyles.blocks.core/button.variations.{vairation-name}.:focus-visiblestyles.blocks.core/button.variations.{vairation-name}.:hoverScreenshots or screencast