-
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
Improve the drag and drop experience #21391
Comments
#19928 is also related and offers some similar and overlapping suggestions. |
One of the things that we've found helpful is to highlight the structural elements while dragging so its clear what potential drop positions exist. Sometimes you want to drop in order to do something like create a new column or row with the dragged contents rather than just reposition, so exposing the structure can help with discovery. This pattern could potentially work for a keyboard insertion mode as well, where the drop zone is more of an insertion point that can be moved with arrow keys through various positions until the user confirms the insert. |
Associated issue: |
Here is a run through of using the Group Block with focus on drag & drop in WordPress 5.3, 5.4 and in Gutenberg plugin 7.8.1 |
@slkfsdf8y34ljhsfsdfkuhfkl84hj did a pretty thorough job in documenting some of the undesirable drag&drop behavior in a 20 minute video: https://wordpress.org/support/topic/bug-report-20-min-of-video-journey-of-how-i-cant-move-an-image-to-the-bottom/ |
It's worth noting that even if you try to exclusively use the mover buttons, you're still forced to use drag-and-drop to move blocks in and out of nested containers. (And speaking of which, this makes it nearly impossible for keyboard users to move blocks in and out of nested container without using copy-paste.) |
There's some interesting discussion currently happening in #20078 about a potential press-and-hold-still-to-enable-drag-mode interaction. I think that's probably the best avenue to explore to improve the drag-and-drop experience. |
Here is an overview of react drag and drop components. Perhaps something we can use? Associated issue: |
I've been looking at drag and drop functionality in the block navigation (#22297), using the same functionality as exists for blocks. Some of my observations about the usability of drag and drop in addition to what @mapk describes above:
|
Also some technical notes:
|
@jasmussen is working on a drag and drop PR here: |
Yeah, it's quite poor dragging experience. What I did a while back for EditorsKit was added a background color to make it a bit better. |
Thanks for sharing, @phpbits! One of the reasons we can't add a background color is that we can't assume which color to show. We can show a white background by default, and a black background when the theme registers a dark editor style, but TwentyTwenty has a yellow background, and even if we could figure that one out, you could still drag a paragraph from inside a group with an arbitrary background color. One thing I'm trying in #23024 is to not show the clone at all. |
#23024 is a great solution here! The content minimizes so there's no longer an awkward ghosting. And the dropzones feel a bit better. I'll close this out since it's merged. |
Right now our drag and drop experience is pretty poor. I realize that this interaction is required a secondary interaction according to our vision. https://developer.wordpress.org/block-editor/contributors/design/#vision, but it's important to note that drag and drop is a primary, often used interaction of many users. So while this is considered secondary by us, the experience should be intuitive, simple, and informative.
Problems
Trying to find drop zones is incredibly difficult as well. For example, in this gif below, I want to add a Spacer block within the Group block, but above the Columns block. And then I want to place another Spacer block above the Image block in the right column. Neither of those showed a drop zone for me, and at times there were TWO dropzones showing simultaneously.
Expected behavior
Desktop (please complete the following information):
Related: #20078
The text was updated successfully, but these errors were encountered: