#618 A Show dialog hides parts of the timeline and each of its charts
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#618
- pull request
- state:merged
Builds on #617 (its commit is included here; it merges cleanly either way). **Show** in the toolbar (and in Tools on a phone) opens a dialog of switches: - **Timeline:** Moments (with summaries and stacks), Durations (bands and collapsed durations on the axis), Backgrounds, Relationships, Balances at the edges. - **Charts:** the moments chart, and each measure's chart, with a swatch of its color and the plugin that draws it, if any. Charts register themselves: the list comes from the same place the charts are drawn from (`timelineCharts()`, extracted from `renderBackgroundChart`), so any plugin whose manifest declares a `chart` gets a switch with no extra API. Switches act at once; **Show all** resets them; the button carries a count while anything is hidden. Hiding is the reader's, not the timeline's: it lives in the tab's session storage (`och:hidden-layers`, read as untrusted), applies to every timeline in that tab, and never reaches saves, exports or other readers. The stage's own layers are hidden by classes on the stage (`hide-moments`, …); charts and the balance readout are left out as they're drawn, so a hidden chart also leaves the axis picker. New: `src/layers.ts` (the switches and stored keys), `test/layers.test.mjs`, `test/layers-browser.mjs`. `pluginCharts().moments` now carries its plugin's id. Docs: guide.md (Showing and hiding parts), plugins.md. Tests: unit tests pass (apart from the local `.claude/` leftovers in contents.test); the full Chromium browser suite passes. Not included, possible follow-ups: saving what's shown into a saved view, and hiding moments by tag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/circagraph/timeline-app/pull/618
Related
Open #618 A Show dialog hides parts of the timeline and each of its charts in the timeline