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

Created on 23 Aug 2020  路  3Comments  路  Source: WordPress/gutenberg

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

Needs Design Feedback [Feature] Drag and Drop [Type] Enhancement

Most helpful comment

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.

All 3 comments

cc @paaljoachim who made https://github.com/WordPress/gutenberg/issues/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.

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... :)

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moorscode picture moorscode  路  3Comments

JohnPixle picture JohnPixle  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments

BE-Webdesign picture BE-Webdesign  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments