Opened 15 months ago
Closed 15 months ago
#55337 closed defect (bug) (fixed)
Optimize preload paths for post and site editors
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9.3 | Priority: | normal |
Severity: | normal | Version: | 6.0 |
Component: | Editor | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
The preloaded REST responses (api-fetch preloading middleware) are a bit out of sync with the real requests that the post and site editors are sending, and they should be optimized them. See the description of the attached PR, and also of this Gutenberg PR (https://github.com/WordPress/gutenberg/pull/39256), for more details.
Change History (13)
This ticket was mentioned in PR #2387 on WordPress/wordpress-develop by jsnajdr.
15 months ago
#1
#2
@
15 months ago
- Milestone changed from Awaiting Review to 5.9.3
Optimistically plopping this in 5.9.3 for if it happens but 6.0 would also be fine.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
15 months ago
#4
@
15 months ago
- Keywords commit added
- Owner set to audrasjb
- Status changed from new to accepted
Self assigning for commit 👍
#6
@
15 months ago
- Keywords fixed-major added; commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for backport consideration.
Before merging this to branch 5.9, @noisysocks shouldn't we also backport the changes introduced in the Gutenberg PRs mentioned above?
(ping @mamaduka)
15 months ago
#7
Committed in https://core.trac.wordpress.org/changeset/52995
#8
@
15 months ago
- Resolution set to fixed
- Status changed from reopened to closed
Backported to branch 5.9 in [53005].
#9
@
15 months ago
Oops. I forgot to make sure this can be backported. @noisysocks @mamaduka is it ok to backport it to branch 5.9 right now?
#12
@
15 months ago
shouldn't we also backport the changes introduced in the Gutenberg PRs mentioned above?
The https://github.com/WordPress/gutenberg/pull/39256 PR doesn't need to be backported at all, because it just patches the preload paths with a filter, while this Core patch modifies the source. It's a compat code that will disappear during 6.0 release.
This patch should be safe to backport to 5.9 and will add value for 5.9 users: preloads will match what the block editor actually requests, while now some of them are futile.
This patch optimizes preload paths in post and site editor so that they match the real requests:
/
preload as the payload is very big and the response is not needed on any critical path/wp/v2/taxonomies
so that it corresponds to whatloadTaxonomyEntities
requests. After Gutenberg version that ships the https://github.com/WordPress/gutenberg/pull/37685 patch is merged to core, these preloads will need to be further modified to usecontext=view
instead ofcontext=edit
./wp/v2/users/me
path so that it matches the real request (no query params)/wp/v2/settings
because it's requested on critical path (editor boot). Site editor already preloads this, we're just adding it to the post editor.This is companion to Gutenberg PR https://github.com/WordPress/gutenberg/pull/39256 which introduces compat code to modify the preload paths with a filter, when a Gutenberg plugin is active.
Fixes https://core.trac.wordpress.org/ticket/55337