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

#272 · Fit a duration in the view, from its menu or its details (#268)

  • timeline-app
  • pull request

Closes #268. - **Right-click (or long-press) a duration:** the menu now offers **Fit in view** to anyone who can see the duration, not only editors. - **The duration's details panel and the read-only reader** both get a **Fit in view** button beside Share. - **The view** spans the duration with the same margin as **Fit all** (`Viewport.fit`: 40 % beyond its length, split between both sides). `fitDuration` looks for the duration's band in the current window first, including a comparison's, then in the document. It does nothing for a duration it can't find. ## Tests - `test/duration-backgrounds-browser.mjs`: right-click the 100–200 duration, choose **Fit in view**, and the view spans 80–220, give or take the rounding to whole pixels. - `test/summaries-browser.mjs`: the duration menu's item list includes **Fit in view**. - `npm test` passes. `test/browser.mjs` passes in Chromium and Firefox. In WebKit it hit the known flaky drafts check (#271) before reaching these tests.

Sources

Open #272 · Fit a duration in the view, from its menu or its details (#268) in the timeline