Repository navigation
Embed: hide the time readout everywhere and the overview in small frames - #422
Merged
Merged
Conversation
The readout's width follows the data ("0.0–10.0 s" is 10 characters,
"2330.0–2338.0 s" 15, clock mode 17), so above 560 px a long one could
wrap the toolbar onto another row mid-session and shrink the fitted plot
by about 44 px. The time axis already labels the window, so the embed
now hides the readout at every width (still read by screen readers).
Fixes the invariant that no line of a fit viewer's chrome changes height
between renders.
Tested: Chromium and WebKit, 360 to 1200 px: toolbar height identical
with the real, a 15-character and a clock-mode readout; the toolbar is
one row from 640 px (two before).
At 560 px wide or less the recording-wide event map under the scrubber is hidden; its ticks blur together at that width and the scrubber still moves through the recording. It needs !important because viewer.ts sets its display inline once the overview loads. Each render redraws it, so a frame widened past 560 px gets it back at full width. Tested: Chromium and WebKit; 360 x 480 plot 223 -> 273 px (WebKit 230 -> 280), no document scroll at 360 to 800 px, and resizing 360 -> 800 shows the strip again with a 784 px bitmap.
Deploying nemar-website with
|
| Latest commit: |
d653846
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://814de998.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-421-embed-read.nemar-website.pages.dev |
The Hide bad count (" · N hidden") was cleared when each render began
and appended after the window read landed. In a fitHeight viewer that
flip could wrap and unwrap the toolbar every render, and each wrap moved
the fit and started another render: at 360 x 480 the review of #422
measured up to 20 renders per page step in Chromium, and 195 height
flips with a 34 px scrollbar on 130 of 1105 frames in WebKit. The count
now comes from the montage rows in view and is written once, before the
read, with the same all-bad guard as reject mode.
Tested: the review's reproduction (5 bad channels, Hide bad, six page
steps at 360 x 480): one render per step, no height flips, no document
scroll, in Chromium and WebKit; the readout reads "all 64 · 5 hidden".
From the review of #422: - viewer.ts sets the overview strip's inline display to "" rather than "block" once it loads, handing display back to the stylesheet, so the embed hides it in small frames with an ordinary rule. - The degraded-pyramid note and status suffix name the zoom levels ("Some zoom levels failed to load"), not an overview that small frames no longer show. - Comments: the readout grows with the window's start, not only past 1000 s; the channel readout stays and why; the small-frame lead now lists the overview strip; the strip's annotation ticks and preload bar go with it. CHANGELOG lines match. Tested: lint, typecheck, 2989 unit tests; overview hidden at 560 px or less and back at its new width on resize, in Chromium and WebKit; the dataset page's overview still shows (display block, 1110 px).
The channel readout changes on any reader action on the channels, not only zoom and Hide bad; the pre-fix scrollbar showed in both engines.
This was referenced Oct 5, 2026
neuromechanist
added a commit
that referenced
this pull request
Oct 5, 2026
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #421. Part of #410: feedback on the 360 x 480 preview asked for the overview strip to go too.
Changes
0df1bb7). Embed: two-row toolbar in narrow frames #420 hid it only at 560 px or less. Above that, the readout's width followed the data: "0.0–10.0 s" is 10 characters, "2330.0–2338.0 s" is 15, and clock mode is 17. A long readout could wrap the toolbar onto another row mid-session and shrink the fitted plot by about 44 px. The time axis already labels the window, and the readout stays in the accessibility tree. The rule moves out of the@media (max-width: 560px)block unchanged.b0f1a40). This is the recording-wide event map under the scrubber. At that width its event ticks blur together, and the scrubber still moves through the whole recording. The rule needs!importantbecauseviewer.tssets the strip'sdisplayinline once the overview loads. Every render redraws the strip, so a frame widened past 560 px gets it back at its new width.The dataset page is unchanged; every rule is under
.embed__viewer. The shared viewer only has a comment updated.Measurements
on007753,?view=sub-05_task-BCCWJreading, againstbun run dev.The toolbar height was measured three ways: with the readout's real text, with "2330.0–2338.0 s", and with "12:00:00–12:00:10" injected.
With the readout visible, the #421 review measured 760 px going from 44 to 88 px with the long text, and 700 px from 88 to 98. From 640 to 760 px the toolbar is now one row, where it was two before.
Overview strip and plot height:
Tests
bun run lint,bun run typecheck(0 errors),bun run test(2989 passed)Review (1 reviewer) and fixes,
64f4ac0and922967364f4ac0computes the count from the channels in view and writes the readout once, before the read. Re-running the reviewer's reproduction (5 bad channels, Hide bad, six page steps at 360 x 480): one render per step, 0 height flips and 0 px document scroll, in Chromium and WebKit. The readout reads "all 64 · 5 hidden". This is a shared-viewer change, so the dataset page gets it too; there it only stops the count from blinking.!importantwas avoidable.viewer.tsnow sets the strip's inlinedisplayto"", not"block", once it loads. The stylesheet'sdisplay: blockapplies, and the embed's rule (specificity 0,2,0) beats it with no!important. The dataset page's overview still shows (computedblock, 1110 px wide).The channel readout still changes width when the reader zooms the channels past channel 100 or hides bad channels. That is a reader action, and it settles in one refit. The comment says so, and the readout stays because nothing else shows which channels are in view.
Re-review of the fixes (same reviewer): clean
n < visible.lengthcannot occur.win.channelsis sliced from the samechannelsByRowrows asvisible(store.tsreadLevel0andreadViewLevel).display: "":block, 1110 px.none,none,block,block, and it is redrawn when the frame widens.