Make WordPress Core

Opened 3 weeks ago

Last modified 2 weeks ago

#65101 new defect (bug)

Ensure layout classnames are applied to the inner blocks wrapper and not to its siblings

Reported by: isabel_brison's profile isabel_brison Owned by:
Milestone: 7.1 Priority: normal
Severity: normal Version:
Component: Editor Keywords: gutenberg-merge has-patch has-unit-tests
Focuses: Cc:

Description

The fix for layout classname application in https://github.com/WordPress/gutenberg/pull/77408 needs syncing to core.

Change History (4)

This ticket was mentioned in PR #11598 on WordPress/wordpress-develop by @isabel_brison.


3 weeks ago
#1

  • Keywords has-patch has-unit-tests added

#2 @darshitrajyaguru97
3 weeks ago

Patch Testing

I tested the provided patch locally and verified the behavior.

Environment

  • WordPress: 7.0 RC2
  • PHP: 8.3
  • Server: Nginx
  • Browser: Chrome
  • OS: Windows 11

Testing Steps

  1. Applied the patch from this ticket.
  2. Created Group blocks with layout settings (flex, constrained, etc.).
  3. Added nested blocks and sibling blocks.
  4. Inspected DOM output.

Results

  • Layout classnames are now correctly applied only to the inner blocks wrapper.
  • No class leakage to sibling elements observed.
  • Nested block structures behave as expected.

Unit Tests

  • All existing and added tests pass successfully.

Notes

Patch looks good to me

#3 @tusharaddweb
3 weeks ago

Tested the patch and confirmed that layout classnames are now correctly applied to the inner blocks wrapper instead of sibling elements.

This improves layout consistency and fixes styling issues with block themes using theme.json layout settings.

No regressions observed in my testing.

#4 @gaurangsondagar
2 weeks ago

Patch Testing Report

Tested the patch: https://github.com/WordPress/gutenberg/pull/77408

Environment:

  • WordPress: 7.0-RC2-62242
  • PHP: 8.2.29
  • Server: Apache
  • Database: MySQL
  • Browser: Chrome 146.0.7680.164
  • OS: Ubuntu 22.04.5 LTS

I tested the things as follow:

  • Implemented the patch provided in this ticket
  • Set up Group blocks using different layout configurations
  • Included both nested and sibling blocks in the structure and validate the results

Results:
The applied patch is working as expected.

Note: See TracTickets for help on using tickets.