ui: style artist section headers like album disc titles

Use the same uppercase label-large semibold text with letter spacing as the
disc headers on the album screen.
This commit is contained in:
austinried
2026-10-19 04:49:33 +00:00
parent 5dd6e8dab9
commit 4f6a292e74
2 changed files with 11 additions and 7 deletions
@@ -72,10 +72,12 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.TextMeasurer import androidx.compose.ui.text.TextMeasurer
import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.rememberTextMeasurer import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.subtracks.R import com.subtracks.R
import com.subtracks.data.model.Album import com.subtracks.data.model.Album
@@ -493,8 +495,10 @@ private fun ArtistSectionHeader(
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
) { ) {
Text( Text(
text = text, text = text.uppercase(),
style = MaterialTheme.typography.titleMedium, style = MaterialTheme.typography.labelLarge,
fontWeight = FontWeight.SemiBold,
letterSpacing = 1.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.weight(1f), modifier = Modifier.weight(1f),
) )
@@ -70,7 +70,7 @@ class ArtistDetailScreenTest {
) )
composeRule.onNodeWithText("Album artist · 1 album").assertExists() composeRule.onNodeWithText("Album artist · 1 album").assertExists()
composeRule.onNode(hasScrollAction()).performScrollToNode(hasText("Albums")) composeRule.onNode(hasScrollAction()).performScrollToNode(hasText("ALBUMS"))
composeRule.onNodeWithContentDescription("More options").assertExists() composeRule.onNodeWithContentDescription("More options").assertExists()
} }
@@ -88,12 +88,12 @@ class ArtistDetailScreenTest {
composeRule.onNodeWithText("Album artist · 2 albums").assertExists() composeRule.onNodeWithText("Album artist · 2 albums").assertExists()
composeRule.onNode(hasScrollAction()).performScrollToNode(hasText("Albums")) composeRule.onNode(hasScrollAction()).performScrollToNode(hasText("ALBUMS"))
composeRule.onNodeWithText("Albums").assertExists() composeRule.onNodeWithText("ALBUMS").assertExists()
composeRule.onNodeWithText("Kid A").assertExists() composeRule.onNodeWithText("Kid A").assertExists()
composeRule.onNode(hasScrollAction()).performScrollToNode(hasText("Appears on")) composeRule.onNode(hasScrollAction()).performScrollToNode(hasText("APPEARS ON"))
composeRule.onNodeWithText("Appears on").assertExists() composeRule.onNodeWithText("APPEARS ON").assertExists()
composeRule.onNodeWithText("Guest Album").assertExists() composeRule.onNodeWithText("Guest Album").assertExists()
} }