xou816 / spot

Native Spotify client for the GNOME desktop
MIT License
2.28k stars 119 forks source link

Albums with multiple discs are unclear #453

Open lunaneff opened 2 years ago

lunaneff commented 2 years ago

Describe the bug Some albums have multiple discs. For these albums, the track number jumps back to 1 in the middle of the album when a new disc starts.

To Reproduce Steps to reproduce the behavior:

  1. Go to any album with multiple discs (for example: Portal 2: Songs to Test By)
  2. Scroll down to the first track on the second disc

Expected behavior Spot should somehow show where a new disc starts. Maybe something like the way Spotify does it? (see screenshots)

Screenshots Current behavior:
image

How it's done on Spotify:
image

General information:

jannuary commented 2 years ago

Not very trivial technically I'm afraid - ListViews don't allow headers in between a list like that.

Zaedus commented 2 years ago

Not very trivial technically I'm afraid - ListViews don't allow headers in between a list like that.

Maybe have two list views with a GtkLabel or something like that? I'm not too familiar with the codebase, but I feel like that could work.

jannuary commented 2 years ago

Maybe have two list views with a GtkLabel or something like that? I'm not too familiar with the codebase, but I feel like that could work.

No - listviews have to be the sole child of a scrollable and can't have stuff like headers 'in the way', so to speak, unfortunately

Diegovsky commented 2 years ago

We can try to do what Gnome Settings does with its separate sections in one page

Edit: grammar

jannuary commented 2 years ago

We can try to do what Gnome Settings does with its separate sections in one page

No we can't - completely different widgetry.

Diegovsky commented 2 years ago

So I did some search and it seems we can use AdwPreferencesGroup outside of a preferences page.

If it's not a good idea, maybe we could use AdwActionRow as a separator instead, or we could separate every disc in a AdwExpanderRow. What do you think?

jannuary commented 2 years ago

Again - completely different widgetry. Preferences* use ListBoxes - which are less scalable but are more flexible, which works great for a couple preferences. We use ListViews for playlists, which are more scalable (so that playlists and albums with >N tracks don't just break apart), but that adds restrictions: we have to have the playlist as the sole child of a scrolling view, so we can't have headers.

I've heard something about sections for ListViews being implemented, which might work in this case, but I do not know much more about that.

Diegovsky commented 2 years ago

Sorry, I totally mixed them up. Thank you for the explanation though.

Yeah, implementing sections for ListViews would be awesome for this, but we'll have to wait unfortunately

Diegovsky commented 2 years ago

@Zaedus are you still eager to contribute? I think I have an idea

Zaedus commented 2 years ago

@Diegovsky sorry I don't have a lot of time anymore and I haven't worked with GTK in quite awhile. Wish I could've been of assistance.

Diegovsky commented 2 years ago

It's cool, I don't have the time to do it either unfortunately :)

Anyhow, if anyone wants to work on this I would be glad to mentor.

jannuary commented 2 years ago

It's won't be blocked by GTK whenever this lands: Draft: listview updates