Alignment attribute is unpredictable with two blocks that support it #8336
Description
Description
There're many blocks that support align
attribute with options: none
, wide
, full
to choose from. When there's more than one block within the Group
that support it, they start to behave unpredictable.
Steps to reproduce
- Go to Editor and edit template, e.g.
Products by Category
- Add Group Block
- Within Group block add two blocks that support
alignment
options, e.g.: Products, Featured Products. - Start changing the
align
options, save and check the results in frontend
Expected: align
always follow what's in Editor
Actual: Changing the align
attribute in one block, affects the other. Sometimes the change is not reflected in Editor
Video/screenshots
Video with Products and Featured Product - featured Product disappears every second update. Also Products alignment setting is not respected on the frontend:
https://user-images.githubusercontent.com/20098064/215533429-abea3897-65aa-4caf-82f2-3c9c4f0e4772.mov
Video with Breadcrumbs block (in development) with Products block - both support align
option. Reproducible in add/convert-classic-template
branch:
https://user-images.githubusercontent.com/20098064/215531378-7c2a342a-376f-4196-a8f5-c1c226e39970.mov
Environment
WordPress: 6.1.1
Gutenberg: 15.0.1
WooCommerce Blocks: 9.5.0-dev