From b14ae554328f335cdc3322b04c965d2d81b26eda Mon Sep 17 00:00:00 2001 From: Falkan Date: Tue, 17 Mar 2026 19:04:52 -0400 Subject: [PATCH] =?UTF-8?q?docs:=20backlog=20=E2=80=94=20unit=20ID=20renam?= =?UTF-8?q?e,=20descriptions/tooltips,=20sort=20order,=20drag=20reorder,?= =?UTF-8?q?=20unsaved-form=20guard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BACKLOG.md | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/BACKLOG.md b/BACKLOG.md index 1a66873..7c81c1e 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -22,12 +22,42 @@ When creating a unit or group, allow the user to optionally supply their own ID. - If the user types into the ID field, stop auto-generating and use what they typed. - Validate: IDs must be unique and slug-safe. -### Admin: allow renaming group IDs -The group edit form currently does not expose the `id` field. Since storage is a flat -JSON file, renaming a group ID is straightforward: update `groups[].id` and rewrite -every `units[].group` reference in the same atomic save. Should also validate the new -ID is unique and kebab-safe before committing. +### Admin: allow renaming unit and group IDs +The edit forms do not currently expose the `id` field for existing units or groups. +- **Units:** straightforward — update `units[].id` and save. +- **Groups:** update `groups[].id` and rewrite every `units[].group` reference in the + same atomic `saveData()` call. + +Validate that the new ID is unique and kebab-safe before committing in both cases. + +### Admin: tooltips / descriptions for units +Allow users to attach an optional `description` string to each unit. On the front end, +show it as a tooltip when hovering over the unit name or symbol. A single `description` +field is sufficient — no need to distinguish between tooltip text and description text. + +Data shape change: add optional `description?: string` to the `Unit` type. + +### Admin: group sort order (alphabetical vs. defined) +Per-group setting controlling whether units are displayed on the front end in: +- **Defined order** — the order they appear in `units.json` (current implicit behaviour) +- **Alphabetical order** — sorted by label at render time + +Data shape change: add optional `sortOrder?: 'defined' | 'alpha'` to the `Group` type +(default: `'defined'`). + +### Admin: drag-to-reorder units within a group +Allow units to be reordered within their group via drag-and-drop in the left panel. +Order is persisted to `units.json`. Only meaningful when the group's `sortOrder` is +`'defined'`. + +### Admin: unsaved-form guard on "Add Unit" / "Add Group" +If the user is in the middle of filling out a create/edit form and clicks "+ Add Unit" +or "+ Add Group", the current form should be auto-saved before opening the new one. +If the save fails (e.g. missing required field), highlight the erroring field and block +navigation until it is resolved — don't silently discard the in-progress work. + +### Admin: "Delete" action in the bulk actions menu Add a "Delete" option to the bulk action dropdown so multiple units can be deleted at once. Should show a confirmation dialog listing the units to be deleted before -committing. Related to the immediate fix below (ungrouped bulk actions). +committing.