-
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
Drag and drop from inserter to post #1511
Comments
Related #38. |
Sounds interesting as a progressive enhancement :) |
We've found that Drag from insert modal to desired location on screen between existing blocks is still not well developed within the currently available React based npm modules. Drag blocks above/below each other by dragging the gray borders is by contrast well supported & very solid. |
This should already be working – just not with the |
Yes. Though I wasn't previously aware of this, I can see it when I go looking for it based on your explanation. It's pretty well hidden. To see it I had to:
|
Since this is already working do you feel it offsets the need for drag and drop? |
No - not at all. |
This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs. |
It didn't take me much time to come to the same idea after the inserter was refactored :) It would make it so much easier to put a block or pattern in the nested context at the specific level. In addition, it feels more natural to drag and drop items rather than use the in-between the blocks inserter: By the way, have you considered changing the way in-between the blocks works with drag & drop from the inserter? At the moment it's very difficult to trigger (I'm using Safari), but regardless, it could maybe set the selection in the editor accordingly to the placement clicked and open the sidebar with the inserter? |
I agree, the sibling is SUPER difficult to activate right now. I'm not sure why. Having it trigger the sidebar Inserter is an interesting solution. Will pushing the focus to the Inserter sidebar have any a11y ramifications? I remember, at one time, we talked about the sibling Inserter opening the Patterns tab by default too. Getting drag and drop right is going to be enough for this particular issue. It would be great to get some development help on it. |
Being able to drag from the Inserter panel into the editor is also becoming a frequently requested item for the new Widget Screen. People would like to drag blocks directly into specific widget areas. From the call for testing post: https://make.wordpress.org/core/2020/09/30/call-for-testing-the-widgets-screen-in-gutenberg-9-1/#comment-40042
|
Drag-and-drop could help resolve some common confusion around adding blocks: #26404 |
I don't think drag and drop from the block library would be technically difficult. When blocks are dragged and dropped currently, a
That's then used in the drop event:
For dragging from the inserter I imagine this would be a slightly different bit of data. The There are some a11y considerations. Previously there's been some feedback against a button that can be clicked and dragged when we tried that on the block toolbar. Secondly, if the block is selected after being dropped, the block library panel will close as it's a popover. That probably makes this a little less useful, but it's the same at the moment when clicking a block in the library. |
For what is worth, there's been some feedback about changing this behaviour. |
Interested in options for adding drag and drop in the following situations:
2. Drag blocks above/below each other by dragging the gray borderscovered by #38Annotations:
Note: This may have already been discussed, if so we can close this out.
The text was updated successfully, but these errors were encountered: