refactor(slint): mix rows reuse SearchTrackRow; For You uses HomeSkeleton
Track row reuse: the mix views had a bespoke MixTrackRow with a dead
favorite/more controls (no context menu), while search / favorites /
artist already share SearchTrackRow (which has the TrackContextMenu).
Consolidated:
- SearchTrackRow gains optional show-album (album column) +
show-favorite (standalone heart) — off by default, so search /
favorites rows are unchanged. SearchTrackItem gains an `album`
field.
- MixView drops MixTrackRow/MixTrackItem and renders SearchTrackRow
with show-album + show-favorite. A row "play" starts the mix from
that track; the context-menu actions (play next / queue / favorite
/ view album / view artist / ...) now bubble through media-action
and work in the mix views too.
For You skeleton: the For You tab showed a bare spinner during its
lazy load; it now shows the same pulsing HomeSkeleton as Home (the
static Qobuz Mixes tiles stay visible above it). Editor's Picks is
served from the shared discover-index cache (Tauri parity) and shows
the skeleton during the initial load via the existing HomeView guard.
cc
This commit is contained in:
8 files changed
+83
-193
No files matched your search
@@ -17,7 +17,7 @@ import { ArtistCarousel } from "ArtistCarousel.slint";
|
||||
import { Spotlight } from "Spotlight.slint";
|
||||
import { QobuzMixesRow } from "QobuzMixesRow.slint";
|
||||
import { RadioCard } from "RadioCard.slint";
|
||||
import { LoadingSpinner } from "../primitives/LoadingSpinner.slint";
|
||||
import { HomeSkeleton } from "HomeSkeleton.slint";
|
||||
|
||||
export component ForYouView inherits VerticalLayout {
|
||||
callback open-album(string);
|
||||
@@ -29,16 +29,16 @@ export component ForYouView inherits VerticalLayout {
|
||||
callback start-radio-album(string);
|
||||
callback open-mix(string);
|
||||
|
||||
// While the first lazy load is in flight, show the same pulsing
|
||||
// skeleton Home uses (the Qobuz Mixes tiles stay — they're static).
|
||||
property <bool> show-skeleton:
|
||||
ForYouState.loading
|
||||
&& ForYouState.release-watch.albums.length == 0
|
||||
&& ForYouState.top-artists.length == 0;
|
||||
|
||||
spacing: 40px;
|
||||
alignment: start;
|
||||
|
||||
if ForYouState.loading
|
||||
&& ForYouState.release-watch.albums.length == 0
|
||||
&& ForYouState.top-artists.length == 0: HorizontalLayout {
|
||||
alignment: center;
|
||||
LoadingSpinner { size: 36px; }
|
||||
}
|
||||
|
||||
// 0. Qobuz Mixes (static navigation tiles).
|
||||
QobuzMixesRow {
|
||||
open-mix(which) => {
|
||||
@@ -46,6 +46,8 @@ export component ForYouView inherits VerticalLayout {
|
||||
}
|
||||
}
|
||||
|
||||
if root.show-skeleton: HomeSkeleton { }
|
||||
|
||||
// 1. Release Watch.
|
||||
if ForYouState.release-watch.albums.length > 0: Carousel {
|
||||
section: ForYouState.release-watch;
|
||||
|
||||
Reference in new issue
Block a user