Make WordPress Core

Opened 12 months ago

Closed 9 months ago

Last modified 8 months ago

#64200 closed enhancement (fixed)

Block Supports: Add width support to dimensions block supports

Reported by: aaronrobertshaw Owned by: ramonopoly
Priority: normal Milestone: 7.0
Component: Editor Version: 6.9
Severity: normal Keywords: gutenberg-merge has-patch has-unit-tests add-to-field-guide needs-dev-note
Cc: Focuses:

Description

This ticket tracks the backport of PHP files for the following Gutenberg updates:

​https://github.com/WordPress/gutenberg/pull/71905

These updates include the PHP changes to add width block supports.

New dimensions block supports are being added to support new blocks such as the proposed Icon block. See ​https://github.com/WordPress/gutenberg/pull/71227 for further context.

Change History (8)

This ticket was mentioned in ​PR #10470 on ​WordPress/wordpress-develop by ​@aaronrobertshaw.


12 months ago
#1

  • Keywords has-patch has-unit-tests added

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

This PR brings the changes from the following Gutenberg PRs to core:

​https://github.com/WordPress/gutenberg/pull/71905

### Description

Adds a new dimensions.width block support to facilitate the creation of new blocks such as the Icon block.

See: ​https://github.com/WordPress/gutenberg/pull/71227

### Testing

  1. Adopt width block support for a dynamic block e.g. Cover via its block.json file
  2. Add a width value for the chosen test block in your theme.json file
  3. Create a post with the test block type
  4. Confirm the global style is applied to your test block

This ticket was mentioned in ​Slack in #core by audrasjb. ​View the logs.


9 months ago

#3 @audrasjb
9 months ago

As per today's 7.0 bug scrub:
This is a Gutenberg merge ticket and there's a PR, but it's still a draft for now. Pinging @aaronrobertshaw for a status update.

#4 @aaronrobertshaw
9 months ago

Thanks for the ping. There were some further follow ups to the block support in Gutenberg. I'll update this PR as soon as possible and get this backport reviewed.

#5 @ramonopoly
9 months ago

  • Owner set to ramonopoly
  • Resolution → fixed
  • Status new → closed

In 61619:

Block Supports: Add width to dimensions supports

This PR introduces dimensions.width to the list of available block supports.

This block support enables, in the future, the removal of the custom width and height controls in blocks such as Button, Column and many others in favor of customizations via block supports.

Props aaronrobertshaw, andrewserong, ramonopoly, welcher, mamaduka, wildworks, youknowriad, isabel_brison.

Fixes #64200.

#7 @audrasjb
8 months ago

  • Keywords add-to-field-guide needs-dev-note added

This is worth mentioning in the Field Guide.
Also adding needs-dev-note just in case we can mention it in a more general note.

#8 @aaronrobertshaw
8 months ago

There's been a draft dev note up for review for a little while that covers all the dimension supports enhancements including the selectors API change, and the additions of width and height block supports.

​​https://make.wordpress.org/core/?p=121783&preview=1&_ppp=8f7d804279

Note: See TracTickets for help on using tickets.