Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#53472 closed defect (bug) (fixed)

Regression: "custom-units" handled as bool, should be array.

Reported by: kraftner's profile kraftner Owned by: desrosj's profile desrosj
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.8
Component: Editor Keywords: has-patch commit
Focuses: Cc:


In the current WP 5.8 Beta 2 you can't customize Custom Units.

This seems to have been introduced with changeset:50959 since it turns custom-units into a bool no matter what:

$editor_settings['enableCustomUnits'] = count( $editor_settings['__experimentalFeatures']['spacing']['units'] ) > 0;

Change History (7)

This ticket was mentioned in PR #1403 on WordPress/wordpress-develop by kraftner.

3 years ago

  • Keywords has-patch added

#2 @kraftner
3 years ago

I made PR that seems to fix it, but I have to admit I do not fully understand the complexities of the editor settings in a theme.json world yet, so better someone double-checks this. ;)

#3 @desrosj
3 years ago

  • Milestone changed from Awaiting Review to 5.8

Thanks for this ticket, @kraftner! Moving to the milestone to investigate.

This ticket was mentioned in Slack in #core-editor by desrosj. View the logs.

3 years ago

#5 @desrosj
3 years ago

  • Keywords commit added
  • Owner set to desrosj
  • Status changed from new to assigned

Went through this with a few folks in the #core-editor room in Slack and it looks good. Thanks again!

#6 @desrosj
3 years ago

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

In 51203:

Editor: Allow custom-units to be an array.

The changes in [50959] introduced an issue where custom_units was always being coerced into a boolean value. This should support array values.

Props kraftner, youknowriad, nosolosw, jorgefilipecosta.
Fixes #53472.

Note: See TracTickets for help on using tickets.