-
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
Write/Design tool: Persist as a user preference #65945
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: -6 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
@youknowriad why do we save the pref only in the post editor? |
The preference works on the site editor but we were forcing it to "edit" on site editor load. This should be fixed in the last commit. |
This works now in all editors 🎉 |
4f348b8
to
1706cbf
Compare
1706cbf
to
21d0043
Compare
Co-authored-by: youknowriad <[email protected]> Co-authored-by: oandregal <[email protected]> Co-authored-by: mtias <[email protected]> Co-authored-by: draganescu <[email protected]> Co-authored-by: ndiego <[email protected]> Co-authored-by: richtabor <[email protected]>
@youknowriad As you noted, this PR has caused a problem in As you know for "Zoom Out" we now have x2 streams of work:
Up until now we've been able to target fixes for 6.7 into the
Overall this is overhead we could do with avoiding. Unless you have a better suggestion (which you may well do), then I wonder if you would consider reverting this PR to allow these modes to use state, but have all the modes other than cc'ing @ajlende and @jeryj who helped track down the bug and who may also like to add suggestions. |
I don't mind different fixes for 6.7 and trunk. Now, I think the right fix is to actually remove the "zoom-out" mode and just update all the checks to rely on zoom level instead. |
Something like this maybe #66141 |
I appreciate it's possible to have different fixes for The alternative is that we commit only to applying fixes to the 6.7 branch and assume that I don't have the answers, but I'm seeking some stability here as preparing Zoom Out for 6.7 is a challenging task with a lot of moving parts so avoiding having to think about multiple "streams" will help reduce the possibility of bugs. |
Can you share some concrete examples. Like for instance, how does this PR impacts 6.7? I'm happy to help on resolving conflicts and things like that. We had similar cases in past releases where work on trunk conflicts with release branches and in a few occasions we had to do separate fixes in these branches. |
The `state.editorMode` reducer was removed in 65945 in favour of persisted user preferences. Selector `__unstableGetEditorMode` should be used instead. This commit fixes a bug wherein changes to `editorTool` don't trigger a re-render of the block list view. See: #65945
Co-authored-by: youknowriad <[email protected]> Co-authored-by: oandregal <[email protected]> Co-authored-by: mtias <[email protected]> Co-authored-by: draganescu <[email protected]> Co-authored-by: ndiego <[email protected]> Co-authored-by: richtabor <[email protected]>
closes #65572
What?
This PR switches the editor mode (or tool) to use a user preferences rather than a regular memory state. This allows the user choice to persist as you reload the page or navigate in the admin.
Note
Testing Instructions
1- Open the post editor
2- Switch the design/write tool
3- Notice that it persists if you reload the page.