You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates the collection of custom block selectors for generating the preset styles to use the Selectors API.
Why?
Now the Selectors API has been stabilised, it may be used in place of the old supports.__experimentalSelector properties.
How?
If a block has a custom selector set via either the Selectors API or the old __experimentalSelector supports property, that selector is used.
Testing Instructions
Create a post using the example block content below
Ensure the preset styles selectors match trunk
Tweak a block.json file to customise or add a custom selector and refresh the editor or frontend and check that new selector is used for the preset styles.
Flaky tests detected in f0b8497.
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.
Tweak a block.json file to customise or add a custom selector and refresh the editor or frontend and check that new selector is used for the preset styles.
I'm able to make this work if I update a block that uses the existing __experimentalSelector to use the new API instead. For example, I used the button block.
However, if I add selectors.root to a block that doesn't use the legacy API I can't find the selector. I used that using the group and files blocks. I'll try again tomorrow, in case it's related to my setup or that I'm doing something wrong. Sharing in case you could double-check that scenario.
However, if I add selectors.root to a block that doesn't use the legacy API I can't find the selector. I used that using the group and files blocks. I'll try again tomorrow, in case it's related to my setup or that I'm doing something wrong. Sharing in case you could double-check that scenario.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Type] BugAn existing feature does not function as intended
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related:
What?
Why?
Now the Selectors API has been stabilised, it may be used in place of the old
supports.__experimentalSelectorproperties.How?
If a block has a custom selector set via either the Selectors API or the old
__experimentalSelectorsupports property, that selector is used.Testing Instructions
Example block markup with block level presets
Example block.json tweak for Group block