Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#62189 closed defect (bug) (fixed)

Fix writing-mode typography block support for dynamic blocks

Reported by: andrewserong Owned by: andrewserong
Priority: normal Milestone: 6.7
Component: Editor Version: 6.7
Severity: normal Keywords: gutenberg-merge has-patch has-unit-tests
Cc: Focuses:

Description

This is a follow-up to #59306.

When the writing-mode typography block support was merged from Gutenberg back in #59306, the update to the style engine code wasn't included. This meant that the style output for dynamic blocks didn't work, however as dynamic blocks did not yet support the writing-mode feature, the bug wasn't visible.

In WP 6.7, the site title and site tagline dynamic blocks will support writing-mode, so the bug where these blocks do not output writing-mode styles is now present.

For further context, see the logged issue in Gutenberg: ​https://github.com/WordPress/gutenberg/issues/65910

The fix will be to copy over a few lines for the Style Engine that exist in Gutenberg but do not yet exist in the core repo.

Change History (3)

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


2 years ago
#1

  • Keywords has-patch has-unit-tests added

Add writingMode to the style engine, to support dynamic blocks. This backports some PHP changes that were missed in previous WP core releases:

For the issue this resolves, see: ​https://github.com/WordPress/gutenberg/issues/65910

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

This PR adds support for the writing mode (orientation) typography block support for dynamic blocks, such as the Site Title block. Without this change, currently (in WP 6.7 Beta 1 and Beta 2) if you go to update the Site Title block and give it a vertical orientation, it'll look fine within the site editor, but still display as horizontal on the site frontend.

To test this PR, open up the site editor, select the site title block, and switch its text orientation in the block inspector to be vertical. Save the template, and view the site frontend. Here is a quick screenshot to show where to update the text orientation (writing mode):

https://github.com/user-attachments/assets/dc981712-b30e-4e28-97a5-439bad2f21dc

#2 @andrewserong
2 years ago

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

In 59199:

Editor: Fix writingMode support in dynamic blocks.

Adds missing handling for the typography.writingMode property to the style engine, so that dynamic blocks correctly render text orientation styles on the site frontend.

Props wildworks, aaronrobertshaw, poena, get_dave, ndiego.
Fixes #62189.
See #59306.

​@andrewserong commented on ​PR #7534:


2 years ago
#3

Thanks for the reviews, everyone! 🙇

Committed in r59199.

Note: See TracTickets for help on using tickets.