fix(web): home shelves fill the window and their text stays readable on any cover
release / web (push) Failing after 11s
release / go (push) Successful in 1m52s
release / govulncheck (push) Successful in 23s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / integration (push) Canceled after 4m12s
release / android (push) Canceled after 4m3s
release / Build signed APK (push) Canceled after 2m3s

A wide card or genre band's wash keeps its cover's hue but caps its
lightness and saturation, so a pale or loud cover no longer washes the
card too light for its text; the faintest text on it is 80% parchment,
and a test checks 4.5:1 against the lightest wash allowed. A genre's
name keeps clear of its fan of covers.

Shelves size their tiles to the window: each shows a whole number of
tiles that fill its width, a short shelf grows its tiles up to a cap,
and the arrows page by whole tiles. On a very wide screen the page stops
at 140rem and centres.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-23 17:25:27 -05:00
co-authored by Claude Opus 5.5
parent 16225f09f7
commit e311e434a8
5 changed files with 178 additions and 23 deletions
+24 -13
View File
@@ -170,19 +170,22 @@
<svelte:head><title>{pageTitle('Home')}</title></svelte:head>
<div class="space-y-8">
<!-- On a very wide screen the page stops growing and centres, so shelves
of a few items do not leave half the window empty. -->
<div class="mx-auto max-w-[140rem] space-y-8">
<!-- Playlists: For You, Discover, the other daily mixes, then your own playlists -->
<section class="space-y-3">
<HorizontalScrollRow
rows={[playlistsRow]}
title="Playlists"
meta={shelfMeta(realPlaylists)}
fit={{ min: 352, max: 480 }}
ariaLabel="Playlists"
>
{#snippet item(rowItem: PlaylistRowItem)}
<!-- The page's front door: the biggest tiles on it, wide cards that
say what each mix is built from. Every shelf below steps down. -->
<div class="h-44 w-[26rem] max-w-[85vw]">
<div class="aspect-[64/27]" style:width="var(--tile-w)">
{#if rowItem.kind === 'real'}
<PlaylistCard
playlist={rowItem.playlist}
@@ -206,12 +209,13 @@
rows={[songsLikeRow]}
title="Songs like…"
meta={shelfMeta(songsLikePlaylists)}
fit={{ min: 144, max: 200 }}
ariaLabel="Songs like"
>
{#snippet item(rowItem: PlaylistRowItem)}
<!-- Circles: the shape artists have everywhere else, so a Songs like
mix reads as "about this artist" before its name is read. -->
<div class="w-40">
<div style:width="var(--tile-w)">
{#if rowItem.kind === 'real'}
<PlaylistCard
playlist={rowItem.playlist}
@@ -236,11 +240,12 @@
rows={[genreMixPlaylists]}
title="Your genres"
meta={shelfMeta(genreMixPlaylists)}
fit={{ min: 240, max: 320 }}
ariaLabel="Your genres"
>
{#snippet item(playlist: Playlist)}
<!-- Short, wide bands: a colour field and a fan of three covers. -->
<div class="h-28 w-64">
<div class="aspect-[16/7]" style:width="var(--tile-w)">
<PlaylistCard
{playlist}
shape="band"
@@ -273,10 +278,11 @@
<HorizontalScrollRow
rows={[data.you_might_like_albums]}
title="You might like"
fit={{ min: 144, max: 200 }}
ariaLabel="You might like albums"
>
{#snippet item(album: import('#lib/api/types.js').AlbumRef)}
<div class="w-40"><AlbumCard {album} /></div>
<div style:width="var(--tile-w)"><AlbumCard {album} /></div>
{/snippet}
</HorizontalScrollRow>
{/if}
@@ -284,10 +290,11 @@
<HorizontalScrollRow
rows={[data.you_might_like_artists]}
title={data.you_might_like_albums.length === 0 ? 'You might like' : undefined}
fit={{ min: 128, max: 176 }}
ariaLabel="You might like artists"
>
{#snippet item(artist: import('#lib/api/types.js').ArtistRef)}
<div class="w-36"><ArtistCard {artist} /></div>
<div style:width="var(--tile-w)"><ArtistCard {artist} /></div>
{/snippet}
</HorizontalScrollRow>
{/if}
@@ -305,10 +312,11 @@
<HorizontalScrollRow
rows={chunk(data.recently_added_albums, 25)}
title="Recently added"
ariaLabel="Recently added"
fit={{ min: 176, max: 240 }}
ariaLabel="Recently added"
>
{#snippet item(album: import('#lib/api/types.js').AlbumRef)}
<div class="w-48"><AlbumCard {album} /></div>
<div style:width="var(--tile-w)"><AlbumCard {album} /></div>
{/snippet}
</HorizontalScrollRow>
{/if}
@@ -328,13 +336,14 @@
<HorizontalScrollRow
rows={[data.rediscover_albums]}
title="Rediscover"
fit={{ min: 144, max: 200 }}
ariaLabel="Rediscover albums"
>
{#snippet item(album: import('#lib/api/types.js').AlbumRef)}
<!-- Rediscover sits below Recently Added in the size
hierarchy. w-40 keeps it readable without competing
with the freshest content above. -->
<div class="w-40"><AlbumCard {album} /></div>
hierarchy: its tiles start smaller (144px against
176px), so the freshest albums above lead. -->
<div style:width="var(--tile-w)"><AlbumCard {album} /></div>
{/snippet}
</HorizontalScrollRow>
{/if}
@@ -342,10 +351,11 @@
<HorizontalScrollRow
rows={[data.rediscover_artists]}
title={data.rediscover_albums.length === 0 ? 'Rediscover' : undefined}
fit={{ min: 128, max: 176 }}
ariaLabel="Rediscover artists"
>
{#snippet item(artist: import('#lib/api/types.js').ArtistRef)}
<div class="w-36"><ArtistCard {artist} /></div>
<div style:width="var(--tile-w)"><ArtistCard {artist} /></div>
{/snippet}
</HorizontalScrollRow>
{/if}
@@ -387,10 +397,11 @@
<HorizontalScrollRow
rows={[data.last_played_artists]}
title="Last played"
fit={{ min: 128, max: 176 }}
ariaLabel="Last played artists"
>
{#snippet item(artist: import('#lib/api/types.js').ArtistRef)}
<div class="w-36"><ArtistCard {artist} /></div>
<div style:width="var(--tile-w)"><ArtistCard {artist} /></div>
{/snippet}
</HorizontalScrollRow>
{/if}