Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#57582 closed enhancement (fixed)

Introduce dimensions.minHeight block support

Reported by: andrewserong's profile andrewserong Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch has-unit-tests gutenberg-merge commit
Focuses: Cc:


In the Gutenberg plugin, a minimum height block support feature was added, with support for both Group and Post Content blocks. It would be good to backport this feature for the WP 6.2 release. While the feature is spread across JS and PHP code, it should be possible to land most of the PHP implementation in advance of the JS packages update for core.

The original feature landed in Gutenberg across the following PRs:

Change History (8)

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

10 months ago

  • Keywords has-patch has-unit-tests added

This PR backports the minimum height block support feature's PHP changes from Gutenberg. Those changes were originally merged in the following PRs:

The opting-in of the block support for particular blocks, and UI support will land separately as part of the main JS package update for 6.2 — hopefully, this PHP change should be able to safely land in isolation.

Trac ticket:

#2 @hellofromTonya
10 months ago

  • Keywords gutenberg-merge added
  • Milestone changed from Awaiting Review to 6.2
  • Summary changed from Backport min-height block support feature for WordPress 6.2 to Introduce dimensions.minHeight block support
  • Version trunk deleted

@hellofromTonya commented on PR #3940:

10 months ago

Status: Currently reviewing and testing for commit consideration.

#4 @hellofromTonya
10 months ago

  • Owner set to hellofromTonya
  • Status changed from new to reviewing

Self-assigning for review and commit.

#5 @hellofromTonya
10 months ago

  • Keywords commit added

PR 3940:

  • Confirmed the PHP changes from the GB PRs are here ✅
  • Confirmed there's no BC issue for the removal of experimentalDimensions setting ✅
  • Reviewed for coding standards ✅
  • Tests are okay ✅
  • It's been tested ✅

Marking for commit.

#6 @hellofromTonya
10 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 55175:

Editor: Introduce minimum height dimensions block support.

This changeset adds the new dimension feature's PHP code for supporting minimum height in the block editor inspector and in global styles. Minimum height is quite useful for defining the minimum vertical dimensions of a block, while allowing it to expand beyond that size.

In this changeset:

  • Adds support in theme.json.
  • Adds support in the style engine.
  • Adds support in wp_apply_dimensions_support().
  • Renames the setting from '__experimentalDimensions' to dimensions in wp_register_dimensions_support().
  • Adds PHPUnit tests.

Is renaming '__experimentalDimensions' a backwards-compatibility (BC) break?

Though the setting has been in the code since 5.9.0, it was never wired to anything, ie it did not expose any controls or styles. Notice in wp_register_dimensions_support() and wp_apply_dimensions_support() prior to this changeset, there are inline comments as placeholders for height and width support, but no code.

If a developer opted in to use it, it had no effect.

A search in's plugin and themes repo showed no instances of this experimental setting.

Given there was no functionality attached to it (until this changeset), no change in behavior or effect from removing it, and no usage found in the plugins and themes repository, it does appear to be a BC break.


Follow-up to [53076], [52069].

Props andrewserong, aaronrobertshaw , costdev, hellofromTonya, isabel_brison, joen, paaljoachim, mukesh27, ntsekouras, oandregal, ramonopoly.
Fixes #57582.

@andrewserong commented on PR #3940:

10 months ago

Wonderful, thank you for landing this one, and for the extra discussion, I learn more with each of these PRs 🙂

Note: See TracTickets for help on using tickets.