Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Group Block ignores nested blocks' width settings #68902

Open pauljacobson opened 1 year ago

pauljacobson commented 1 year ago

Quick summary

The Group Block seems to ignore the alignment settings for blocks added to the Group Block, despite following this process that we recommend in our guide to the Group Block:

When you add existing blocks to a Group block the wide and full-width alignment options move to the Group block. The individual blocks (like an Image block for example) will no longer have the wide or full-width options in the block’s toolbar.

Set the alignment of an individual block to full or wide width before you add them to the Group block. If you have already added blocks to a Group block, you can un-group them, then set their width, then re-group them.

Steps to reproduce

  1. Add a Group Block set to full-width
  2. Add a Cover Block with a combination of a YouTube Block, Paragraph Blocks, Heading Block, and Spacer Blocks to the Cover Block
  3. The Cover Block is set to wide-width
  4. When viewed, the Cover Block expands to fill the full width of the Group Block
  5. Following the suggestions in the guide to the Group Block don't seem to result in the width setting for the Cover Block being respected.

What you expected to happen

Nested blocks within the Group Block should have the width that is selected for them, independently of the Group Block (provided the nested blocks don't purport to be wider than the Group Block).

What actually happened

The Cover Block is stretched to full-width. Here is an example with the Hestia theme (our customer's preferred theme):

Capture_2022-10-11 at 15 06 46

We have the same situation with Blank Canvas:

Capture_2022-10-11 at 15 08 02

You can see that the suggested workaround in our guide doesn't seem to work, here:

https://user-images.githubusercontent.com/2912202/195088131-ee07eeb0-4b8d-4ed9-8369-0ecb0a52ebcc.mp4

Context

Customer report in 5615245-zen and tested here: https://wordpress.com/page/atomicpljcbsn.blog/2781 (this is a test site link that isn't publicly accessible).

Platform (Simple, Atomic, or both?)

Atomic

Theme-specific issue?

No response

Browser, operating system and other notes

Doesn't seem to be affected by operating system or browser. I deactivated plugins on my test site with the exception of pre-installed plugins.

Reproducibility

Consistent

Severity

Most (> 50%)

Available workarounds?

Yes, easy to implement

Workaround details

A Layout Grid Block added as an intermediate container within the Group Block, and resized to suit the customer's preferred content width should constrain the width of the inner blocks.

github-actions[bot] commented 1 year ago

Support References

This comment is automatically generated. Please do not edit it.

kavyagokul commented 1 year ago

📌 SCRUBBING : RESULT

📌 ACTIONS

Reported core bug https://github.com/WordPress/gutenberg/issues/44922

youbrokesomething commented 1 year ago

This was closed on the Gutenberg side as not reproducible. @pauljacobson Can this still be replicated?