-
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
List View: Append when dragging into collapsed blocks #50936
List View: Append when dragging into collapsed blocks #50936
Conversation
Size Change: +12 B (0%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
Flaky tests detected in 74fa472. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5075327649
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another great bit of polish, thanks @andrewserong!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another great bit of polish, thanks @andrewserong!
Thanks for reviewing, Dan! I don't think this PR will be particularly controversial, so I'll merge this in now. Happy to do any follow-up if anyone runs into any issues. |
What?
Part of #49563, fixes #50716
When dragging a block within the list view over a collapsed block, append the dropped block to the end of the container block's inner blocks, instead of prepending to the beginning of the block.
Why?
As raised in #50716, when a group block is collapsed and a user drags a block onto it, it's likely that the expected result is for the block to be appended to the end of that block's children instead of being prepended.
How?
blockIndex
to0
explicitly as the block's children are expanded, so the user will be visually attempting to place the block at the beginning of that part of the list.blockIndex
if it is available. This places the dragged block at the end of the inner blocks of the container block.Testing Instructions
trunk
Screenshots or screencast