From 5c2011e6f41945cead2339bb293eef88c9508461 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 1 Jun 2026 08:07:48 -0400 Subject: [PATCH] fix(android): remove kebab from MiniPlayer to free space for artist line Cover + LikeButton + 3 transport buttons + kebab consumed almost all of the 360-410dp viewport on typical phones, leaving the title / artist column with only ~20-80dp - enough for a truncated title but nothing for the artist line, which was rendering but effectively unreadable. Drops TrackActionsButton from MiniRow and the now-unused onNavigateToAlbum / onNavigateToArtist callbacks from the MiniPlayer signature + ShellScaffold call site. Full kebab surface still lives on NowPlayingScreen (one screen swipe away). Operator request 2026-06-01. Diverges from Flutter's player_bar which still ships the kebab; parity-map row updated to reflect the deliberate divergence. ShellScaffold's navController parameter is kept on the signature for future shell-level navigation needs. --- .../minstrel/player/ui/MiniPlayer.kt | 31 +++++-------------- .../minstrel/shared/widgets/ShellScaffold.kt | 15 +++++---- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/android/app/src/main/java/com/fabledsword/minstrel/player/ui/MiniPlayer.kt b/android/app/src/main/java/com/fabledsword/minstrel/player/ui/MiniPlayer.kt index 5296f338..8228d5bd 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/player/ui/MiniPlayer.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/player/ui/MiniPlayer.kt @@ -46,7 +46,6 @@ import com.fabledsword.minstrel.nav.LocalAnimatedContentScope import com.fabledsword.minstrel.nav.LocalSharedTransitionScope import com.fabledsword.minstrel.shared.widgets.LikeButton import com.fabledsword.minstrel.shared.widgets.ServerImage -import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsButton import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsViewModel import com.fabledsword.minstrel.theme.FabledSwordFlatTokens @@ -110,18 +109,16 @@ private fun MiniCover(coverUrl: String, contentDescription: String) { * * Layout (Column): * - Slim seek slider at the top (4dp track) - * - Row: cover | title/artist column | like | prev | play/pause | next | kebab + * - Row: cover | title/artist column | like | prev | play/pause | next * - * The slider participates in pointer-events so tap/scrub works - * without the surface's onClick eating the gesture; the row's - * surface-level clickable still expands to NowPlaying on tap of - * the cover/title area. + * No kebab on the mini bar (operator 2026-06-01): the full kebab + * surface lives on NowPlayingScreen, and dropping it from the mini + * gives the title/artist column the horizontal room it needs to + * actually display the artist name without truncation. */ @Composable fun MiniPlayer( onExpandClick: () -> Unit, - onNavigateToAlbum: (String) -> Unit, - onNavigateToArtist: (String) -> Unit, modifier: Modifier = Modifier, viewModel: PlayerViewModel = hiltViewModel(), trackActionsViewModel: TrackActionsViewModel = hiltViewModel(), @@ -167,8 +164,6 @@ fun MiniPlayer( onToggleLike = { trackActionsViewModel.toggleLike(track.id, isLiked) }, - onNavigateToAlbum = onNavigateToAlbum, - onNavigateToArtist = onNavigateToArtist, ) } } @@ -209,8 +204,6 @@ private fun MiniRow( onPrev: () -> Unit, onNext: () -> Unit, onToggleLike: () -> Unit, - onNavigateToAlbum: (String) -> Unit, - onNavigateToArtist: (String) -> Unit, ) { Row( modifier = Modifier @@ -219,9 +212,9 @@ private fun MiniRow( verticalAlignment = Alignment.CenterVertically, ) { // Cover + title area expands to NowPlaying on tap, but the - // transport buttons + kebab don't (each IconButton handles - // its own clicks). Wrap only the cover-and-title region with - // the clickable modifier rather than the whole row. + // transport buttons don't (each IconButton handles its own + // clicks). Wrap only the cover-and-title region with the + // clickable modifier rather than the whole row. Row( modifier = Modifier .weight(1f) @@ -255,14 +248,6 @@ private fun MiniRow( onClick = onPlayPause, ) TransportButton(icon = Lucide.SkipForward, description = "Next", onClick = onNext) - // hideQueueActions=true: the playing track is itself the - // queue entry, so Play next / Add to queue would be silly. - TrackActionsButton( - track = track, - hideQueueActions = true, - onNavigateToAlbum = onNavigateToAlbum, - onNavigateToArtist = onNavigateToArtist, - ) } } diff --git a/android/app/src/main/java/com/fabledsword/minstrel/shared/widgets/ShellScaffold.kt b/android/app/src/main/java/com/fabledsword/minstrel/shared/widgets/ShellScaffold.kt index 423a5e9d..f5058017 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/shared/widgets/ShellScaffold.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/shared/widgets/ShellScaffold.kt @@ -14,8 +14,6 @@ import androidx.compose.ui.Modifier import androidx.hilt.navigation.compose.hiltViewModel import androidx.navigation.NavHostController import com.fabledsword.minstrel.connectivity.ui.ConnectionErrorBanner -import com.fabledsword.minstrel.nav.AlbumDetail -import com.fabledsword.minstrel.nav.ArtistDetail import com.fabledsword.minstrel.player.ui.MiniPlayer import com.fabledsword.minstrel.player.ui.PlaybackErrorViewModel import com.fabledsword.minstrel.update.ui.UpdateBanner @@ -27,8 +25,9 @@ import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsViewMode * (conditional, none implemented yet), routed screen filling the * middle, MiniPlayer pinned at the bottom (auto-hides when no track). * A shell-scoped SnackbarHost above the MiniPlayer surfaces transient - * messages emitted by the MiniPlayer's TrackActionsButton (snackbars - * for in-screen kebabs continue to live on each screen's own Scaffold). + * messages emitted by in-screen TrackActions kebabs (each screen owns + * its own Scaffold's snackbar host as well; this one is the shell- + * wide catch-all for events that outlive a single screen). * * Mirrors the Flutter `_ShellWithPlayerBar` (lib/shared/routing.dart). * @@ -39,8 +38,10 @@ import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsViewMode * back-only AppBar. * * [onExpandPlayer] is the navigate-to-NowPlaying callback passed - * through to MiniPlayer's tap-handler. [navController] is needed by - * the MiniPlayer kebab for go-to-album / go-to-artist nav. + * through to MiniPlayer's tap-handler. [navController] is kept on + * the signature for future shell-level navigation needs (banner taps + * etc.); MiniPlayer itself no longer carries a kebab so doesn't need + * nav callbacks any more. */ @Composable fun ShellScaffold( @@ -82,8 +83,6 @@ fun ShellScaffold( SnackbarHost(hostState = snackbarHostState) MiniPlayer( onExpandClick = onExpandPlayer, - onNavigateToAlbum = { id -> navController.navigate(AlbumDetail(id)) }, - onNavigateToArtist = { id -> navController.navigate(ArtistDetail(id)) }, ) } }