Overview
| Artifact ID: | 3277786dbe5ca2f02206a97bf5de725d37df2426f9b51183e5745b7116700574 |
|---|---|
| Ticket: | cf8bc23c0ba7438b6eeb55c7c6f53caf2b3f00b9
Kanban view for tickets, as a toggle rather than a replacement |
| User & Date: | dmestas on 2026-08-19 01:54:49 |
Changes
- icomment:
Scoping a rewrite rather than a dependency: keep Datastar as the only script, and implement the drag engine ourselves at the size our board actually needs. Sized against Morpheus's `neo-sortable.ts` (1,519 lines) by reading it, not by guessing. ## What the 1,519 lines are spent on morph reconciliation ~214 drag survives a server repaint mid-gesture FLIP animation ~180 neighbours slide rather than jump keyboard drag ~170 pick/move/drop from the keyboard + live region scroll / autoscroll ~127 edge autoscroll and scroll-into-view grid layout ~92 two-dimensional grids placeholder ~50 the gap that follows the pointer ## What a column board needs The pointer engine itself: pointer capture and move tracking, a placeholder occupying a flow slot, hit-testing which column and index the pointer is over, and committing the result. promote 115 pointerdown -> float the card, install listeners dragMoveTo 52 follow the pointer, re-target targetIndexIn 21 which slot is the pointer over finishPointer 36 drop, settle, release capture rebuildPlaceholder 27 applyPointerFloatStyles 23 items/logicalEls/idOf/itemContaining/placeItemAt/gripOf/cancel/release ~77 ---------------------------------------------------------------- CORE 351 lines So roughly 350 lines against their 1,519, before minification. Pointer Events give us mouse, touch and pen from one code path — that is why theirs works on a phone and why native HTML5 drag is not the thing to reach for. ## What we can drop, and why - **Grid (92)**: our board is columns of cards. One dimension. - **FLIP (180)**: pure polish. A CSS transition on the placeholder gets most of the feel for a few lines. - **Keyboard (170)**: the per-card status select is the primary mechanism and is already keyboard- and screen-reader-operable. Their 170 lines exist because their component must stand alone; ours does not. This is the one to revisit if the select is ever removed — it must not be. - **Morph reconciliation (214)**: the largest chunk, and we can delete it by construction. It exists because their sortable expects to live inside a server-morphed region. quarry already has the opposite rule, asserted in a test: no stateful widget inside `#fleet` or `#tl`. Put the board outside the morphed region — the same move that fixed the fleet filter being torn out mid-keystroke — and a repaint cannot land on a drag in progress. ## What we should keep beyond the core Autoscroll (~127 lines, probably less for one axis). Dragging a card to a column that is off-screen on a phone is otherwise impossible, and that is the case this feature exists for. ## Estimate ~350–450 lines of TypeScript, no dependency beyond Datastar, which wires `pointerdown` and posts the result. Drop still commits through the same op the status select uses, so the two mechanisms cannot disagree about what a move means. ## Order unchanged Board first, read-only and grouped, with the select. Then the engine. The select stays visible afterwards — it is the mechanism, not a fallback. - mimetype: "text/x-markdown"