Repository navigation
Embed: two-row toolbar in narrow frames - #420
Merged
Merged
Conversation
At 560 px wide or less, the embed hides the time readout (the plot's time axis already shows the window; screen readers still get the text) and tightens the spacing between toolbar groups. A 360 x 480 frame's toolbar goes from three rows (108 px) to two (67 px), and the plot grows from 182 to 223 px in Chromium and from 189 to 230 px in WebKit. Measured from 320 to 800 px wide: two rows or fewer at every width, and the document never scrolls. The dataset page is unchanged. Tested: lint, typecheck, 2989 unit tests; width sweep in Chromium and WebKit against bun run dev.
Deploying nemar-website with
|
| Latest commit: |
db427be
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6d77d7de.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-embed-compact-toolba.nemar-website.pages.dev |
Review of #420: the group-spacing rule also matched the gear popover's groups and indented three of them by 8 px; it now selects only the toolbar's direct groups. The same leak, from phase 1, hid the popover's captions ("Filter (Hz)", "Next moves through", ...) in narrow frames; those are back, paid for with tighter popover spacing so the open popover still fits a 360 x 480 frame. Comments and the CHANGELOG line now say what each rule buys, and that the two-row claim is for a recording with one channel group. Tested: lint, typecheck, unit tests; popover group padding 0 at 320 to 800 px, toolbar unchanged (67 px at 360), no document scroll at 360 x 480 with the popover open, Chromium and WebKit.
This was referenced 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.
Part of #410 (feedback on the 360 x 480 preview: the toolbar took three rows and squeezed the plot).
Change
In the embed's existing
@media (max-width: 560px)block, which already hides the group captions:--space-3to--space-2. Without this the second row is a few pixels too wide for the gear.viewer.tsgives the time readout a modifier class (eegv__readout--time), so the rule can target it and not the channel readout. Nothing else in the shared viewer changes, and the dataset page is untouched (every rule is under.embed__viewer).Measurements
on007753,?view=sub-05_task-BCCWJreading, againstbun run dev, the same build with and without the CSS:From 320 to 800 px wide the toolbar takes two rows or fewer in both engines, and the document never scrolls. From 400 to 560 px the readout used to fit in two rows. It is hidden there too: one breakpoint, and a longer readout late in a long recording ("2330.0–2338.0 s"), or in clock mode, would wrap it to three rows at those widths.
Tests
bun run lint,bun run typecheck(0 errors),bun run test(2989 passed)Review (1 reviewer, small CSS change) and fixes,
db427be.eegv__toolbar > .eegv__group + .eegv__grouponly. Popover group padding measured0at 320, 360, 560 and 800 px in Chromium and WebKit.viewer.ts. There is now a comment at its definition pointing toembed.astro, and the hide block names.visually-hiddenas its model.Found while checking the fix: phase 1's caption rule hid the popover's captions in narrow frames as well ("Filter (Hz)", "Display", "Next moves through", "Preload"). The popover floats over the plot, so those captions cost no plot height. They are back, and the popover's spacing tightens at 560 px or less so it still fits: at 360 x 480 with the popover open the document does not scroll (menu bottom at 456 px in Chromium, 437 px in WebKit). At 320 x 480 in Chromium it overflows by 2 px while open; that is below the smallest supported frame.