vixalien / muzika

Elegant music streaming app
GNU General Public License v3.0
238 stars 14 forks source link

Multi Layout View #164

Closed vixalien closed 5 days ago

vixalien commented 1 month ago

Utilize libadwaita's shiny new MultiLayoutView

Should merge when Adw.MultiLayoutView is available in GNOME SDK master.

DaPigGuy commented 1 month ago

You've probably already seen this, but AdwBottomSheet has been made public.

Might be nice to have with the "mini" items, see here for inspiration :)

vixalien commented 1 month ago

Ah nice. That widget is interesting, and I will definitely use it.

What do you mean by "mini" widgets?

DaPigGuy commented 1 month ago

What do you mean by "mini" widgets?

Sorry, I meant the detail items (queue, lyrics, related) when the window is mini

vixalien commented 1 month ago

Ah, I see. I will be updating in about a week (when the changes are available in the GNOME master)

DaPigGuy commented 1 month ago

It seems to already be available on org.gnome.Platform/master from gnome-nightly, as I can use bottom sheets in the Adwaita Demo app

vixalien commented 1 month ago

Oh cool, let me test that. I will work on updating this merge request, but it will be mergeable in a few days after the gnome master image we use in CI is updated.

vixalien commented 1 month ago

It seems to already be available on org.gnome.Platform/master from gnome-nightly, as I can use bottom sheets in the Adwaita Demo app

On the other hand are you positive about this? I cannot see the bottom sheets in the Adwaita Demo app

DaPigGuy commented 1 month ago

It seems to already be available on org.gnome.Platform/master from gnome-nightly, as I can use bottom sheets in the Adwaita Demo app

On the other hand are you positive about this? I cannot see the bottom sheets in the Adwaita Demo app

image

I installed it right before the comment

vixalien commented 1 month ago

how did you launch it?

DaPigGuy commented 1 month ago

how did you launch it?

Just from the app grid

vixalien commented 1 month ago

Just from the app grid

hmm it should usually not be possible to do that as Adwaita Demo's desktop file has NoDisplay=true. But anyway I think it's because of CDN propagation.

DaPigGuy commented 1 month ago

Just from the app grid

hmm it should usually not be possible to do that as Adwaita Demo's desktop file has NoDisplay=true. But anyway I think it's because of CDN propagation.

The Flatpak removes the NoDisplay here

vixalien commented 1 month ago

Ah, you installed adwaita demo itself. As you can see in the manifest, it builds libadwaita itself, so it is always updated. The org.gnome.Platform//master runtime gets updated a bit later, usually less than a week.

vixalien commented 1 month ago

On this case though, should the bottomsheet be the bottom player, and expand into the player controls?

DaPigGuy commented 1 month ago

Ah, you installed adwaita demo itself. As you can see in the manifest, it builds libadwaita itself, so it is always updated. The org.gnome.Platform//master runtime gets updated a bit later, usually less than a week.

Whoops :sweat_smile:

On this case though, should the bottomsheet be the bottom player, and expand into the player controls?

The thing is, the player controls also have the Lyrics/Queue/Related bar on the bottom on the "mini" layout which opens an AdwDialog, and it might be weird to have a bottom sheet that opens a bottom sheet dialog.

My initial thought was having the lyrics/queue/related AdwDialog be changed to be the sheet for the AdwBottomSheet, and so on the "mini" layout, the three tab buttons would open the bottom sheet and change the current view in the AdwViewStack, and the "normal" layout would remain how it is currently in this pull request, as a sidebar.

However, this idea also seems to have its downsides and maybe AdwBottomSheets shouldn't be used yet :sweat:

vixalien commented 1 month ago

I have a better idea. I think the whole "now playing view" should be the bottom sheet. Then on mobile, as the user switches from the now playing view to the details (lyrics/queue/related), a new page would be switched to in the bottom sheet.

However, I think bottom sheets should never be used on desktop.

DaPigGuy commented 1 month ago

However, I think bottom sheets should never be used on desktop.

Absolutely agreed.

Then on mobile, as the user switches from the now playing view to the details (lyrics/queue/related), a new page would be switched to in the bottom sheet.

So something like below?

Edit: The bottom sheet's content would be the rest of the app, so the main_stack in window.blp would have to be in a AdwLayoutSlot for the above to work... And of course, now_playing StackPage is moved out of the AdwViewStack into its own AdwLayoutSlot. This is a bit complicated :thinking:

vixalien commented 1 month ago

something along those lines... I will try to create something and we can do feedback on the changes

vixalien commented 1 week ago

The new changes are here. Based on this discussion, this is how it works

On Desktop

There is a sidebar showing queue, lyrics, related

image

On Mobile

There is a bottom sheet and you can view the queue, lyrics, related, etc.. inline

image

image

Your feedback is appreciated

vixalien commented 6 days ago

My only concern is the view tab switcher functioning as a toggle to show the "player" view. Do other apps do this? Seems confusing to me.

Yep, Apple Music on mobile does this too

vixalien commented 5 days ago

gnome-nightly seems to have caused the breakage, same issue on main

Yeah, the latest node20 extension seems to be broken. You can temporarily fix this by downgrading the GNOME SDK to an earlier version (and refrain from updating)

flatpak update --commit=f74d8ee57f6c55458bbd9f38093753d7fe39505eedb532ff2d286bb456b9b861 org.gnome.Sdk//master