From 262931ae38284290032807d183b70e1316a66b68 Mon Sep 17 00:00:00 2001 From: Mark Boas Date: Wed, 29 Jul 2026 08:52:23 +0200 Subject: [PATCH 1/5] Restyle the captions/transcript view buttons as a segmented switch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- css/hyperaudio-lite-editor.css | 47 +++++++++++++++++++++++++ index.html | 21 +++++++---- js/editor-core.js | 27 ++++++++++---- js/hyperaudio-lite-editor-assemblyai.js | 4 +-- js/hyperaudio-lite-editor-deepgram.js | 2 +- js/hyperaudio-lite-editor-whisper.js | 2 +- 6 files changed, 85 insertions(+), 18 deletions(-) diff --git a/css/hyperaudio-lite-editor.css b/css/hyperaudio-lite-editor.css index 46395f5..1b0ba03 100644 --- a/css/hyperaudio-lite-editor.css +++ b/css/hyperaudio-lite-editor.css @@ -867,3 +867,50 @@ label[data-a11y-wired]:focus-visible { margin-top: 27px; } } + +/* Transcript/captions view switch: a recessed track with a raised thumb that + slides under the active segment, so the current view reads as a position in + a switch — distinct from the filled action buttons beside it. Colors come + from the daisyUI theme vars (base-200 track, base-100 thumb). */ +#view-switch { + position: relative; + display: inline-flex; + padding: 4px; + border-radius: 0.5rem; + background-color: oklch(var(--b3)); + margin-right: 16px; +} +#view-switch::before { + content: ""; + position: absolute; + top: 4px; + left: 4px; + width: 44px; + height: 40px; + border-radius: 0.375rem; + background-color: oklch(var(--b1)); + box-shadow: 0 1px 3px oklch(var(--bc) / 0.25); + transition: transform 0.15s ease-out; +} +#view-switch.captions-active::before { + transform: translateX(44px); +} +@media (prefers-reduced-motion: reduce) { + #view-switch::before { transition: none; } +} +#view-switch .btn { + position: relative; /* sits above the sliding thumb */ + width: 44px; + height: 40px; + min-height: 0; + border: none; + background: transparent; + color: oklch(var(--bc) / 0.4); +} +#view-switch .btn:hover { + background: transparent; + color: oklch(var(--bc) / 0.75); +} +#view-switch .btn[aria-pressed="true"] { + color: oklch(var(--bc)); +} diff --git a/index.html b/index.html index ad9c39e..c8f40ec 100644 --- a/index.html +++ b/index.html @@ -108,7 +108,7 @@ } - + @@ -487,12 +487,19 @@

Topics

- - + +
+ + +