vinterliste/frontend
Ole-Morten Duesund 51f2dcd104 fix(dnd): single-gesture drag + working keyboard, drop the handle
Two bugs in the previous DnD wiring, both stemming from the
handle-gates-dragDisabled pattern:

1. **Two-step desktop drag.** The handle's pointerdown flipped
   dragDisabled to false, but by then the gesture was already in
   progress and the library wasn't watching. Users had to click
   the handle, release, then mousedown+drag the card — two
   gestures for one action.

2. **Keyboard reorder didn't work.** svelte-dnd-action's Space-to-
   lift + arrow-keys-to-move handling is gated by dragDisabled. By
   keeping it true except during a handle-press, the library never
   processed keyboard interactions.

Fix: dragDisabled becomes a pure function of auth state. The
library's built-in distance threshold prevents accidental drags
from clicks; form controls and links inside cards aren't draggable
targets. Result:
  - Desktop: mousedown on the card, move → drag starts.
  - Touch: tap-and-drag on the card → drag starts (after threshold).
  - Keyboard: Tab to a row, Space to lift, arrows to move, Space
    to drop. Screen-reader announcements come from the library.

Plus: the drag-handle ⋮⋮ icon is gone entirely. The library
listens on the whole card, so the handle was only ever a visual
hint. `cursor: grab` on the card carries that affordance for the
~5px of weight the handle was eating.

Net diff: −12 / +18, including a small CSS adjustment to scope
`cursor: grab` to dndzone children only (so the same card style
on permalink / public-list / tag pages stays with default cursor).

Also: the public landing ("/") now sorts strictly by created_at
DESC regardless of viewer. Personal sort applies on /home but not
on the public root — the landing is the canonical newest-first
view, not the viewer's curated one.

96 tests still pass; typecheck clean; build ok.
2026-05-25 17:11:11 +02:00
..
public Design refresh: warmer palette, softer cards, badge icons, hero treatment 2026-05-25 15:47:39 +02:00
src fix(dnd): single-gesture drag + working keyboard, drop the handle 2026-05-25 17:11:11 +02:00
index.html Design refresh: warmer palette, softer cards, badge icons, hero treatment 2026-05-25 15:47:39 +02:00
svelte.config.js Scaffold Vinterliste — end-to-end encrypted winter activity list 2026-05-25 12:27:14 +02:00
tsconfig.json Public landing, owner-list links, owner-conditional semi, PWA + mobile 2026-05-25 12:57:59 +02:00
vite.config.ts Scaffold Vinterliste — end-to-end encrypted winter activity list 2026-05-25 12:27:14 +02:00