feat(kiosk): persistent search field in the KioskShell back bar

The kiosk drops the HeaderBar (where the desktop search box lives), so add a
search LineEdit to the back bar: Enter submits through SearchActions.submit
(the same seam the header uses) and lands on the results view. This makes
Search functional end-to-end in kiosk (query -> SearchResultsView -> tap a
result -> the album/artist detail views mounted in P2). Validated via the
slintcheck stub.

cc
This commit is contained in:
vicrodh committed 2026-07-10 15:02:38 -06:00
1 parent af34a8e40c
commit 408c945c44
1 file changed
+19 -7
+19 -7
View File
@@ -15,10 +15,11 @@
// and extracting it into a sub-component needs that height re-threaded — a // and extracting it into a sub-component needs that height re-threaded — a
// change worth doing only once the kiosk shell is build-verified. Kept isolated // change worth doing only once the kiosk shell is build-verified. Kept isolated
// here so the desktop shell is untouched and cannot regress. // here so the desktop shell is untouched and cannot regress.
import { LineEdit } from "std-widgets.slint";
import { Theme } from "../foundation/semantic-colors.slint"; import { Theme } from "../foundation/semantic-colors.slint";
import { Layout } from "../foundation/layout.slint"; import { Layout } from "../foundation/layout.slint";
import { Radius } from "../foundation/radius.slint"; import { Radius } from "../foundation/radius.slint";
import { NavState, ContentView, OfflineState, PlaylistState, PurchaseDetailState } from "../state.slint"; import { NavState, ContentView, OfflineState, PlaylistState, PurchaseDetailState, SearchActions } from "../state.slint";
import { PlayerBarSmall } from "PlayerBarSmall.slint"; import { PlayerBarSmall } from "PlayerBarSmall.slint";
import { NavRail } from "NavRail.slint"; import { NavRail } from "NavRail.slint";
import { HomeView } from "../discover/HomeView.slint"; import { HomeView } from "../discover/HomeView.slint";
@@ -101,19 +102,22 @@ export component KioskShell inherits Rectangle {
VerticalLayout { VerticalLayout {
spacing: 0px; spacing: 0px;
// --- Back bar (workstream B: persistent global back, wired to NavState // --- Back bar: persistent global back (workstream B, wired to NavState
// history, honoring ADR-004). ---------------------------------------- // history, ADR-004) + the kiosk search entry. The desktop search box
// lives in the HeaderBar, which the kiosk drops, so a persistent search
// field here is what makes Search functional; Enter submits through the
// same SearchActions seam the header uses and lands on the results view.
Rectangle { Rectangle {
height: Layout.header-height; height: Layout.header-height;
background: Theme.surface-card; background: Theme.surface-card;
HorizontalLayout { HorizontalLayout {
padding-left: 6px; padding-left: 6px;
padding-right: 6px; padding-right: 8px;
alignment: start; padding-top: 4px;
padding-bottom: 4px;
spacing: 8px;
back-btn := Rectangle { back-btn := Rectangle {
width: 44px; width: 44px;
height: 44px;
y: (parent.height - self.height) / 2;
border-radius: Radius.sm; border-radius: Radius.sm;
background: back-ta.has-hover && NavState.can-back ? Theme.alpha-8 : transparent; background: back-ta.has-hover && NavState.can-back ? Theme.alpha-8 : transparent;
opacity: NavState.can-back ? 1.0 : 0.32; opacity: NavState.can-back ? 1.0 : 0.32;
@@ -130,6 +134,14 @@ export component KioskShell inherits Rectangle {
} }
} }
} }
search-field := LineEdit {
horizontal-stretch: 1;
placeholder-text: @tr("Search");
accepted(text) => {
SearchActions.submit(text);
NavState.view = ContentView.search;
}
}
} }
} }