docs: backlog — unit ID rename, descriptions/tooltips, sort order, drag reorder, unsaved-form guard
This commit is contained in:
42
BACKLOG.md
42
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.
|
- If the user types into the ID field, stop auto-generating and use what they typed.
|
||||||
- Validate: IDs must be unique and slug-safe.
|
- Validate: IDs must be unique and slug-safe.
|
||||||
|
|
||||||
### Admin: allow renaming group IDs
|
### Admin: allow renaming unit and group IDs
|
||||||
The group edit form currently does not expose the `id` field. Since storage is a flat
|
The edit forms do not currently expose the `id` field for existing units or groups.
|
||||||
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.
|
|
||||||
|
|
||||||
|
- **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
|
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
|
once. Should show a confirmation dialog listing the units to be deleted before
|
||||||
committing. Related to the immediate fix below (ungrouped bulk actions).
|
committing.
|
||||||
|
|||||||
Reference in New Issue
Block a user