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

#38 · Wait for the fitted view before typing bounds in the summaries test

  • timeline-app
  • pull request

Fixes the intermittent Firefox failure on #37 (`summaries-browser.mjs:27`, `'-200/1' !== '0'`). **Cause:** importing a timeline fits the view synchronously but writes the bound fields on the next render. The test waited for the title plus one animation frame, then typed a left bound. When Firefox ran the app's render after that frame, the render, a genuine navigation to the fitted view, replaced the typed bound. The app behaves as intended: re-renders keep unapplied typing, while navigation rewrites it. **Fix (test only):** after importing, the helper computes the fitted view with the app's own `Viewport.fit` over the document's moments. It then waits until the exact bound fields (`#exact-left` and `#exact-right`, written in the same pass as the bounds) show it. The wait doesn't depend on the display format and returns as soon as the render has happened. **Testing:** `browser.mjs` and `offline-browser.mjs` pass locally in Chromium and Firefox, and the Firefox offline suite passed four further runs in a row.

Sources

Open #38 · Wait for the fitted view before typing bounds in the summaries test in the timeline