Show visual cue when dragging over empty group block#50826
Conversation
|
Size Change: +627 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 9a64ac2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5052853063
|
923d3fd to
115b6b8
Compare
115b6b8 to
ab61192
Compare
2f22c78 to
9a64ac2
Compare
aaronrobertshaw
left a comment
There was a problem hiding this comment.
Nice work @kevin940726 ✨
It's working as advertised for me. The only thing that caught me out initially was the dashed placeholder in row and stack blocks behaving different to those in the columns block. That's to be expected though and is highlighted in the PR's demo video.
There was one small typo in a test comment. Other than that, I think this is good to go.
Screen.Recording.2023-05-23.at.3.31.58.pm.mp4
talldan
left a comment
There was a problem hiding this comment.
Looks really good, nice work!
|
Nice one. The plus works, and scales to narrow contexts. We could also show a text indication, such as "Drop here" or something like that, but let's go with this icon only version for now as it's the one that will scale the best. |
|
YES! Thank you for working on this feature @kevin940726 Kai! |
What?
Fix #39064. Add a visual animation when dragging a block over an empty group block.
Why?
See #39064.
How?
Call
showInsertionPointeven when the list is empty but update the insertion point to not show the in-between blue line indicator. Instead, use it to change the background of the appender.Testing Instructions
Testing Instructions for Keyboard
It's a drag-and-drop (DnD) feature, and currently DnD doesn't work with keyboard in gutenberg.
Screenshots or screencast
Kapture.2023-05-22.at.16.58.05.mp4