fix(player): stop the seek bar resizing as its clocks count #75

Closed
logan wants to merge 0 commits from fix/seek-bar-clock-width into main
Collaborator

Closes #13.

Two different things moved the bar and they need different answers:

  • Digit width. In a proportional font 1:11 is narrower than 4:08, so the bar breathed once a second. font-variant-numeric: tabular-nums fixes that.
  • Character count. It changes at the hundredth minute, and whenever the right-hand clock is toggled to remaining and grows a minus sign. A figure width cannot fix that, so each clock reserves the widest string this track can put in it (--yj-clock-chars, set per render from the duration).

The budget is per track rather than a constant because reserving six characters on every track would push the slider in by a character at each end to buy nothing.

Test. transport.test.ts — "keeps the slider still as the clocks count" measures the slider’s rect across three positions and the toggle. On main it fails with 4.5px of drift; here it is stable. make ui-visual on the suite still matches the stored seek-bar screenshot.

Closes #13. Two different things moved the bar and they need different answers: - **Digit width.** In a proportional font `1:11` is narrower than `4:08`, so the bar breathed once a second. `font-variant-numeric: tabular-nums` fixes that. - **Character count.** It changes at the hundredth minute, and whenever the right-hand clock is toggled to *remaining* and grows a minus sign. A figure width cannot fix that, so each clock reserves the widest string **this track** can put in it (`--yj-clock-chars`, set per render from the duration). The budget is per track rather than a constant because reserving six characters on every track would push the slider in by a character at each end to buy nothing. **Test.** `transport.test.ts` — "keeps the slider still as the clocks count" measures the slider’s rect across three positions and the toggle. On `main` it fails with 4.5px of drift; here it is stable. `make ui-visual` on the suite still matches the stored seek-bar screenshot.
logan added 1 commit 2026-08-18 15:04:44 +00:00
fix(player): stop the seek bar resizing as its clocks count
CI / check (push) Skipped
CI / e2e (push) Skipped
CI / check (pull_request) Successful in 2m28s
CI / e2e (pull_request) Successful in 6m16s
d6b48fb3ac
Two different things moved it and they need different answers. Digits
in a proportional font are different widths, so 1:11 is narrower than
4:08 and the bar breathed once a second -- tabular figures fix that.
The character *count* changes too, at the hundredth minute and whenever
the right-hand clock is toggled to remaining and grows a minus sign,
which a figure width cannot fix -- so each clock reserves the widest
string this track can put in it.

The budget is per track rather than a constant: reserving six
characters on every track would push the slider in by a character at
each end to buy nothing.

Measured in the component tier: 4.5px of drift across three positions
before, none after.

Refs #13
Author
Collaborator

Rolled into #83 and closed here — the commit is preserved as a merge on that branch, so it lands with its authorship and this PR's diff intact.

Batched deliberately: release.yml cuts a release on every push to main, so merging these one at a time would produce seven or eight releases for one afternoon of small fixes. #83 is one push and therefore one version.

The full gate was run against the combined tree rather than per branch: make lint (3 configs), make test (3 configs, -race), make ui-test (836), make e2e chromium (114), plus bindings/skill/commit checks.

Rolled into #83 and closed here — the commit is preserved as a merge on that branch, so it lands with its authorship and this PR's diff intact. Batched deliberately: `release.yml` cuts a release on **every** push to `main`, so merging these one at a time would produce seven or eight releases for one afternoon of small fixes. #83 is one push and therefore one version. The full gate was run against the combined tree rather than per branch: `make lint` (3 configs), `make test` (3 configs, `-race`), `make ui-test` (836), `make e2e` chromium (114), plus bindings/skill/commit checks.
logan closed this pull request 2026-08-18 15:44:23 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.