Services & products: set the shop order by dragging the list #30

Merged
reudy merged 1 commit from session/add-service-priority into main 2026-11-10 12:14:28 +01:00
Member

What

Follow-up to #29: you set the shop order on the Services & products list itself instead of typing a priority into each item.

  • Drag a row by its ⠿ handle (mouse or touch), or focus the handle and press ↑/↓. Then Save order.
  • While the new order is unsaved, a sticky bar shows Undo / Save order, and leaving the page asks first.
  • ?/reorder turns the order into items.priority values n…1 (first = highest) and writes only the items whose priority changed. Items added meanwhile (e.g. in another tab) go after the list.
  • New items go to the end of the order (lowest priority − 1).
  • The Priority in the shop field is gone from the item form, and so is the "Priority N" note in the list. Editing an item no longer touches its priority.
  • The item page's error banner is now SaveStatus: "Order saved." fades out, and errors stay.

Nothing changes on the shop side: Shop blocks still sort by items.priority.

Tested

  • svelte-check (admin): 0 errors, with the same 16 warnings as main, none in this page.
  • In the running stack with Playwright, at 1280 px:
    • Mouse drag of the last row to the top works, and the bar appears.
    • Undo restores the order and hides the bar.
    • ↑/↓ on a handle moves the item, and focus stays on it.
    • Save shows "Order saved.", the order survives a reload, and the public shop shows the same order.
    • A newly created item lands at the end.
  • At 390 px with touch: dragging a handle moves the row, and nothing scrolls sideways.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HA82gWt7pNdAsocjxujY3m

## What Follow-up to #29: you set the shop order on the *Services & products* list itself instead of typing a priority into each item. - Drag a row by its ⠿ handle (mouse or touch), or focus the handle and press ↑/↓. Then **Save order**. - While the new order is unsaved, a sticky bar shows **Undo** / **Save order**, and leaving the page asks first. - `?/reorder` turns the order into `items.priority` values n…1 (first = highest) and writes only the items whose priority changed. Items added meanwhile (e.g. in another tab) go after the list. - New items go to the end of the order (lowest priority − 1). - The *Priority in the shop* field is gone from the item form, and so is the "Priority N" note in the list. Editing an item no longer touches its priority. - The item page's error banner is now `SaveStatus`: "Order saved." fades out, and errors stay. Nothing changes on the shop side: Shop blocks still sort by `items.priority`. ## Tested - `svelte-check` (admin): 0 errors, with the same 16 warnings as `main`, none in this page. - In the running stack with Playwright, at 1280 px: - Mouse drag of the last row to the top works, and the bar appears. - Undo restores the order and hides the bar. - ↑/↓ on a handle moves the item, and focus stays on it. - Save shows "Order saved.", the order survives a reload, and the public shop shows the same order. - A newly created item lands at the end. - At 390 px with touch: dragging a handle moves the row, and nothing scrolls sideways. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HA82gWt7pNdAsocjxujY3m
agent added 1 commit 2026-11-10 12:11:19 +01:00
Priority is no longer a number typed per item. The list is the shop's
Recommended order: drag a row by its handle (touch too), or focus the
handle and press up/down, then Save order. ?/reorder renumbers the
priorities n..1 and writes only the ones that changed. New items go to
the end. Unsaved order: a sticky Save/Undo bar, and a warning before
leaving the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gWt7pNdAsocjxujY3m
reudy merged commit 436e71a103 into main 2026-11-10 12:14:28 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: reudy-net/domaino#30
No description provided.