You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(dnd): show clear landing position while dragging a block
A palette drag gave no signal about where the new block would land,
and closestCenter routinely picked the tall surface droppable over
the block under the cursor — so most drops appeared to append at
the end regardless of where the user aimed.
- Add a primary-colored insertion bar (with a leading dot caret)
above the targeted row, plus an end-of-list bar past the last
block. Surface gets a dashed primary outline + soft tint while
a palette drag is in progress; the empty-state copy switches to
"Drop to add block / Release to insert it here."
- Replace closestCenter with a pointerWithin-first strategy that
prefers the block under the cursor and falls back to closestCenter
so the surface still resolves as the end-of-list target.
- Reorder feedback is unchanged — verticalListSortingStrategy's
row shift is already a strong cue, so the bar is gated on
palette drags only.
Also dedupe react/react-dom in demo/vite.config.ts so the local
demo (which aliases the library to ../src) doesn't pull two copies
of React and crash with "Invalid hook call."
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments