circagraph
Sign inSign up

openchronology/timeline-app on GitHub

The OpenChronology repository on GitHub, mirrored by och-import-github: issues and pull requests as durations (ongoing while open), what happened to them as moments, plus releases, milestones, commits and branches. The Branches view shows the most recently active branches each in a track of its own.

Source: https://github.com/openchronology/timeline-app

3,131 moments · 2026-10-05 CE 20:21:49 UTC – 2026-11-16 CE 12:10:45 UTC · by @athan · @athan

#582 Measures: totals on summaries, values on hover cards, and plugins (#575)

–

  • github
  • github/openchronology/timeline-app
  • github/openchronology/timeline-app#582
  • pull request
  • state:merged

Closes #575, part 4 of #570. Stacked on #577–#581: until they merge, this diff includes their commits. Overview groups carry their measures' totals in every edition (#574). This PR shows them and lets plugins use them. ## Showing them - **Summaries:** - A label says what it holds, then up to two totals, each labelled and printed as its measure prints totals: `3 moments · Cost $21.50`. - The tooltip and the accessible name list all of them. - Separated tracks show their own totals. - Comparisons of several timelines show none, because each timeline declares its own measures. - **Single events:** hover cards list their values, as the reader does (#578). Server and desktop overviews now carry a marker's `measures` (up to 1 KiB) when a plugin is enabled, as they carry other plugin metadata. This also covers what #578 left for here. ## Plugins - **Scripts:** `api.measure(name)` reads a moment's value exactly. Scripts can compare it with `rational`, `compare`, `add`, `sub`, `mul` and `div`, the formatter language's exact arithmetic. - **`sizeBy: { "measure": "cost" }`:** sizes markers and summaries by their total, relative to the largest in view, in thirds: small, medium, large. - **Background chart:** `{ "kind": "measure", "measure": "cost" }` draws a measure's totals across the view instead of the count. Totals below zero count as zero, and a measure chart has no series. ## Tests - `test/measure-plugins.test.mjs` covers manifest validation, `api.measure` with exact comparisons, and projections. - The browser check now confirms that a summary's label and accessible name show `Cost $21.50`. I ran it locally in Chromium. - `npm test` passes, apart from the known local `contents.test`. Docs: `plugins.md` (measure charts, `sizeBy`, script methods) and `measures.md` (how totals are shown). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/circagraph/timeline-app/pull/582

Related

Open #582 Measures: totals on summaries, values on hover cards, and plugins (#575) in the timeline

#582 Measures: totals on summaries, values on hover cards…