Skip to content
quarry Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2dfb47f4dcbb5018c68ea764078cca453c57be7a1c5e1a993db9cd541fb88623
Ticket: cf8bc23c0ba7438b6eeb55c7c6f53caf2b3f00b9
Kanban view for tickets, as a toggle rather than a replacement
User & Date: dmestas on 2026-08-19 01:50:50
Changes

  1. icomment:
    Correcting my own correction. The previous comment said native drag does not fire from touch, so a drag board would be unusable on a phone. That is true of the native HTML5 drag API and IRRELEVANT to Morpheus, which does not use it.
    
    Checked the source rather than assuming this time. `neo-sortable.ts` contains **zero** references to `dragstart`, `dragover`, `dataTransfer` or `draggable`. It is built entirely on Pointer Events — `pointerdown`, `pointermove`, `pointerup`, `pointercancel`, with `setPointerCapture` — which unify mouse, touch and pen. It works on a phone because it never touches the API that does not.
    
    That is also most of why it is 52 KB: it implements the drag engine instead of delegating to a browser API that would have been free but mouse-only.
    
    ## The actual trade, restated
    
    - **Datastar alone** can bind any event, but it wires handlers; it cannot BE a drag engine. Reaching for drag with Datastar alone means the native HTML5 API — which is the mouse-only one. So Datastar-only drag is mouse-only, and the touch objection lands on THAT plan, not on Morpheus.
    - **Touch-capable drag** needs a pointer-event drag engine: position tracking, a placeholder occupying a flow slot, drop hit-testing, autoscroll, and pointer capture. That is the 52 KB, and writing our own would be rediscovering it.
    
    I also overstated the cost earlier as 413 KB. That is the full bundle of all 48 components. `neo-sortable` imports only `command`, `internal-state` and `neo-morph-resilient` (5.9 KB of source between them), and the project builds per-component with esbuild, so a targeted build is a fraction of the bundle. The real figure needs measuring, not quoting.
    
    ## What this changes
    
    The choice is no longer "drag or no drag". It is:
    
    1. **Native DnD via Datastar** — no new script, mouse only. The status select stays the mechanism for touch and keyboard.
    2. **Vendor neo-sortable** — touch and keyboard both work, at the cost of a second script and a dependency on a project at 21 stars and open alpha.
    
    Option 1 is still the right first move, because the board is worth having before either kind of dragging and the select is needed regardless. But option 2 is a much better proposition than the previous comment implied, and the deciding question is the dependency, not the capability.
    
  2. mimetype: "text/x-markdown"