Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editor: Add 'OPTIONS /page' to preloaded paths #64890

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

Mamaduka
Copy link
Member

What?

PR adds OPTIONS /page to the preloaded paths list for the Site Editor.

This is similar to WordPress/wordpress-develop#2531.

Why?

Permissions for creating pages (OPTIONS /wp/v2/pages). Both requests are made in the useBlockEditorSettings hook, at the top of the post editor React tree.

Matches the preloaded path for the posts editor and hopefully will improve the Site Editor loading time a bit.

Testing Instructions

  1. Open the Site Editor.
  2. Confirm that the OPTIONS request isn't made for the newly preloaded path.

Testing Instructions for Keyboard

Same.

@Mamaduka Mamaduka added [Type] Performance Related to performance efforts [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Aug 29, 2024
@Mamaduka Mamaduka self-assigned this Aug 29, 2024
Copy link

github-actions bot commented Aug 29, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

lib/compat/wordpress-6.7/rest-api.php Outdated Show resolved Hide resolved
@Mamaduka Mamaduka merged commit 5981404 into trunk Aug 29, 2024
61 checks passed
@Mamaduka Mamaduka deleted the add/site-editor-preload-page-permissions branch August 29, 2024 12:43
@github-actions github-actions bot added this to the Gutenberg 19.2 milestone Aug 29, 2024
bph pushed a commit to bph/gutenberg that referenced this pull request Aug 31, 2024
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants