-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Don't switch editor mode when changing entities #66452
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -30 B (0%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
This seems like a left over from my refactoring PR or maybe these were introduced afterwards/at the same time. |
I think these were accidentally introduced trying to fix both 6.7 and |
Thank you! This was also triggering the REST API request on load |
* Only reset zoom level * Avoid set editor mode on sidebar toggle Co-authored-by: getdave <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: Ella <[email protected]>
What?
wp/6.7
. This PR is incompatible with that branch.Avoid REST API call caused by resetting editor mode on:
W
sidebarWhy?
In
trunk
the editorMode is now a preference. That means changing it will trigger a REST request.Props to @ellatrix for spotting this one.
Moreover, the Zoom Out is no longer coupled to editorMode. Rather it relies solely on
zoomLevel
state. Therefore this call is redundant intrunk
(only!).This is all predicated on the assumption that we do not wish to reset a user activate preference when moving between entities in the Editor.
How?
Removes the call to set the editor mode in the relevant portions of code.
Testing Instructions
First verify the bug.
trunk
Network
and filter by search stringrest_route=%2Fwp%2Fv2%2Fusers%2Fm
. This is the REST request to the user preferences endpoint.W
to activate left hand sidebarPages
click between a few pages and then click on the canvas to edit any page.Back
button. See the network request triggered as you move between Pages.Now check this branch resolves.
W
sidebar or move between entities.Testing Instructions for Keyboard
Screenshots or screencast