Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#62315 closed defect (bug) (fixed)

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

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

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
2 years ago

  • Milestone 6.7.1 → 6.7

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


2 years 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
2 years ago

  • Owner set to ramonopoly
  • Resolution → fixed
  • Status new → 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:


2 years ago
#4

Committed in r59316 / ​dc4bd050

#5 @ramonopoly
2 years ago

  • Keywords dev-feedback added
  • Resolution fixed
  • Status closed → reopened

#6 @ramonopoly
2 years ago

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

#7 @peterwilsoncc
2 years ago

  • Keywords dev-reviewed added; dev-feedback removed

Approved for merge to the 6.7 branch.

#8 @peterwilsoncc
2 years ago

  • Resolution → fixed
  • Status reopened → 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.