Make WordPress Core

Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#60130 closed enhancement (fixed)

Add layout classes to legacy Group block inner container.

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

Description

With classic themes, Group block markup has an inner wrapper around its children. This means that if layout support is enabled via appearance-tools as proposed in #60118, block spacing won't work correctly because the layout class is still applied to the outer wrapper.

This has been fixed in Gutenberg with https://github.com/WordPress/gutenberg/pull/56130. This ticket tracks syncing that PR to core.

Change History (4)

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


5 months ago
#1

  • Keywords has-patch has-unit-tests added

Trac ticket: https://core.trac.wordpress.org/ticket/60130

Syncs the changes from https://github.com/WordPress/gutenberg/pull/56130 to core. Editor-side changes will be added with the npm package updates as usual; this PR will work without them but classname changes will only be visible in the front end.

To test:

  1. Activate a classic theme;
  2. In the editor, add a Group block with some children;
  3. Save and publish;
  4. Check that classnames is-layout-constrained wp-block-group-is-layout-constrained are added to the inner container on the front end.
  5. Run the layout unit tests.

@isabel_brison commented on PR #5812:


5 months ago
#2

Thanks for the feedback folks! All points have been addressed now.

#3 @isabel_brison
5 months ago

  • Owner set to isabel_brison
  • Resolution set to fixed
  • Status changed from new to closed

In 57246:

Editor: add layout classes to legacy Group inner container.

Moves generated layout classes into the Group block inner container in classic themes, so that block gap support can work correctly.

Props flixos90, mukesh27.
Fixes #60130.

@isabel_brison commented on PR #5812:


5 months ago
#4

Committed in r57246.

Note: See TracTickets for help on using tickets.