Skip to content

Finish off item page rework#133

Merged
formatBCE merged 10 commits intomusic-assistant:mainfrom
seadowg:album-version
Mar 2, 2026
Merged

Finish off item page rework#133
formatBCE merged 10 commits intomusic-assistant:mainfrom
seadowg:album-version

Conversation

@seadowg
Copy link
Copy Markdown
Collaborator

@seadowg seadowg commented Mar 1, 2026

Closes #108
Work towards #113

This takes care of the rest of the issue:

  • Display a provider icon on the artwork
  • Display version on album details screen
  • Optimize the layout for landscape mode
  • Move non-play actions to a top right overflow
  • Make play and non-play actions language and icons consistent with desktop

I played around with different options for the item screen's "landscape" mode and settled on a variation derived from the desktop layout:

Screenshot_20260301_170246

This mode kicks in at the "expanded" size class (used for the screenshot), with compact and medium using the more "portrait" oriented layout.

import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performScrollToNode

fun ComposeTestRule.inScrollable(scrollableTag: String, block: ScrollableScope.() -> Unit) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little shocked there aren't more helpers in Compose's testing libraries to deal with scrolling out of the box.

@@ -0,0 +1,45 @@
package io.music_assistant.client.utils.support

abstract class MockFunction {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd usually prefer just rolling my own fakes/mocks than using a framework, but Compose's callback heavy interfaces are an ideal candidate for the latter as you end up with a lot more anonymous function parameters than domain specific interfaces. I had a quick look at KMP safe options (as opposed to using a JVM specific standard like Mockito), and it honestly seemed easier to just quickly roll a utility for ourselves while we let that scene mature.

@seadowg seadowg marked this pull request as ready for review March 1, 2026 17:06
Copy link
Copy Markdown
Collaborator

@formatBCE formatBCE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the foundational steps!

@formatBCE formatBCE merged commit 206cf35 into music-assistant:main Mar 2, 2026
1 check passed
@seadowg seadowg deleted the album-version branch March 3, 2026 09:23
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.

Refactoring item details page

2 participants