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

#385 · Pull request change lists show times as the timeline displays them

  • timeline-app
  • pull request

Fixes #384 A pull request's **Changes** list printed each moment's raw stored time. Now each added, removed or changed moment (and duration) reads in the timeline's own time display, as its reader shows it. **Before:** `Added: Trick or treat · -1393545600/1` **After:** `Added: Trick or treat · 1925-11-04 CE` (hover: `-1393545600/1`) A changed time: `Changed: Moved · 1970 CE → 1925-11-04 CE`; a duration: `Added duration: Span · 1925-11-04 CE – 1970 CE`. ## What changed - **Server** (`server/collaboration.mjs`): the change summary gives each example `times: { before, after }`, written by the timeline's presentation with `printEntityTime` (new, `src/presentation.ts`; the reader's `alone` form). When the pull request changes the presentation, old times use the base's and new times the proposal's. Unreadable settings fall back to exact times. It also sends `durationExamples` (first 30 of each change), with start – end; an end anchored to a moment reads "the time of moment …", as that revision's moment times aren't at hand. - **Shared wording** (`src/wording.ts`): `changeText` and `exactTimeText`, so the website and the editor say the same thing; a changed time reads old → new. - **Website** (`platform/components/pull-review.jsx`): uses them, with the exact times as the summary's `title`, and lists durations too. - **Editor** (`src/community-ui.ts`): the pull request dialog had the same problem (`… at -1393545600/1`); it now uses the same lines, with ID and exact times on hover, and writes the times with the open timeline's display for older servers that send none. - API schema (`server/openapi/collaboration.mjs`) and `docs/collaboration.md` updated. No emails, notifications or other API text summarize proposals, so nothing else printed these times. ## Tests - `test/collaboration.test.mjs`: Gregorian dates, years, millions of years, the default display, a custom script, invalid settings, durations, old → new, a changed presentation, and older servers' exact times. - `test/pull-history-postgres.mjs`: the same from saved history (Gregorian, years, a pull request changing the display, durations). - `test/next-postgres.mjs`: the rendered review page shows `Added: Trick or treat · 1925-11-04 CE` with the exact time as its title. `npm test`, `npm run typecheck`, `npm run build`, and the pull-history, next and versioning PostgreSQL tests pass locally.

Sources

Open #385 · Pull request change lists show times as the timeline displays them in the timeline