Make WordPress Core

Opened 5 weeks ago

Closed 5 weeks ago

Last modified 4 weeks ago

#64210 closed defect (bug) (fixed)

Block editor: Make fit text work with the interativity API

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

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.


5 weeks 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
5 weeks ago

  • Owner set to jorgefilipecosta
  • Resolution set to fixed
  • Status changed from new to closed

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
4 weeks ago

  • Milestone changed from Awaiting Review to 6.9
Note: See TracTickets for help on using tickets.