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

#207 · Offline editions, starting with CFAM at openchronology.github.io/cfam (#197)

  • timeline-app
  • pull request

Closes #197. Adds **offline editions**: the same offline editor, with its own defaults for new timelines. The first is **CFAM**. ## CFAM New timelines, both the one the file opens with and those made with **New**: - have the **Causal factor analysis** suite (Moment stacks, Moment shapes, Moment colors) installed and enabled; - show **Gregorian** dates, in the computer's UTC offset at the time the timeline is made; - open on the **fortnight around today** instead of around 0. This applies to an empty Gregorian timeline, so it also covers New. Files you open or import keep their own plugins and time display. The chip beside the brand reads **Offline · CFAM**, and its tooltip describes the edition. ## How it fits together - **`src/editions.ts`** holds `EDITIONS` (ID, name, description, suites, Gregorian or not), `blankDocument(edition, offset)` and `aroundToday(now)`. In `app.ts`, the four copies of the empty-timeline literal now call `blankDocument`. An empty CFAM timeline opens through `openingView`. - **`scripts/offline.mjs`** builds the general file, then `dist/openchronology-offline- .html` for each edition. It reads the IDs from `src/editions.ts` itself, by bundling it, so adding an edition takes no other build change. The edition reaches the bundle as `__EDITION__`. - **Pages** (`pages.yml`) publishes each edition at `openchronology.github.io/ /index.html`, beside the existing index page, in the same single commit. That makes `https://openchronology.github.io/cfam/` live on the first push to main after merge. - **Releases** attach `openchronology-offline-*.html`, and so do CI's offline artifacts. - **Download page:** a card per edition with its description, a link to its page on openchronology.github.io, and the release file. The file link appears once a release has the file, so it never points to a 404 before the next release. ## Tests - `test/editions.test.mjs` (new): the general file's blank timeline is unchanged; CFAM's has the suite enabled and Gregorian dates in the given offset (clamped to ±1439 minutes); edition IDs are fit for a file name; and the fortnight is centred exactly on now. - `test/offline-browser.mjs` opens the CFAM file from `file://`. It checks the chip, that the view is a fortnight centred within ten minutes of now, the Gregorian bound label, the three plugins installed and enabled, and that it makes no network calls. - `test/releases.test.mjs` checks the edition file and page names. `test/next-platform.mjs` checks that the download page links the CFAM page and has no file link while the release lacks one. - Locally: `npm test` (299 pass), typecheck, Prettier, and both offline files build. Playwright's Chromium isn't installed on this machine, so CI runs the browser and platform checks.

Sources

Open #207 · Offline editions, starting with CFAM at openchronology.github.io/cfam (#197) in the timeline