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

Expose before/after in drag and drop experience #54952

Open
Tracked by #33683
mtias opened this issue Sep 30, 2023 · 4 comments
Open
Tracked by #33683

Expose before/after in drag and drop experience #54952

mtias opened this issue Sep 30, 2023 · 4 comments
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@mtias
Copy link
Member

mtias commented Sep 30, 2023

We currently rely a bit too much on the ellipsis menu for precisely inserting a block before or after another block. This is not the most intuitive flow, since you need some time to become acquainted with the interface to discover it. Most users would tend to search for a block and try to drag it into place. They would generally fail to position the dragged object since we only use the sibling inserter.

Let's explore exposing the before/after hooks when dragging over any block so that we can improve awareness of this functionality. These hooks already exist, so it's a pity they are absent from the drag and drop experience. I think this could drastically improve the reliability of the editor.

@mtias mtias added [Type] Enhancement A suggestion for improvement. [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Drag and Drop Drag and drop functionality when working with blocks labels Sep 30, 2023
@andrewserong andrewserong added the Needs Design Needs design efforts. label Oct 25, 2023
@andrewserong
Copy link
Contributor

Just adding the "Needs Design" label, it'd be good to explore some ideas for how this could look visually. I.e. do we reserve the area of the size of the block that's being dragged or attempt to preview how the block would look in the target position before releasing the mouse button? Or, do we go for something a bit more abstract for indicating the before/after positions (i.e. via additional lines or other visual indicators).

@ellatrix
Copy link
Member

Let's explore exposing the before/after hooks

Could you elaborate on this? What are the before/after hooks?

@mtias
Copy link
Member Author

mtias commented Aug 2, 2024

Just the before / after slots for blocks—I imagine something like dragging on top of another block and getting a dropzone popover for before / after. If we ever add displacement, this becomes mute.

@ellatrix
Copy link
Member

ellatrix commented Aug 5, 2024

I guess I'm not following. When you drag a block from the inserter over a block in the canvas, it already shows the before/after insertion point, depending on whether you're dragging over the top half or bottom half?

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 [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
3 participants