Commit 9260716
committed
feat(app): touch-capable sidebar block/folder reorder via dnd-kit
The block sidebar's drag (reorder blocks, move them between folders, reorder and
nest folders) used native HTML5 drag, which doesn't fire on touch — so none of
it worked on tablets, phones, or the Steam Deck. Migrate the input layer to
dnd-kit (PointerSensor → mouse + touch): each row is a draggable + droppable, a
DragOverlay shows the lifted item, and a per-row grip is the only drag activator
(so a tap to open a block or a scroll of the list still works).
The drop computation mirrors the old pointer rules (reorder before/after a block
by half, reorder-vs-nest a folder by the top sliver) and reuses the existing,
tested mutation helpers (dropBlockAt / moveToGroup / dropFolderBefore / moveGroup),
so the data logic is unchanged — only the input changes.
Verified by mouse and touch: reorder within a folder, tap-to-open still works,
desktop and the mobile drawer both render the grips. Closes #39.1 parent 5f5ef8f commit 9260716
1 file changed
Lines changed: 278 additions & 132 deletions
0 commit comments