Make WordPress Core

Opened 4 months ago

Last modified 7 weeks ago

#61728 new defect (bug)

Stabilize experimental Typography block support keys

Reported by: andrewserong's profile andrewserong Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: trunk
Component: Editor Keywords: has-patch
Focuses: Cc:

Description (last modified by andrewserong)

For WordPress 6.8, stabilize the experimental Typography block support keys. The current experimental features and mapping to stable keys are:

  • __experimentalFontFamilyfontFamily
  • __experimentalTextDecorationtextDecoration
  • __experimentalFontStylefontStyle
  • __experimentalFontWeightfontWeight
  • __experimentalLetterSpacingletterSpacing
  • __experimentalTextTransformtextTransform
  • __experimentalWritingModewritingMode

This work is being tracked in the Gutenberg repo in: https://github.com/WordPress/gutenberg/issues/63001

It will require syncing code from Gutenberg, but also a slightly different implementation in core so that we don't need to use filters to apply the transformation from experimental to stable properties.

The overall goal is to stabilize the experimental typography features in block supports, as they have been in use for multiple releases and are ready for wider documentation, and are unlikely to change.

Change History (3)

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


4 months ago
#1

  • Keywords has-patch added

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

🚧 🚧 🚧 WIP: This is currently a work in progress and is not yet ready for review 🚧 🚧 🚧

This PR syncs some of the changes from https://github.com/WordPress/gutenberg/pull/63401, however uses a slightly different approach for applying the transformations so that we do not depend on filters.

More details TBC as this PR is still a work in progress.

@andrewserong commented on PR #7069:


4 months ago
#2

Based on discussion over in https://github.com/WordPress/gutenberg/pull/63401#issuecomment-2249588880, I've updated this to move the stabilization to _after_ the filter is run. This ensures that any opt-outs, etc, performed by plugins are appropriately stabilized before the props are set.

I've also moved the logic into a private method so that set_props is easier to read.

#3 @andrewserong
7 weeks ago

  • Description modified (diff)
  • Milestone changed from 6.7 to Future Release

Just updating the milestone and description for this one as this change has been punted to WP 6.8.

Note: See TracTickets for help on using tickets.