Skip to content

BlockToolbar: Disabling group block variations is not applied #41192

@t-hamano

Description

@t-hamano

Description

Related: #39710

In #39710, group block variation buttons are displayed on the block toolbar when multiple blocks are selected.
However, they are still retained even when the variation is disabled by unregisterBlockVariation.

Step-by-step reproduction instructions

  • Execute the following code from the browser console to disable the group block variation:
wp.blocks.unregisterBlockVariation('core/group', 'group-row');
wp.blocks.unregisterBlockVariation('core/group', 'group-stack');
  • Add multiple blocks and select them.
  • Confirm that the group block variation remains on the block toolbar.

Screenshots, screen recording, code snippet

6eec8b9c010c185c1dfac97ea66c3eb0.mp4

Environment info

  • WordPress Version: 6.0-RC3
  • Gutenberg Version: 13.2.2
  • Theme: Twenty Twenty Two

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

Metadata

Metadata

Assignees

Labels

[Block] GroupAffects the Group Block (and row, stack and grid variants)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions