From 66d38251ea74ebb15ed3d784e042c6225d1c8b4e Mon Sep 17 00:00:00 2001 From: null Date: Tue, 14 Jul 2026 21:24:26 -0500 Subject: [PATCH] fix(packs): show pack name and description in full on library cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The library cards clipped the two things a card exists to communicate: the name at maxLines=1 ("Communicati…") and the description at maxLines=2 ("…about pers…"). Both are now uncapped and cards size to their content, matching the pack detail page. Removing the caps alone was not enough. The question-count pill shared the title row, so it reserved width for the row's full height and squeezed the text into a narrow column — the name then broke mid-word ("Communicatio/n") and the description wrapped to a ragged 8 lines. The pill moves down to join the access pill, which gives the text the card's full width and matches how the detail page already groups its pills. Verified live on both fixtures (dark 5554 / light 5556): full names on one line, full descriptions across the card, pills grouped below. Unit tests green, 0 FATAL. Co-Authored-By: Claude Opus 4.8 --- .../ui/questions/QuestionPackLibraryScreen.kt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/app/closer/ui/questions/QuestionPackLibraryScreen.kt b/app/src/main/java/app/closer/ui/questions/QuestionPackLibraryScreen.kt index 3ced4777..a93ca376 100644 --- a/app/src/main/java/app/closer/ui/questions/QuestionPackLibraryScreen.kt +++ b/app/src/main/java/app/closer/ui/questions/QuestionPackLibraryScreen.kt @@ -247,30 +247,33 @@ private fun QuestionPackCard( modifier = Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(6.dp) ) { + // Pack name and description are shown in full — this is what someone picks + // a pack by, and clipping it to "Communicati…" / "…about pers…" hid the + // very thing the card exists to communicate. Cards size to their content. Text( text = item.category.displayName.ifBlank { item.category.id.displayCategoryName() }, style = MaterialTheme.typography.titleLarge, color = MaterialTheme.colorScheme.onSurface, - fontWeight = FontWeight.SemiBold, - maxLines = 1, - overflow = TextOverflow.Ellipsis + fontWeight = FontWeight.SemiBold ) Text( text = item.category.description, style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 2, - overflow = TextOverflow.Ellipsis + color = MaterialTheme.colorScheme.onSurfaceVariant ) } - PackPill(item.promptCountLabel(), emphasis = true) } + // The count pill sits with the other pills rather than beside the title: in the + // title row it reserved width for the row's full height, squeezing the name and + // description into a narrow column that broke words mid-word once they were shown + // in full. This also matches the pill row on the pack detail page. Row( modifier = Modifier .fillMaxWidth() .horizontalScroll(rememberScrollState()), horizontalArrangement = Arrangement.spacedBy(8.dp) ) { + PackPill(item.promptCountLabel(), emphasis = true) item.metadataLabels().forEach { label -> PackPill(label, emphasis = label == "Premium") }