ui: show the singular and plural artist rows separately

Track info now lists the Artist field and the plural Artists field as
their own rows, hiding Artists when it would repeat the Artist value.
Keep one Artist sort row, also hidden when it matches the artist name.
This commit is contained in:
austinried
2026-10-21 14:24:18 +00:00
parent 319ff4b645
commit 2f95a89682
5 changed files with 28 additions and 23 deletions
@@ -215,7 +215,7 @@ class LibraryInfoDialogTest {
}
@Test
fun aSingleArtistTrackUsesSingularLabels() {
fun aSingleArtistTrackHidesTheDuplicateArtistsRow() {
composeRule.setContent {
SubtracksTheme {
SongInfoDialog(
@@ -236,7 +236,7 @@ class LibraryInfoDialogTest {
}
@Test
fun duplicateAndBlankArtistRefsStaySingular() {
fun duplicateAndBlankArtistRefsDoNotAddAnArtistsRow() {
composeRule.setContent {
SubtracksTheme {
SongInfoDialog(
@@ -259,7 +259,7 @@ class LibraryInfoDialogTest {
}
@Test
fun aMixedArtistTrackUsesPluralLabelsForBothRows() {
fun aMixedArtistTrackShowsBothTheArtistAndArtistsRows() {
composeRule.setContent {
SubtracksTheme {
SongInfoDialog(
@@ -277,10 +277,12 @@ class LibraryInfoDialogTest {
}
}
composeRule.onNodeWithText("Artist").assertIsDisplayed()
composeRule.onNodeWithText("Artists").assertIsDisplayed()
composeRule.onNodeWithText("Artists sort").assertIsDisplayed()
composeRule.onNodeWithText("Artist").assertDoesNotExist()
composeRule.onNodeWithText("Artist sort").assertDoesNotExist()
composeRule.onNodeWithText("Artist A").assertIsDisplayed()
composeRule.onNodeWithText("Artist A · Artist B").assertIsDisplayed()
composeRule.onNodeWithText("Artist sort").assertIsDisplayed()
composeRule.onNodeWithText("Artists sort").assertDoesNotExist()
composeRule.onNodeWithText("Alpha").assertIsDisplayed()
}
@@ -304,7 +306,7 @@ class LibraryInfoDialogTest {
}
@Test
fun aMixedArtistTrackWithoutASortShowsOnlyTheArtistsRow() {
fun aMixedArtistTrackWithoutASortStillShowsBothArtistRows() {
composeRule.setContent {
SubtracksTheme {
SongInfoDialog(
@@ -322,9 +324,11 @@ class LibraryInfoDialogTest {
}
}
composeRule.onNodeWithText("Artist").assertIsDisplayed()
composeRule.onNodeWithText("Artists").assertIsDisplayed()
composeRule.onNodeWithText("Artist A").assertIsDisplayed()
composeRule.onNodeWithText("Artist A · Artist B").assertIsDisplayed()
composeRule.onNodeWithText("Artists sort").assertDoesNotExist()
composeRule.onNodeWithText("Artist sort").assertDoesNotExist()
}
@Test
@@ -48,7 +48,7 @@ class SongArtistDisplayTest {
}
@Test
fun theInfoDialogListsThePluralArtistsWithTheSingularArtistFirst() {
fun theInfoDialogShowsTheSingularArtistAndThePluralArtistsSeparately() {
composeRule.setContent {
SubtracksTheme {
SongInfoDialog(
@@ -62,6 +62,7 @@ class SongArtistDisplayTest {
}
}
composeRule.onNodeWithText("Two · One · Three").assertIsDisplayed()
composeRule.onNodeWithText("Two").assertIsDisplayed()
composeRule.onNodeWithText("One · Two · Three").assertIsDisplayed()
}
}