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

While moving a block: Show border and block name of hovered blocks #24750

Open
Tracked by #33683
mariohamann opened this issue Aug 23, 2020 · 6 comments
Open
Tracked by #33683

While moving a block: Show border and block name of hovered blocks #24750

mariohamann opened this issue Aug 23, 2020 · 6 comments
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Type] Enhancement A suggestion for improvement.

Comments

@mariohamann
Copy link

mariohamann commented Aug 23, 2020

Problem

While moving a block, it is quite difficult to insert the block at the right position. In fact, sometimes it is impossible to know whether e. g. you are going to insert the block into a group or above/below the group.

Solution

It would help a lot to see all borders of the hovered block and its inner blocks, highlighting and naming the block where the moved block will be inserted.

Here is just a quick ugly draft. I think it would be nicer to use dashed lines for the non selected block.

exmple

@talldan
Copy link
Contributor

talldan commented Aug 28, 2020

cc @paaljoachim who made #20955 along the same lines.

I actually throw some code together that does this, but the issue I found is that our 'drop zones' actually sit outside of our block borders when dragging to the first or last position. The implementation was also a lot more complex than I'd anticipated. I just recorded this demo of the branch:
demo

So I think a good first step would be refining how the drop zones and borders are shown.

@talldan talldan added [Feature] Drag and Drop Drag and drop functionality when working with blocks [Type] Enhancement A suggestion for improvement. labels Aug 28, 2020
@mariohamann
Copy link
Author

mariohamann commented Aug 28, 2020

Great to see that there is already some progress! In fact, your description of the positions of the drop zones sounds "interesting", it explains the feeling I sometimes had and it seems to be important to be faced soon. :)

I would just like to highlight, that naming of block/drop zones - as described above - would be very helpful, too. But one step after another... :)

@ZebulanStanphill
Copy link
Member

This is a great idea. I've seen some page builder plugins do this, and I feel silly for not suggesting something like this earlier.

@paaljoachim
Copy link
Contributor

I just did a new test and it is still difficult to see when dragging a block in and out of for example the Group block.

I will ping @mapk and @jasmussen so we get some additional feedback on the path forward.

@jasmussen
Copy link
Contributor

I know that @jameskoster has explored some additional boundaries lately, and they can help, certainly in situations like these. One way to test this is to implement it first for the site editor, and get a feel for it.

I would, however, exclude the text overlay/block name. It doesn't really add a ton of value, but comes with the same problems that made us revert the breadcrumb interface we tried in the first place, way back — overlap and covering potentially important UI.

@jameskoster
Copy link
Contributor

Thanks for the ping @jasmussen. I agree that the use case here feels very similar to what I explored in #27780. There does seem to be a few situations in which highlighting the boundaries of a container block would be beneficial.

One way to test this is to implement it first for the site editor

I'd welcome any updates to the PR above, to explore using the same visual treatment for the use case presented in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

6 participants