-
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
Alternative zoom out trigger location #63913
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: +152 B (+0.01%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
Can we trigger "zoom-out" mode when selecting pattern categories? This is a user event, and it would be nice to avoid the effect of synchronization if we can. |
This PR enters zoom out mode if your block selection is allowed in the zoom out view. So, if you have a top level block selected, you enter zoom out. This is to avoid an interaction unexpectedly changing your block selection.
Can you explain what you mean more? I'm not sure I follow. |
@jeryj, it was more general to note how pattern category selection triggers a zoom-out mode. Since pattern category selection is a user event, I wonder if we can move the handler to the same callback. React docs "You Might Not Need an Effect" page has really good explanations for this. |
@Mamaduka I see what you mean. Thanks for the explanation. In this case the issue is exiting the inserter. We'll need to know if we should automatically return them to their previous mode or keep them in zoom out, and there's a lot of ways to exit the inserter, including some that may run outside this component. I'll look for ways to simplify if this approach is going to get merged though. |
bfdfdff
to
6429234
Compare
Is this dependent on the experiment for auto-engaging zoom out when selecting a pattern category? Meaning if we do not continue that experiment, this is not valid? |
No, it would just give you a way to enter zoom out from within the pattern category panel since that's an area where it's most relevant. |
294dd62
to
5b57aa8
Compare
revert changes Use 100% for desktop and 50% for zoom out update menu items Allow users to set zoom out back to 100% when the patterns tab is open Reset zoom when switching device mode Add text for zoom refactor click handler to a shared function Move in and out of zoom out when resizing below tablet viewport size
Co-authored-by: Alex Lende <[email protected]>
5b57aa8
to
ba4c7e5
Compare
ba4c7e5
to
119723a
Compare
Flaky tests detected in 119723a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10221734682
|
Thank you for working on this feature! Some brainstorming. I have a feeling that a lot of questions are coming up in the back of my mind when I test this... I can not totally place it yet. A new zoom out view and new editing experience with a better perspective on all of the content of a page/post. With a focus on a container/Group blocks in relation to moving or deleting. This PR is more focused on shuffling patterns. Could also be Template parts, templates Query Loop patterns etc. Perhaps one would be able to go to a page that uses the Query Loop click to go to 50% view and click the Query Loop and begin shuffling patterns to see what different patterns would look like in relation to other content on the page. I find the feature very useful and we need to make sure that there is a consistency between how this works in different areas. Meaning pattern, template parts, templates etc areas. |
I'd hold off on this one. One of the toughest problems we're struggling with, around zoom, is the initial trigger. The dropdown that Rich has been exploring seems very close to threading the needle, give or take the visual of the trigger itself, but at least behavior-wise. Given that hasn't yet been merged and thus tested through a couple of cycles in the plugin, it's unclear whether additional affordances are going to be needed or not. One of the risks then of building this out before we know it's necessary, is the slow accumulation of UI, each of which needs attention. |
What?
I think it will be very useful from UX and accessibility perspectives to have the toggle control for the zoom to be able to be triggered within the patterns tab. It also conditionally sets the zoom out mode based on the current selection. If you are working with no selection or section level block, you enter zoom out mode. If not, your current selection is preserved.
Why?
Allows for:
How?
TODO: Do we automatically exit zoom out after closing the panel? I feel like if we toggled it for them, then yes.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast