From dec4fed8099245c122a07c52a70a3b3f5ad055ee Mon Sep 17 00:00:00 2001 From: mwiegand Date: Fri, 8 May 2026 21:32:45 +0200 Subject: [PATCH] =?UTF-8?q?docs(specs):=20blueprint=20overlay=20picker=20?= =?UTF-8?q?=E2=80=94=20drag-list=20+=20add-dropdown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace per-row checkbox + numeric Order inputs with a drag-to-reorder list of selected overlays plus a native ` dropdown for adding more. Drag-to-reorder is the only reorder interaction. A ✕ button on each row removes it (returning it to the dropdown). Picking an entry from the dropdown appends it to the list (and removes it from the dropdown). + +The change is intentionally scoped small: no two-panel layout, no filter widget, no touch / keyboard reorder support, no JS-disabled fallback. The native ``. Adding via dropdown is one click; removing via ✕ is one click; reordering is one drag. +2. **Native HTML5 drag-and-drop.** No vendored library, no polyfill. Touch-screen drag is unsupported on Android and rough on iOS — accepted because the page is desktop-primary. Add and remove still work on touch via the ``. Form-submission order = DOM order. The existing `ordered_overlay_ids_from_form` handler in `routes/blueprint_routes.py` already falls back to enumerate index when no `overlay_position_` field is present, so it accepts the new shape with no Python edit. +5. **Dropdown re-sorted alphabetically on remove.** When ✕ removes a row, the corresponding ` + ← available_overlays + … + + + static/js/blueprint-overlay-picker.js + ├─ dragstart/over/leave/drop/end → reorder DOM under [data-overlay-list] + ├─ click [data-action="remove"] → remove row + sorted-insert