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

#328 · Moment shapes 3: an ellipse shape for ECF conditions

  • timeline-app
  • pull request

## What changed Adds an `ellipse` shape to the official **Moment shapes** plugin: a horizontal oval, as wide as the moment's size and about three-fifths as tall, like the condition ovals of an Events and Causal Factors chart. It draws like the other shapes (an SVG fill with the white border in front, and a `--marker-clip` of `ellipse(50% 30% at 50% 50%)` that shapes the hit area and crops an icon to the oval), on moments and stack entries, in the shape selector, at every Moment size, with Moment colors and Moment icons. ### Versioning The shape list has been host vocabulary shared by every version, so adding the name alone would have changed what pinned versions draw. Instead: - A new optional manifest property, `shapes`, lists the shapes added after the first twelve that a plugin draws (only `"ellipse"` for now). The manifest parser validates it: a non-empty list of distinct added shapes. - **Moment shapes version 3** is version 2 plus `"shapes": ["ellipse"]` (and "conditions" in its description). Versions 1 and 2 are unchanged and stay in the built-in list, so pinned definitions still validate and are still official. - A timeline pinned to version 1 or 2 treats a stored `shape: "ellipse"` as an unknown shape: it draws a circle, the selector shows Circle with no Ellipse option, and the stored value is kept until someone picks another shape. - The rule is general. A custom plugin's shape field, shape marker or `api.shape("ellipse")` (including a literal effect string) draws the ellipse only when its manifest lists it. Documented in `docs/plugins.md`, under Moment shapes and in the UI capability API list. Closes #324. ## Testing - Unit (`test/plugins.test.mjs`): version 3 and its `shapes`; versions 1 and 2 round-trip validation, stay official, and draw a stored ellipse as a circle while keeping the value through a document round trip; scripts and declarative custom markers opt in through `shapes`; invalid `shapes` values are refused. `npm test` passes, including the contents/README check. - Browser (`test/ellipse-shape-browser.mjs`, run by both `test/browser.mjs` and `test/offline-browser.mjs`): fill color, white border, oval wider than tall, clip path; small, medium and large sizes; an icon in a large ellipse, centred, filling the marker inside its border and clipped to the oval; a stack entry and its selector; a scripted plugin; and the version 2 fallback. Run with Chromium, Firefox and WebKit, online and against the offline single-file build. I also checked screenshots of every size, with and without icons, next to the terminator. - `tsc --noEmit` and `prettier --check` on the changed files.

Sources

Open #328 · Moment shapes 3: an ellipse shape for ECF conditions in the timeline