Skip to content

Fit the click track to the row instead of piling it up - #628

Merged
thcp merged 1 commit into
mainfrom
fix/footer-click-track-fit
Sep 13, 2026
Merged

thcp merged 1 commit into
mainfrom
fix/footer-click-track-fit

Conversation

@thcp

@thcp thcp commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Closes #625
Closes #626
Closes #627

The transport footer ran out of width on a laptop and dealt with it by stacking the click track options into a column. This sizes the collapse to what the row is actually short, gives the volume a shape that lines up with its neighbours, and stops the loop fields cutting off their own last digit.

The collapse is measured, not a constant (#625)

footerFit had one move for the click cluster: cap the options panel at 190px and let it wrap. That is narrower than two of those controls side by side, so the wrap was a five-row column and the footer grew to about three times its height.

It now asks for exactly the pixels the row is short, floored at half the panel's inline width so it stays a two-row wrap. Past that floor the options move into a popover, opened from a disclosure beside the on/off pill. In that state the clusters spread across the row, because the popover frees more width than the row was short and the surplus used to stand as a hole before Export Mix.

Measured against the e2e fixture, gap before Export Mix:

Window Before Now
1920 524px, five-row popover state fully inline
1728 332px 20px, options inline and wrapped
1600 204px 16px, popover
1440 44px 16px, popover

One thing worth flagging for review: the panel is position: fixed, not absolute. .footer-clusters is overflow-x: auto, which computes overflow-y to auto as well, so an absolutely positioned panel gets clipped by the strip it belongs to. transport.js places it from the trigger's rect, the same shape .search-panel already uses.

The volume is a pill now (#626)

It was a 116px horizontal slider with a percentage after it, on a row of 34px pills. It is a pill beside the on/off toggle, opening a vertical fader with the level above it. Same #t-metro-vol input underneath, so prefs, the K key and the export click render are untouched.

Putting it beside the toggle rather than among the options means the level stays on the row at the widths where everything else goes behind the disclosure.

The fader uses writing-mode: vertical-rl with -webkit-appearance: slider-vertical behind it. On a browser that honours neither it stays horizontal inside the popover: smaller than intended, still working.

The loop fields fit their own value (#627)

fmtTimeMs wrote nine characters into an eight-character box, so 00:56.000 displayed as 00:56.00. They now show total seconds and drop the minutes field. parseTimecode already accepted both forms, so mm:ss.mmm still types fine.

Also in here

The standing "Groups" label went: the box beside it already carries 3+2+2 as its placeholder and explains itself in its title. "Auto (detected)" became "Auto" in all ten locales.

Testing

Full local gate. npx playwright test 171 passed, npm run test:js clean, node --check clean, ruff check and ruff format --check clean, bandit clean at medium and above, uv.lock untouched, i18n coverage clean. No Rust in the diff.

pytest has two failures, test_all_stems_zip_ogg and test_ogg_is_still_streamed. Both fail the same way on a clean checkout of main, so they are not from this branch. They look like a local ffmpeg without vorbis.

Three e2e specs moved with the behaviour rather than around it:

  • waitForClickTrack opens the popover when there is one, so the click-track specs keep driving real controls instead of ones that exist but cannot be clicked.
  • "collapsing keeps every click control visible" became "puts them one click away", plus a new test that a slightly short row keeps them inline.
  • The grouping test asserts the box's placeholder and title now that the label is gone.

The footer's only collapse for the click-track cluster capped its options
panel at a fixed 190px and let it wrap in place. 190px is narrower than
two of those controls side by side, so on a 15" laptop with the library
open the wrap was a five-row column and the footer grew to roughly three
times its height.

The width is now measured rather than written down. footerFit asks for
exactly the pixels the row is short and no more, floored at half the
panel's inline width so it stays a two-row wrap. Past that floor the
options move into a popover opened from a disclosure beside the on/off
pill, and in that state the clusters spread, because the popover frees
more width than the row was short and the surplus used to pool as a hole
before Export Mix.

The click volume was the widest single control in the cluster and the
only thing on a row of 34px pills that was neither a pill nor 34px tall.
It is now a pill of its own beside the on/off toggle, opening a vertical
fader, and it stays on the row at the widths where the rest goes behind
the disclosure.

The two loop bound fields were clipping the last digit of their own
value: fmtTimeMs writes nine characters and the box is eight wide, so
00:56.000 read as 00:56.00. They drop the minutes field and show total
seconds. parseTimecode still accepts mm:ss.mmm on the way in, so typing
is unchanged.

Also gone: the standing "Groups" label, whose box already carries the
same text as a placeholder, and two dead characters in "Auto (detected)".
@thcp
thcp marked this pull request as ready for review September 13, 2026 17:29
@thcp
thcp merged commit 39795fc into main Sep 13, 2026
10 checks passed
@thcp
thcp deleted the fix/footer-click-track-fit branch September 13, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant