timescale.info
Sign inSign up

How OpenChronology was built

Every merged pull request of openchronology/timeline-app, its first week of commits and its releases; and before them the 2020 PureScript editor, from snapshots of its deleted repositories in the Wayback Machine. Written to this server through the HTTP API.

327 moments · 2020-03-09T00:15:08Z CE – 2026-11-02T20:11:21Z CE · by @athan · @athan

#359 · View mode opens the reader in separated views (#345)

  • timeline-app
  • pull request

Closes #345 `reading()` was `!comparison && !editable()`, so in every comparison, separations included, a moment or duration opened in the read-only editor, even in View mode. A separation is not like other comparisons: it is the open timeline itself, split into two read-only tracks. **Fix:** in a separation, `reading()` is true in View mode, and also for anyone who could not edit the timeline anyway (a guest gets the reader outside a separation, so now inside one too). Someone who can edit, with View mode off, keeps the read-only details as before, and so do other comparisons. The separated tracks' entities carry IDs qualified with the track's key (`tagged:landing`), and their moments carry the comparison's notes (`comparisonSource`, `originalTime`). So the reader reads each one as the timeline keeps it: - **Moments:** `separatedMoment` drops the key and the notes before the reader opens. Separations have no offset or scale, so the time is unchanged. - **Durations:** `openDurationById` drops the key and loads the full duration as on the whole timeline. `showDuration` finds the band on its track for the span. This keeps relationships, Share and Fit working by the entity's own ID. The marker selection keeps the track's ID, so the separated marker stays highlighted. - `src/app.ts`: `mayEditTimeline`, `reading`, `separatedMoment`, `openDurationById`, `showDuration`. - `docs/guide.md`: a sentence in *Reading a timeline*. **Tests** - `test/view-mode-browser.mjs`: in View mode, separated by a tag, the moment on the upper track opens in the reader with its tags, its plugin fields and its relationship to the duration. The duration on the lower track opens in the reader with its span and the relationship back. Then Rejoin. Before the fix this fails: the reader never opens. - `npm test` (334 pass), `npm run typecheck`, prettier on the changed files, and the full chromium browser suite (`test/browser.mjs`), including tags and relationships separation: all pass. **Overlap:** #342 (separation panel wording, in progress in another PR) is likely to change the separation panel and `docs/tags.md`. This PR changes neither (its doc change is in `docs/guide.md`) and doesn't touch `startSeparation`. `test/view-mode-browser.mjs` is also changed by my PRs for #341 and #344, in other parts of the file.

Sources

Open #359 · View mode opens the reader in separated views (#345) in the timeline