Skip to content

Navbar design pass: segmented view switch, softened buttons, alignment - #432

Merged
maboa merged 5 commits into
mainfrom
enhancement/view-switch-segmented-control
Jul 29, 2026
Merged

Navbar design pass: segmented view switch, softened buttons, alignment#432
maboa merged 5 commits into
mainfrom
enhancement/view-switch-segmented-control

Conversation

@maboa

@maboa maboa commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

A design pass over the navbar, centred on the captions/transcript view control.

  • Segmented view switch — the two view buttons marked the active view by disabling it, but greyed-out reads as "unavailable", not "you are here". They're now one segmented control: a recessed track (base-300) with a raised thumb that slides under the active segment. Active state is conveyed by the thumb + aria-pressed; both segments stay clickable, and clicking the active one is a no-op (preserving the behavior the transcription engines rely on when forcing transcript view via #transcript-editor-btn.click()). Tooltips renamed to "Transcript view" / "Captions view".
  • Softened outline buttons — daisyUI's .btn-outline near-black border and black-fill hover inversion read heavier than everything around them; the navbar's outline buttons now use quiet base-300 borders and a gray tint hover.
  • Ghost sidebar toggle — the sidebar toggle rearranges the workspace rather than acting on content, so it joins the app's other chrome controls (find & replace, info, mute) as a ghost button, and now carries aria-pressed in both the desktop (sidebar) and small-screen (Recents drawer) layouts.
  • Alignment — the navbar's leading edge now aligns with the transcript card in both sidebar states (0 / 16px leading padding, transitioned to track the card's slide), and the buttons are optically centred in the band above the card (they sat 4px high because the borderless bar reads as one space including the 8px floating-card gap).

Notes

  • daisyUI 4 theme variables are OKLCH channels — new CSS uses oklch(var(--b3)) etc.
  • ?v= cache-busters bumped to 0.8.11 for hyperaudio-lite-editor.css, editor-core.js, and responsive.js. The @version headers inside the JS files are left for the release process.
  • No new CSS build needed — all daisyUI classes used already exist in the shipped tailwind-min.css.

Testing

  • 31 unit tests + 47 Playwright e2e (including a11y and responsive drawer specs) pass.
  • Verified manually: view switching in both directions, active-segment no-op, sidebar collapse/expand with aria-pressed tracking, alignment in both sidebar states.

maboa added 5 commits July 29, 2026 08:52
The two navbar buttons that swap between transcript and captions view
marked the ACTIVE view by disabling its button — but greyed-out reads as
"unavailable", not "you are here". Replace the pair with a segmented
switch: a recessed track (base-300) with a raised thumb that slides
under the active segment, distinct from the filled primary action
buttons beside it. Active state is conveyed by the thumb + aria-pressed;
both segments stay clickable and clicking the active one is a no-op,
which preserves the behavior the transcription engines rely on when
they force transcript view via #transcript-editor-btn.click().

Track/thumb colors use oklch(var(--b3))/oklch(var(--b1)) — daisyUI 4
theme vars are OKLCH channels. The stylesheet cache-buster is bumped so
deployed users pick up the new CSS. Tooltips renamed from "Edit
captions"/"Edit transcript" to "Captions view"/"Transcript view" since
they switch views rather than perform edits.
daisyUI's .btn-outline draws a near-black border and inverts to a black
fill on hover, which read heavier than the recessed view switch and the
filled primary actions beside them. Scope a quieter treatment to the
navbar: base-300 borders, slightly muted icons, and a gray tint hover.
The sidebar toggle rearranges the workspace rather than acting on the
content, so it now matches the app's other chrome controls (find &
replace, transcription info, mute) as a quiet ghost button instead of
sharing the outlined weight of the editing actions beside it.

Since the button is stateful, it now carries aria-pressed: the desktop
collapse handler syncs it, and on the small-screen layout — where the
same button opens the Recents drawer instead — responsive.js keeps it
tracking the drawer, restoring the desktop value when the layout
returns past the 948px breakpoint.

Bump the ?v= cache-busters for editor-core.js and responsive.js so
deployed users pick up the changed files (this was also why the change
didn't appear when first tested locally).
The sidebar toggle sat 8-9px right of the transcript card's left edge
(the daisyUI navbar's own padding), in both sidebar states. Zero the
navbar's leading padding while the sidebar is open — the card sits
flush with .main-panel — and switch to a 16px pad when collapsed to
match the card's floating gutter, transitioned to track the card's
0.5s slide. The toggle handler flags the state via body.sidebar-collapsed.

Desktop two-pane only; the small-screen layout keeps the default
padding. The .main-panel prefix is needed to beat daisyUI's
single-class .navbar padding, since tailwind-min.css loads after
the editor stylesheet.
…card

The buttons were geometrically centred in the 70px navbar, but the
borderless bar reads as one space running to the card's top edge at
78px (including the 8px floating-card gap), leaving them 4px high to
the eye: 11px above vs 19px below. Nudge the bar down 4px so the
buttons sit 15px/15px in the band; the card is absolutely positioned,
so nothing else moves. Desktop two-pane only.
@maboa
maboa merged commit 92baf11 into main Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant