-
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
Try zooming out when selecting the patterns tab in the inserter #65785
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: +4 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
Just wondering whether we want to keep zoomed out engaged when moving to the |
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.
This approach works well technically as far as I can see.
More only thought was do we want to disengage when selecting Media
as well? Because it is potentially useful to be able to drag and drop media into Patterns in the canvas when Zoomed Out.
I'll defer to @richtabor for final ✅ from a design perspective.
Yes, Media tab should not engage or disengage zoom out. |
de40c63
to
07e3c91
Compare
@getdave for me it works like the video I posted in the description, so it appears the media tab works as expected (save for that blank panel which appears to be a separate bug). |
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.
In my testing this works as described with the additional requirement of not disabling when selecting Media
.
07e3c91
to
75a3112
Compare
Hopefully rebase allows this to pass tests 🤞 |
694f717
to
4f9fbac
Compare
I think leaving zoom out engaged when closing the inserter (if set via the pattern tab click) is the incorrect UX. I think zoom out should automatically disengage if the inserter is closed and it was programmatically set by us:
Screen.Recording.2024-10-04.at.11.05.17.AM.movcc @richtabor |
I agree. #65749 (comment) |
So the patterns tab of the inserter becomes another toggle for zoom out juts like the one in the header, but it's not the tab itself it's the whole inserter if I close it, or if I swith to the blocks tab, but not to the media tab, and also I can just click the icon in the header. I find this quite confusing and a tell tale that we're not clear on what zooming is for. We also have a behavior (also found by @jeryj here) that automatically sets the patterns tab active when the inserter is open and zoom out is active. Tha behaviour tripped me as a user - I thought the selected tab is magically restored 🤷🏻 . |
4f9fbac
to
959e07a
Compare
I have updated this to use the hook we have as advised by @jeryj and now it works in all ways, will merge as soon as tests pass:
There is but one left awkwatd interaction where, with zoom out off, the user toggles patterns zoom out is engaged, the user toggles off zoom out, goes to blocks, goes back the patterns, zoom out is again engaged. Seems kinda annoting - but also I suspect a very rare flow. Replaced the video description of PR with a demo of the above. |
* adds handler for inserter tabs that engages zoom out view and mode * Only moving to blocks should reset zoom out mode * use hook to handle zoom out view, the hook respects the current zoom out setting --------- Co-authored-by: draganescu <andraganescu@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org> Co-authored-by: jeryj <jeryj@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: ed3e4d3 |
…Press#65785) * adds handler for inserter tabs that engages zoom out view and mode * Only moving to blocks should reset zoom out mode * use hook to handle zoom out view, the hook respects the current zoom out setting --------- Co-authored-by: draganescu <andraganescu@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org> Co-authored-by: jeryj <jeryj@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org>
What?
Closes #65749
Why?
Now that the zoom out view is easy to exit, automagically engaging it when patterns are about to be inserted seems a better idea. We have had this before, disabled it and now we're bringing it back.
How?
In the Inserter's menu we add a handler that deals with zoom out depending on what tab is selected.
Testing Instructions
or media tabstab (only) exits the zoom out view and modePatterns
will active Zoom Out. Media does nothing.Testing Instructions for Keyboard
N/A
Screenshots or screencast
inserter-zoom-out-dance.mp4
Co-authored-by: draganescu andraganescu@git.wordpress.org
Co-authored-by: getdave get_dave@git.wordpress.org
Co-authored-by: richtabor richtabor@git.wordpress.org
Co-authored-by: jeryj jeryj@git.wordpress.org