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

Editor: Fix preloaded REST API paths #64459

Merged
merged 2 commits into from
Aug 13, 2024
Merged

Conversation

Mamaduka
Copy link
Member

What?

PR removes user pattern preloading for the post-editors. It was introduced in WordPress/wordpress-develop#2531.

Why?

The editor is used to load reusable blocks via the useBlockEditorSettings hook at the top of the post editor React tree, and at the time it made sense to preload this data.

Unfortunately, it never worked. The rest_preload_api_request doesn't support unbound queries, and the request was terminated with an error.

Reusable blocks are no longer fetched when the editor loads - #58239.

Testing Instructions

Confirm that the preload path is correctly removed from the $paths array.

Testing Instructions for Keyboard

Same.

Screenshots or screencast

CleanShot 2024-08-13 at 07 10 03

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Package] Edit Post /packages/edit-post labels Aug 13, 2024
@Mamaduka Mamaduka self-assigned this Aug 13, 2024
@Mamaduka Mamaduka requested a review from spacedmonkey as a code owner August 13, 2024 03:21
@Mamaduka Mamaduka requested review from jsnajdr and tyxla August 13, 2024 03:21
Copy link

github-actions bot commented Aug 13, 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 <[email protected]>
Co-authored-by: tyxla <[email protected]>

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

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @Mamaduka 🙌

@Mamaduka Mamaduka merged commit 02d0520 into trunk Aug 13, 2024
62 checks passed
@Mamaduka Mamaduka deleted the remove/user-pattern-preloading branch August 13, 2024 13:18
@github-actions github-actions bot added this to the Gutenberg 19.1 milestone Aug 13, 2024
@tyxla
Copy link
Member

tyxla commented Aug 13, 2024

Looks like this needs a follow-up fix: #64477

getdave pushed a commit that referenced this pull request Aug 14, 2024
* Edit Post: Remove user pattern preloading
* Update backport changelog

Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: tyxla <[email protected]>
@Mamaduka Mamaduka changed the title Edit Post: Remove user pattern preloading Editor: Fix preloaded REST API paths Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Edit Post /packages/edit-post [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants