-
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
Drag and Drop: Consider threshold of adjacent blocks when moving #6289
Comments
This was raised in today's Gutenberg triage session (link requires registration): https://wordpress.slack.com/archives/C02QB2JS7/p1556546100056500 I've updated the issue:
|
Relevant notes from #13068:
|
From a design perspective, this seems like a good call. It would be great to get a PR up and running and see how it works. |
Linking to related comment: #18667 (comment) I'd expect that it would find the right spot to place the block without the need to drop it exactly on the thin blue line that appears between blocks. Maybe updating the UI automatically while dragging with a blank space or a translucid preview of the block (like the Dragula demo) where the block would be placed. |
For a bit of context here. I explored different solutions including live drag and drop like suggested above (and most drag and drop examples/libraries out there) in this PR #16457 There's an issue that I was unable to solve and AFAIK I didn't find any concrete solution in the community (JS).
I believe that in order to solve this, we need some design thinking and prototyping about how DnD would ideally work in different situations before moving to implementation. |
Is this still relevant after the drag and drop improvements? @talldan |
@ellatrix I think the main thing this issue requests is for blocks to re-order while dragging. I'm not sure if that's still really a goal or feasible. I think it will result in content moving around unpredictably. Some of the demos show a simple vertical list of block like elements, but blocks aren't really like this anymore. For a start they work both vertically and horizontally (buttons, social links), or in submenus (navigation), and when moving a block from one of those contexts to another, content would suddenly shift up and down as the block is removed or added to the flow. @jasmussen What do you think? |
I think there are some open questions around how drag and drop can work overall. Although many things improved with 5.5, it's still not the most intuitive, and we need a solution that allows one to drag and drop a block even with the block toolbar set to "top". However all those aspects are higher level drag and drop issues (worth tracking if they aren't already), and I'm not sure the remaining issue, rearranging while dragging, is strictly necessary to address in the current interface, where as soon as you "lift" a block, it collapses into a chip and only gets moved when you drop it. |
We tried the reorder while dragging, but it wasn't clear how it should work with nested contexts, so I think we should close for now. |
It can confuse beginners. Did I make it right ? Is my dragged Block now under, or what ?
Demo here: https://bevacqua.github.io/dragula/
Maybe it would be better not to show Block's top toolbar when clicked / used mouse hand for dragging. And not to show top toolbar when dragging is finished, and Block is on desired place. It can also confuse beginners. Even to me personaly is a bit to much information. All I need in this moment is to change position of Blocks.(Edit by @aduth 2019/04/29: This is no longer valid, as the requested behavior has been implemented)The text was updated successfully, but these errors were encountered: