-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Zoom Out: Escape when clicking directly on the canvas or pressing enter on the canvas #64434
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: +57 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
Flaky tests detected in 3c4c2d8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10349265596
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for PR.
I think the keydown part makes sense as enter inserts a empty paragraph block and we need to edit at that point. I'm noting that #64169 does a similar thing.
The benefits of the click action are less clear to me.
In the Site Editor it's quite challenging to find anywhere that triggers the action. I expected that a click on the header/footer would drop me out of Zoom Out but nothing happens - I know why that is but it didn't feel "right".
In the Post [Page] Editor it's easier to find a target which will trigger the click handler. However, some patterns have lots of whitespace at the bottom, which means it can be all too easy to accidentally click outside the pattern when trying to select it, thus unexpectedly exiting zoom out mode.
Screen.Capture.on.2024-08-14.at.14-00-40.mp4
Overall I'd say #64169 feels like the user intent is clearer and thus a safer bet.
I struggled to get this to work well, particularly to click in to write a title (had me open the template) and existing by clicking directly on the canvas: zoooom.out.escape.mp4I could get pressing enter to work later on though. I noticed that moving between zoomed out and inserting more patterns didn't feel smooth too. These transitions of entering, exiting, adding patterns, etc will go a long way in making it feel a bit more streamlined! |
Alternative / complementary PRs worth looking into: |
@scruffian Do we still want this functionality? |
I think we can close this now. |
What?
This is exploring some options for how to escape zoom out mode
Why?
In #61489 we are trying the idea of landing users directly in zoom out flow. Because of this, we need a way that they can leave zoom out without clicking on the zoom out UI. Instead we want to try to guess that they want to leave zoom out by their key press events, or the mouse interactions
How?
Add two event listeners to the iframe body:
Testing Instructions
This makes more sense in the context of #61489, but you can test it independently:
Screenshots or screencast
Screen.Recording.2024-08-12.at.10.21.12.mov