feat(web): home shelves you can tell apart at a glance
release / go (push) Successful in 1m46s
release / web (push) Failing after 1m8s
release / govulncheck (push) Successful in 23s
release / integration (push) Successful in 4m12s
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 / Build signed APK (push) Canceled after 1m38s
release / android (push) Canceled after 3m3s
release / go (push) Successful in 1m46s
release / web (push) Failing after 1m8s
release / govulncheck (push) Successful in 23s
release / integration (push) Successful in 4m12s
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 / Build signed APK (push) Canceled after 1m38s
release / android (push) Canceled after 3m3s
Each home shelf now has its own shape. Main mixes and playlists are wide cards: the lead album's cover on a wash of its own colour, with the name and what the mix is built from beside it rather than over the art. Songs like mixes are circles, the shape artists already have. Genre mixes are short bands with a fan of three covers. Shelf sizes step down from the main mixes. Tiles show album covers in place of the four-cover collage, and no cover repeats along a shelf while a tile still has an unused one. The size and refresh time every mix on a shelf shares is said once, beside the shelf's title. Library pages keep the square card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,12 +3,16 @@
|
||||
|
||||
let {
|
||||
label,
|
||||
variant = 'pending'
|
||||
variant = 'pending',
|
||||
shape = 'square'
|
||||
}: {
|
||||
/** Card title (e.g. "For You" or "Songs like…"). */
|
||||
label: string;
|
||||
/** Drives copy + animation. */
|
||||
variant?: 'building' | 'failed' | 'pending' | 'seed-needed';
|
||||
/** Matches the shelf it stands in for, so a mix arriving does not
|
||||
change the shelf's shape (see PlaylistCard's shapes). */
|
||||
shape?: 'square' | 'wide' | 'round';
|
||||
} = $props();
|
||||
|
||||
const copy = $derived.by(() => {
|
||||
@@ -30,12 +34,35 @@
|
||||
);
|
||||
</script>
|
||||
|
||||
<div class="flex w-full flex-col items-start gap-2 rounded-md p-2 text-left" data-testid="playlist-placeholder-card" data-variant={variant}>
|
||||
<div class={coverClasses}>
|
||||
<Sparkles size={40} strokeWidth={1} />
|
||||
{#if shape === 'wide'}
|
||||
<div
|
||||
class="flex h-full w-full overflow-hidden rounded-xl bg-surface text-left"
|
||||
data-testid="playlist-placeholder-card"
|
||||
data-variant={variant}
|
||||
>
|
||||
<div
|
||||
class="flex aspect-square h-full shrink-0 items-center justify-center bg-surface-hover text-text-muted
|
||||
{variant === 'building' || variant === 'pending' ? 'animate-pulse' : ''}"
|
||||
>
|
||||
<Sparkles size={40} strokeWidth={1} />
|
||||
</div>
|
||||
<div class="flex min-w-0 flex-1 flex-col gap-1 p-4">
|
||||
<div class="truncate font-display text-2xl font-medium text-text-primary">{label}</div>
|
||||
<div class="text-sm text-text-muted">{copy}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full min-w-0">
|
||||
<div class="truncate text-sm font-medium text-text-primary">{label}</div>
|
||||
<div class="truncate text-xs text-text-muted">{copy}</div>
|
||||
{:else}
|
||||
<div
|
||||
class="flex w-full flex-col gap-2 rounded-md p-2 {shape === 'round' ? 'items-center text-center' : 'items-start text-left'}"
|
||||
data-testid="playlist-placeholder-card"
|
||||
data-variant={variant}
|
||||
>
|
||||
<div class="{coverClasses} {shape === 'round' ? 'rounded-full' : ''}">
|
||||
<Sparkles size={40} strokeWidth={1} />
|
||||
</div>
|
||||
<div class="w-full min-w-0">
|
||||
<div class="truncate text-sm font-medium text-text-primary">{label}</div>
|
||||
<div class="truncate text-xs text-text-muted">{copy}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user