Skip to content

feat(web): Your Playlists, Your Albums and From Spotify on Home - #1442

Open
saliltimalsina wants to merge 1 commit into
kushagrasinghx:mainfrom
saliltimalsina:feat/home-library-shelves
Open

saliltimalsina wants to merge 1 commit into
kushagrasinghx:mainfrom
saliltimalsina:feat/home-library-shelves

Conversation

@saliltimalsina

Copy link
Copy Markdown

What

Home now leads with the listener's own music after Recently Played, as Spotify's Home does:

  • Your Playlists: the library's playlists, linking to All Playlists.
  • Your Albums: saved albums, linking to Albums.
  • From Spotify: once Spotify is connected, the listener's daylist (when Spotify has made one) and their Spotify playlists, linking to the Spotify page.

Each row shows only when there's something in it. YouTube's own "From your library" shelf is hidden while these show, as its older Recently Played already is.

How

  • ItemShelf in ShelfView: a square-lockup shelf whose title links to an app page.
  • Daylist: Spotify uses one playlist id for everyone (37i9dQZF1EP6YuccBxUcC1) and answers it with the signed-in listener's own daylist, renamed through the day. useSpotifyDaylist reads it with the existing spotify.playlist call, so no extension change is needed. It's left out while empty, which it is for an account with little listening yet.
  • spotifyPlaylistItem is shared with SpotifyPage, which built the same item inline.

No new dependencies.

Testing

  • pnpm typecheck, pnpm test and the app build pass.
  • By hand in Chrome: with 4 saved playlists, 1 saved album and Spotify connected, Home showed Your Playlists (4), Your Albums (1) and From Spotify (Liked Songs), and YouTube's duplicate "From your library" was gone. Cards open their pages. The daylist page opens through the same id. The test account's daylist is empty (no listening history), so the daylist card itself is untested with a real daylist.

Home leads with the account's own music after Recently Played, as
Spotify's Home does: the library's playlists and saved albums, and once
Spotify is connected, the listener's daylist (when Spotify has made one)
and their Spotify playlists. Each row links to its page and only shows
with something in it. YouTube's own "From your library" shelf is hidden
while these show, as its older Recently Played already is.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant