Sub-tabs within records sections (e.g. Banking: Standard / Online / Credit Union) #18

Closed
opened 2026-11-22 00:19:03 +00:00 by eric · 0 comments
Owner

Goal

Let the owner split a records section (e.g. Banking) into user-defined sub-tabs, such as Standard, Online and Credit Union, and sort records into them. A record created in the wrong sub-tab can be moved to the right one, like the existing up/down move.

Design (agreed)

  • Sub-tabs under the section title: Standard | Online | Credit Union | + Add.
  • Scope: records sections only for now.
  • Model: keep the single records array. Add an optional subsections: [{id, title}] to the section and an optional subsection id on each record. Ids stay unique across the document. Sub-tabs are optional per section, so a section without them looks as it does today.
  • Unassigned records: show under an automatic first tab (a catch-all, renamable; exact name to confirm).
  • Moving: a "Move to…" dropdown per record in edit mode, which changes its subsection id. Up/down ordering is unchanged and works within a tab.
  • Edit mode: add, rename, reorder and delete sub-tabs. Deleting a tab that still has records is blocked or offers to move them.
  • Add record: adds to the currently selected tab.
  • Collapse all / Expand all: applies to the current tab only.
  • Print: each sub-tab prints as a subheading within the section.
  • Compatibility: this is a schema change, so older builds can't open files saved with sub-tabs (forward-only upgrade path, as with images and sequences).

Tasks

  • model.js: schema and validate()
  • ops.js: add/rename/move/remove sub-tab, move record between tabs, delete-tab handling
  • app.js: tab bar in view and edit, Move-to control, per-tab fold bar
  • print.js / print doc: subheadings
  • style.css: tab styles, including print
  • Tests for model, ops and print helpers
  • docs/MAINTENANCE.md and OVERVIEW.md
## Goal Let the owner split a records section (e.g. Banking) into user-defined sub-tabs, such as Standard, Online and Credit Union, and sort records into them. A record created in the wrong sub-tab can be moved to the right one, like the existing up/down move. ## Design (agreed) - **Sub-tabs** under the section title: `Standard | Online | Credit Union | + Add`. - **Scope:** `records` sections only for now. - **Model:** keep the single `records` array. Add an optional `subsections: [{id, title}]` to the section and an optional `subsection` id on each record. Ids stay unique across the document. Sub-tabs are optional per section, so a section without them looks as it does today. - **Unassigned records:** show under an automatic first tab (a catch-all, renamable; exact name to confirm). - **Moving:** a "Move to…" dropdown per record in edit mode, which changes its `subsection` id. Up/down ordering is unchanged and works within a tab. - **Edit mode:** add, rename, reorder and delete sub-tabs. Deleting a tab that still has records is blocked or offers to move them. - **Add record:** adds to the currently selected tab. - **Collapse all / Expand all:** applies to the current tab only. - **Print:** each sub-tab prints as a subheading within the section. - **Compatibility:** this is a schema change, so older builds can't open files saved with sub-tabs (forward-only upgrade path, as with images and sequences). ## Tasks - [ ] `model.js`: schema and `validate()` - [ ] `ops.js`: add/rename/move/remove sub-tab, move record between tabs, delete-tab handling - [ ] `app.js`: tab bar in view and edit, Move-to control, per-tab fold bar - [ ] `print.js` / print doc: subheadings - [ ] `style.css`: tab styles, including print - [ ] Tests for model, ops and print helpers - [ ] `docs/MAINTENANCE.md` and `OVERVIEW.md`
eric closed this issue 2026-11-22 00:32:11 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eric/final-wishes#18
No description provided.