-
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
Update: Invoke zoom out view when navigating on inserter pattern tabs. #45395
Update: Invoke zoom out view when navigating on inserter pattern tabs. #45395
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Size Change: +143 B (0%) Total Size: 1.29 MB
ℹ️ View Unchanged
|
Thanks for working on this :) In terms of implementation, I noticed a couple of issues:
bugs.mp4Conceptually, it feels a little unexpected to see the zoom behaviour immediately after opening the inserter, before any patterns are actually visible. I wonder if we should try only invoking zoom when you select a pattern category and the secondary panel appears? |
2f48d24
to
a9375c6
Compare
Hi @jameskoster, I updated the PR, and now it only switches to a zoom-out view when previewing a list of patterns, and I fixed the bug on the post editor. If we go with the refactoring and try to polish this, we may arrive at this result: It seems like the zoom-out view becomes too narrow, almost like a mobile view. Do you think this would work and it is worth the refactor, or do you think we should not consider the zoom-out view in this case? Or explore other possibilities like closing the template/block sidebar (at the cost of some additional code complexity and maybe unexpected closing of the sidebar by the user). |
Thanks for the update. I agree these details make the overall experience a bit awkward. The patterns panel overlapping the document is definitely sub-optimal given the whole purpose of zooming out is to better facilitate drag/drop 🙈 Refactoring as you suggest would address that issue, but increases the likelihood of the canvas switching between desktop/mobile, which would also be a bit problematic. It's made worse when the Inspector is open as you pointed out, and that compounds because clicking to close the Inspector also closes the Inserter. Auto-closing the Inspector when a patterns category is opened would help because the canvas would retain its size and device preview switching wouldn't occur, something like: But I'm really not sure if it's worth the technical overhead. cc @jasmussen for more thoughts on this. |
It would be nice if the flyout could push the canvas inwards, instead of being a popover, and it would be ideal if it avoided invoking any tablet or mobile previews. I think the near-term question is whether this improves what's in trunk or not. I lean towards yes, but I'll need to dive in a bit more. How hard would it be to make Jay's suggestion happen? And is there a way to avoid the tablet/mobile invokations? Thanks for the PR! |
I think there's certainly merit to the idea. Basically an isolated mode for inserting patterns. Wouldn't need list, or edit/select icons. Kinda like Style Book. |
Fixes: #44585
This PR invokes the zoom-out view when the user is navigating on the inserter patterns tab and closes it if the user goes out of the inserter or moves to another tab.
cc: @jameskoster, @mcsf