Make WordPress Core

Opened 6 months ago

Closed 6 months ago

#62315 closed defect (bug) (fixed)

Global styles: preload `/global-styles` endpoint responses [regression]

Reported by: ramonopoly's profile ramonopoly Owned by: ramonopoly's profile ramonopoly
Milestone: 6.7 Priority: high
Severity: major Version:
Component: Editor Keywords: has-patch dev-reviewed
Focuses: Cc:

Description

A PR to track the backporting of https://github.com/WordPress/gutenberg/pull/66468

This fixes a regression whereby requests to global styles endpoints were not being preloaded, resulting in several requests being fired clientside unnecessarily.

For performance reasons, we should preload the requests so that the data is in the store and ready to use straight away.

The outcome is that the editor loads more quickly.

Change History (8)

#1 @ramonopoly
6 months ago

  • Milestone changed from 6.7.1 to 6.7

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


6 months ago
#2

A PR to track the backporting of https://github.com/WordPress/gutenberg/pull/66468

This fixes a regression whereby requests to global styles endpoints were not being preloaded, resulting in several requests being fired clientside unnecessarily.

For performance reasons, we should preload the requests so that the data is in the store and ready to use straight away.

The outcome is that the editor loads more quickly.

### Testing

Fire up this branch and head to the site editor.

Check that global-styles endpoints aren't fetched client side, but are, rather, preloaded via rest_preload_api_request

Do the same for the post editor.

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

#3 @ramonopoly
6 months ago

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

In 59316:

Global styles: preload /global-styles endpoint responses

This commit fixes a regression whereby requests to global styles endpoints were not being preloaded, resulting in several requests being fired clientside unnecessarily.

For performance reasons, we preload the requests so that the data is in the editor store and ready to use straight away.

The outcome is that the editor loads more quickly.

Follow-up to [62042].

Props ellatrix, ramonopoly, apermo, peterwilsoncc.
Fixes #62315.

@ramonopoly commented on PR #7661:


6 months ago
#4

Committed in r59316 / dc4bd050

#5 @ramonopoly
6 months ago

  • Keywords dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#6 @ramonopoly
6 months ago

Reopening so that this regression fix can be considered for backporting to 6.7.
Thank you!

#7 @peterwilsoncc
6 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Approved for merge to the 6.7 branch.

#8 @peterwilsoncc
6 months ago

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

In 59324:

Global styles: preload /global-styles endpoint responses

This commit fixes a regression whereby requests to global styles endpoints were not being preloaded, resulting in several requests being fired clientside unnecessarily.

For performance reasons, we preload the requests so that the data is in the editor store and ready to use straight away.

The outcome is that the editor loads more quickly.

Follow-up to [62042].

Reviewed by peterwilsoncc.
Merges [59316] to the 6.7 branch.

Props ellatrix, ramonopoly, apermo, peterwilsoncc.
Fixes #62315.

Note: See TracTickets for help on using tickets.