#60365 closed enhancement (fixed)
Introduce dimensions.aspectRatio block support
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.5 | Priority: | normal |
| Severity: | normal | Version: | 6.5 |
| Component: | Editor | Keywords: | gutenberg-merge has-patch has-unit-tests add-to-field-guide |
| Focuses: | Cc: |
Description
In the Gutenberg plugin, an aspect ratio block support feature was added, with support for both Group and Cover blocks. It would be good to backport this feature for the WP 6.5 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 in the following PR: https://github.com/WordPress/gutenberg/pull/56897
Change History (6)
This ticket was mentioned in PR #5963 on WordPress/wordpress-develop by @andrewserong.
2 years ago
#1
- Keywords has-patch has-unit-tests added
#2
@
2 years ago
- Owner set to isabel_brison
- Resolution set to fixed
- Status changed from new to closed
In 57491:
@isabel_brison commented on PR #5963:
2 years ago
#3
Committed in r57491.
@andrewserong commented on PR #5963:
2 years ago
#4
Wonderful, thank you @tellthemachines! 🙇
Backport the aspect ratio block support feature from the Gutenberg plugin, that originally landed in: https://github.com/WordPress/gutenberg/pull/56897
Note this PR backports the PHP parts of the block support. This can be safely done prior to the JS packages landing for core, as the UI for the feature will not be exposed until the JS packages are updated.
Testing this PR manually in
wordpress-developis possible via the following steps:block.jsonfile to includedimensions: { aspectRatio: true }under thesupportskey. I.e. the dimensions support will now look like:"dimensions": { "aspectRatio": true, "minHeight": true },https://github.com/WordPress/wordpress-develop/blob/e108d27762f375cab724789c2db1445c4bcd4477/src/wp-includes/blocks.php#L346-L348
min-height:unsetrule:Trac ticket: https://core.trac.wordpress.org/ticket/60365