mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
address the review of the tap targets
The "stays inert" test was tautological: the render helper always passed non-null no-op
lambdas, so its assertion held for any implementation. It now passes nullable callbacks
and asserts the targets are disabled, which fails if the gate is removed.
Accessibility: both taps carry onClickLabel ("Open album"/"Open artist") and the artist
box spans the full row, and the now playing cover passes showPlaceholder = coverArt ==
null so the always-present placeholder letter is not merged into the tap target's label
(the same flash the artist detail cells had).
Left as-is: the artist target is still one line tall (~20dp), and the album detail
subtitle tap covers the year too. Both are layout/scope trade-offs.
This commit is contained in:
@@ -260,7 +260,10 @@ fun NowPlayingScreen(
|
||||
.weight(1f)
|
||||
.fillMaxWidth()
|
||||
.padding(top = 2.dp)
|
||||
.clickable(enabled = onAlbumClick != null) { onAlbumClick?.invoke() }
|
||||
.clickable(
|
||||
enabled = onAlbumClick != null,
|
||||
onClickLabel = "Open album",
|
||||
) { onAlbumClick?.invoke() }
|
||||
.testTag(NOW_PLAYING_COVER_TAG),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
@@ -268,6 +271,7 @@ fun NowPlayingScreen(
|
||||
ref = coverArt,
|
||||
name = state.item?.title.orEmpty(),
|
||||
thumbnailRef = thumbnailRef,
|
||||
showPlaceholder = coverArt == null,
|
||||
square = false,
|
||||
elevation = 3.dp,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
@@ -303,8 +307,12 @@ fun NowPlayingScreen(
|
||||
Box(
|
||||
modifier =
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.height(subtitleHeight)
|
||||
.clickable(enabled = onArtistClick != null) { onArtistClick?.invoke() },
|
||||
.clickable(
|
||||
enabled = onArtistClick != null,
|
||||
onClickLabel = "Open artist",
|
||||
) { onArtistClick?.invoke() },
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user