From 8e3c210864936d295922e47a2db5a3b6a9cb786b Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 27 Jul 2026 09:23:30 +0200 Subject: [PATCH] cbd-web: give the panes a tab control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Below 700px the panes stack and only the focused one is open, but switching was bound to `Tab` and to a tap on the collapsed strip — and a phone has no `Tab` key. The top bar now carries `library` / `queue` buttons that set the focus, shown at every width: on desktop they double as the readout of which pane the keys go to, which the inset border says only faintly. The collapsed strip is the pane's toolbar with all but the title clipped, so its buttons were the only thing a tap on it could land on — tapping to switch panes could hit the library's "play" and replace the queue. Hidden there now. The connection line truncates rather than pushing the tabs off a narrow screen. Co-Authored-By: Claude Opus 5 (1M context) --- cbd-web/src/app.rs | 21 +++++++++++++++++++++ cbd-web/style.css | 29 +++++++++++++++++++++++++++-- docs/src/clients/web.md | 6 ++++++ plan/summary.md | 17 +++++++++++++++++ 4 files changed, 71 insertions(+), 2 deletions(-) diff --git a/cbd-web/src/app.rs b/cbd-web/src/app.rs index d9636ee..958d9db 100644 --- a/cbd-web/src/app.rs +++ b/cbd-web/src/app.rs @@ -807,9 +807,30 @@ fn TopBar(store: Store) -> impl IntoView { save_pref("theme", next); apply_theme(next); }; + // What `Tab` does, as a tap target. On a phone the panes stack and only + // the focused one is open, so switching panes has to be reachable without + // a keyboard. It stays on screen at every width, where it doubles as the + // readout of which pane the keys are going to. + let tab = move |target: Focus, label: &'static str| { + view! { + + } + }; view! {
"crabidy" + + {tab(Focus::Library, "library")} + {tab(Focus::Queue, "queue")} +