Zoom Out: Reset when exiting template editor#71360
Zoom Out: Reset when exiting template editor#71360BugReportOnWeb wants to merge 2 commits intoWordPress:trunkfrom
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. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR, but I think resetting the zoom level by using the useEffect hook isn't an ideal approach.
I think the zoom out reset should be tied to a button click event, just like when the device preview is changed.
Let's close this PR and move #71361 forward.
What?
Closes #71349
This PR ensures that zoom-out mode is reset when leaving the template editor, since the zoom-out toggle is only available within template editing sessions.
Why?
The zoom-out toggle is scoped to template editing. Without this fix, the editor can remain in zoom-out mode even after exiting template mode, which is inconsistent since the toggle is no longer visible in that context.
How?
renderingModefrom the editor store.post-onlymode, resets zoom-out mode.Testing Instructions
Screenshots or screencast
Screen.Recording.2025-08-26.at.9.47.30.PM.mov