fix(slint): popular tracks header below jumpnav, X inside input

Three targeted fixes from the latest screenshot.

Body offset:
  - The 24px head spacer before the body row only nudged content
    past the artist header, leaving Popular Tracks' first row sitting
    under the JUMP TO overlay (the play/select/more buttons in
    particular were behind the bar). Spacer is now 52px so the body
    column begins below the bar's natural y + 44 height + a small
    gap.
  - jump-nav natural-top tightens from 290 to 291 (purely cosmetic
    alignment with the new 52px slot above it). Sidebar natural-top
    follows to 335 (= 291 + 44) so it still sits flush below the
    bar.

Search input width:
  - max-open-width drops from 360px to 216px (60% of the previous
    cap). The expanded input now reads as a compact box on the
    right of the bar instead of a bar-wide slab.

X close affordance:
  - Moves INSIDE the search input on the right side, alongside the
    leading magnifier glyph. Clicking it both clears the query and
    closes the input (calls back into search-clicked, which the
    parent already wires to a reset).
  - The standalone X button that used to live on the bar's right
    edge is gone — the outer button now only ever shows the search
    icon when closed, and hides entirely while the inline input is
    open (no two competing search affordances).

cc
This commit is contained in:
vicrodh committed 2026-05-20 14:03:24 -06:00
1 parent 6d6a5c0e10
commit 3429fe4ee2
2 files changed
+64 -25

No files matched your search

@@ -501,11 +501,11 @@ export component ArtistPageView inherits Rectangle {
horizontal-stretch: 1;
spacing: 0px;
// 24px head spacing then straight into the loading state /
// Popular Tracks header — the in-page search now lives
// inside the JUMP TO bar (see jump-nav below), no longer
// a separate row in the body column.
Rectangle { height: 24px; }
// Reservation slot for the JUMP TO bar — the bar is an
// absolute-positioned overlay, so the body column has to
// skip its 44px (plus a small visual gap above and
// below) for content to land below it, not behind it.
Rectangle { height: 52px; }
if ArtistState.loading && ArtistState.top-tracks.length == 0: Rectangle {
height: 280px;
@@ -689,7 +689,10 @@ export component ArtistPageView inherits Rectangle {
// y is the row just below the artist header in the page layout
// (NavButtons + spacer + artist header + small gap, ~290px).
jump-nav := JumpNavBar {
property <length> natural-top: 290px;
// Sits in the 52px reservation slot at the top of the body
// column (artist header + 22 spacer + 4 gap = 291). Sticks
// to viewport top once the user scrolls past the header.
property <length> natural-top: 291px;
property <length> sticky-top: 0px;
x: 0;
@@ -720,12 +723,12 @@ export component ArtistPageView inherits Rectangle {
// bottom edge is always flush with the now-playing bar
// (height = root.height - y), so no gap appears when sticky.
if NetworkSidebarState.open: sidebar-panel := Rectangle {
// 334px = jump-nav natural-top (290) + jump-nav height
// 335px = jump-nav natural-top (291) + jump-nav height
// (44). Starts the sidebar flush with the bottom edge of
// the JUMP TO bar, never sliding behind it. As the user
// scrolls down, y tracks page-flickable.viewport-y until
// it hits sticky-top.
property <length> natural-top: 334px;
property <length> natural-top: 335px;
// 44px parks the sidebar just below the sticky JUMP TO
// bar (jump-nav's height) once the header scrolls away.
property <length> sticky-top: 44px;