Make WordPress Core

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#64210 closed defect (bug) (fixed)

Block editor: Make fit text work with the interativity API

Reported by: jorgefilipecosta Owned by: jorgefilipecosta
Priority: normal Milestone: 6.9
Component: Editor Version:
Severity: normal Keywords: gutenberg-merge has-patch
Cc: Focuses:

Description

Track backports: WordPress/gutenberg#72923

Fit text did not work after navigating to a page using the Interactivity API router. When users navigated to a post via client-side navigation (e.g., in a Query block with pagination), fit text blocks would not recalculate their font sizes, appearing either too large or too small.

This occurred because the fit text initialization only ran on the window.load event, which doesn't fire during client-side navigation.

We refactored fit text front end to be an interactivity api first implementation, using an interactivity api init event instead of a window load event.
This commit adds the required PHP changes.

We refactored fit text front end to be an interactivity api first implementation, using an interactivity api init event instead of a window load event.
This ticket tracks the required PHP changes.

Change History (3)

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


9 months ago
#1

  • Keywords has-patch added

Backports: https://github.com/WordPress/gutenberg/pull/72923
Backports the required core changes to make fit text work correctly with the interactivity API.

Fit text did not work after navigating to a page using the Interactivity API router. When users navigated to a post via client-side navigation (e.g., in a Query block with pagination), fit text blocks would not recalculate their font sizes, appearing either too large or too small.

This occurred because the fit text initialization only ran on the window.load event, which doesn't fire during client-side navigation.

This PR refactors fit text front end to be an interactivity api first implementation, using an interactivity api init event instead of a window load event.

#2 @jorgefilipecosta
9 months ago

  • Owner set to jorgefilipecosta
  • Resolutionfixed
  • Status newclosed

In 61145:

Block editor: Make fit text work with the interactivity API.

Fit text did not work after navigating to a page using the Interactivity API router. When users navigated to a post via client-side navigation (e.g., in a Query block with pagination), fit text blocks would not recalculate their font sizes, appearing either too large or too small.
This occurred because the fit text initialization only ran on the window.load event, which doesn't fire during client-side navigation.
We refactored fit text front end to be an interactivity api first implementation, using an interactivity api init event instead of a window load event.
This commit adds the required PHP changes.

Props jorgefilipecosta, mukesh27, luisherranz.
Fixes #64210.

#3 @sabernhardt
9 months ago

  • Milestone Awaiting Review6.9
Note: See TracTickets for help on using tickets.