Skip to content

fix: support dragging multiple blocks into a single column#2535

Open
Noyce-Joel wants to merge 1 commit intoTypeCellOS:mainfrom
Noyce-Joel:fix/multi-block-column-drop
Open

fix: support dragging multiple blocks into a single column#2535
Noyce-Joel wants to merge 1 commit intoTypeCellOS:mainfrom
Noyce-Joel:fix/multi-block-column-drop

Conversation

@Noyce-Joel
Copy link

Summary

When dragging multiple selected blocks to the edge of another block, only the first block was moved into the new column. The remaining blocks were left in place. This fix iterates over all children in the drag slice so all selected block are moved into the column.

Rationale

handleDrop in MultiColumnDropCursorPlugin.ts only extracted slice.content.child(0) from the selected blocks being dragged, ignoring the other selected blocks. This means multiblock dragging to a column was dropping content.

Changes

  • Build an array of all dragged blocks from slice.content instead of extracting only the first child.
  • If dropping into an existing column: filter selected/dragged blocks from their current columns and insert them together into the new column.
  • If creating a new column layout: place all selected/dragged blocks into one column and the target block into the other.
  • Single-block drags won't be effected since the array will contain one element.

Impact

Shouldn't be any impact on existing single-block drag behaviour and multiblock column drops now work as expected.

Testing

  • xl-multi-column unit tests pass (5 skipped, unchanged).
  • Select 2-3 blocks, drag to edge of another block: all appear in a single new column.
  • Select 2-3 blocks, drag to edge of existing column layout: all appear in new column within the column
    list.
    -Single block drag to column works as before.

Screenshots/Video

Screen.Recording.2026-03-03.at.20.56.43.mov

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

@vercel
Copy link

vercel bot commented Mar 3, 2026

@Noyce-Joel is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant