Skip to content
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

Add support for dragging blocks in zoom out mode #59961

Closed
richtabor opened this issue Mar 18, 2024 · 6 comments
Closed

Add support for dragging blocks in zoom out mode #59961

richtabor opened this issue Mar 18, 2024 · 6 comments
Labels
[Feature] Zoom Out [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

richtabor commented Mar 18, 2024

Zoom out mode does not currently support dragging top-level blocks around. As part of a page composition flow, you should be able to drag top-level blocks to reorder them vertically when zoomed-out.

We could start by enabling the drag control/functionality on the existing BlockSelectionButton component (the dark toolbar there) that renders when in zoom-out mode, instead of first re-exploring a vertical toolbar.

CleanShot 2024-03-18 at 14 08 04

CleanShot 2024-03-18 at 14 09 16

Note that the shuffle icon only renders for patterns (re Group blocks with category meta data).

As an aside, I wonder if BlockSelectionButton could become the vertical toolbar.

@richtabor richtabor mentioned this issue Mar 18, 2024
40 tasks
@richtabor richtabor added [Feature] Zoom Out [Type] Enhancement A suggestion for improvement. labels Mar 18, 2024
@talldan
Copy link
Contributor

talldan commented Mar 19, 2024

Something to note with a vertical toolbar is that it might be interesting in terms of keyboard navigation. Most toolbars work horizontally (using left/right arrow keys), but the one toolbar being vertical might cause dissonance in that experience.

Sighted users that use the keyboard would probably expect up/down arrow keys to work, while non-sighted users might not know what keys to use and may still expect left/right to work. 🤔

@richtabor
Copy link
Member Author

Something to note with a vertical toolbar is that it might be interesting in terms of keyboard navigation. Most toolbars work horizontally (using left/right arrow keys), but the one toolbar being vertical might cause dissonance in that experience.

I see it more like a set of menu items arranged vertically. Would left/up and right/down work?

@talldan
Copy link
Contributor

talldan commented Mar 20, 2024

Some more info here:

The aria-orientation="vertical" property can be used to specify a vertical toolbar. I'm not sure how good the screenreader support is.

The second link says that it is possible to duplicate controls (so both left/right up/down both work). Down arrow is used to open dropdowns on our current horizontal toolbars, so that may be another point of confusion.

I think it'd be worth checking in with a11y contributors, as even though there's a spec, there's still often broader considerations.

@richtabor
Copy link
Member Author

Down arrow is used to open dropdowns on our current horizontal toolbars, so that may be another point of confusion.

I'm not thinking we'll have dropdowns in this vertical toolbar. I agree, it'll be potentially confusing.

@richtabor
Copy link
Member Author

Noting that select mode already supports drag and drop:

CleanShot 2024-03-20 at 17 15 27

@draganescu
Copy link
Contributor

@richtabor dragging is now available in zoom out. Should we close or redefine this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Zoom Out [Type] Enhancement A suggestion for improvement.
3 participants