loading play icon, skeletons and page placeholders#604

opened1d agobyMMalek Gara-Hellal

loading is mostly silent: the play buttons give no feedback and several pages pop in with no placeholder.

where: apps/player/src/components/library.tsx (album card play at ~line 95, track row play at ~line 271), apps/player/src/components/mix-row.tsx, apps/player/src/components/skeletons.tsx

  1. play icon while loading. clicking play on an album card or a track row (playAlbum fetches the album first, player.play then waits for audio) keeps showing the same play icon until the bar changes. swap the icon for the existing Loader (components/loader.tsx) on that button while the request runs, and the track row icon while that row is buffering (player-bar.tsx already tracks buffering)
  2. skeletons, same geometry as the real content so nothing shifts (skeletons.tsx already has Delayed so fast loads never flash). pages that pop in today:
    • home: made for you (mix-row.tsx returns null while pending), and the "made for you" cards then shift everything below
    • following (pages/following.tsx): the followed artists list and the new releases list render nothing until the queries answer
    • folders root and folder view (pages/folders.tsx): blank until data
    • playlist folder (pages/playlist-folder.tsx) and listen (pages/listen.tsx): a line of text says "loading…" / "connecting…" instead of a layout
    • settings (pages/settings.tsx): sections with queries (scrobbling, plays today, session, version) fill in after paint
    • import and upload (pages/import.tsx, pages/upload.tsx): playlists / upload status arrive after the page
  3. small interaction animations: press feedback on buttons, like heart pop, a short fade when a list swaps from skeleton to rows. all of it off under reduced motion (lib/motion.ts)

good looks like: every async surface has a skeleton or a loader that matches the final size, play buttons show a spinner while starting, and nothing animates for users who asked for reduced motion.

first part shipped in #641: skeletons for following, folders, playlist folders and listen, a spinner on the album card play button and on the playing track row while it buffers (only after 150 ms so scrubbing does not flash), and skeletons that screen readers announce once. still open: the like heart pop, button press feedback and the list fade-in when a skeleton swaps.