-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Closed
Copy link
Labels
[Feature] Block VariationsBlock variations, including introducing new variations and variations as a featureBlock variations, including introducing new variations and variations as a feature[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
As reported in https://core.trac.wordpress.org/ticket/60856, the core/group block does not register any of its variations on the server, but instead adds them at runtime in the client. This means that any variations registered on the server via filters or other means get overwritten when the core/group block is initialized. I suspect this behavior is consistent with all blocks that are adding variations, which likely includes this whole list.
I would expect that any variations supplied by the server would be added to the variations added to the block in JS.
Step-by-step reproduction instructions
- Add a block variation to the group block using the
get_block_type_variationsfilter in PHP. - Confirm that the variation is being supplied by the server by inspecting the output of
get_block_editor_server_block_settings(), which is used to bootstrap block types from the server. - Load the editor and inspect the block definition in the console:
wp.blocks.getBlockTypes().filter( (block) => block.name === 'core/group' ) - See that the variation supplied by the server is no longer present.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Block VariationsBlock variations, including introducing new variations and variations as a featureBlock variations, including introducing new variations and variations as a feature[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.