#548 Separate by several groups of tags, from a list with a tag picker
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#548
- pull request
- state:merged
Several separations at once, managed from a list with a searchable tag picker. ## What it does - **The button stays:** **Separate by tags** stays in the toolbar while separated. A small count chip shows how many separations are active. - **The dialog** lists the active separations. Each one shows: - its tags as chips, each with a **×** to remove it; - an **Add tags ▾** combobox, which opens a panel with a search box and a multi-select list of the timeline's tags with their counts (an exact match first); - the typed tag itself, offered as **Add "…"** when no event has it yet, after any matches so Enter picks a match; - keyboard support: arrow keys and Enter choose, Escape closes the picker without closing the dialog. - **Managing separations:** **+ Add a separation** adds one (up to seven, since a comparison has eight tracks), **Remove** takes one away, and **Separate** applies them all. **Rejoin all** returns to the whole timeline. - **Tracks:** each separation is a track of the events carrying any of its tags, in the order listed. The last track holds everything else, meaning events with none of the separated tags. An event with tags from two separations shows in both. - **Relationship arcs** stay exact across any number of tracks: - each separated track's answer marks which ends are on it; - an end is drawn on the first track that has it, otherwise on the last; - each arc is drawn once. - **Default views** may be several separations, `{"separation": {"groups": [["war", "siege"], ["trade"]]}}`, two to seven groups. One separation is still `{"tags": [...]}`. The format is validated in the core and described in OpenAPI. - **Reloads:** a tab's stored separation from before is read back as one group. - **Separation by relationships** (Separate related / Separate all connected) still works. The dialog shows it, and separating by tags replaces it. ## Tests - **Browser:** `npm run test:browser` passes, 30 groups. - `tags-browser` adds coverage for the picker (counts, search, the exact match, Add "…", chips and ×, Escape) and for two separations: three tracks, the count chip, editing and removing one, and Rejoin all. - A shared `separateBy(page, ...groups)` helper replaces the old dialog steps in the time-map, view-mode, follow, relationships, desktop-cache and separated-arcs tests. - **Unit:** groups in default views (validation, `sameSeparation`, the helpers) and stored tab state. - **`npm test`:** passes apart from `contents.test.mjs`, which fails locally with git `ENOBUFS`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/548
Related
Open #548 Separate by several groups of tags, from a list with a tag picker in the timeline