refactor(month): make the style picker read by looking, not comparing (#38)
All checks were successful
Translations / check (pull_request) Successful in 5s
CI / ci (pull_request) Successful in 5m35s

The chooser showed a per-style blurb on every row and a generic feature
summary under the preview. Move the selected style's own blurb under its
preview instead, drop the generic summary, and reduce the rows to a single
line — the preview is now bigger (280dp, wider) in the space that frees up.

The blurbs now stand alone: Dense's copy referenced Continuous ("the same
endless scroll…"), which made no sense once each shows in isolation. Rename
the two vertical styles to say what they do — Continuous → "Scrolling months",
Dense → "Seamless weeks".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-20 22:55:40 +02:00
parent fb90c94e37
commit 6ab235e1d8
2 changed files with 15 additions and 13 deletions

View File

@@ -39,8 +39,9 @@ import kotlinx.datetime.DayOfWeek
* closing on tap would hide the very thing the screen is for. Back exits, the
* same as the App name picker, which stays open for the same reason.
*
* Below the preview it is the family's standard picker shape: connected grouped
* rows with a tonal highlight and [SelectedCheck] on the current one.
* Under the preview sits the selected style's own one-line blurb, then the
* family's standard picker shape: connected single-line grouped rows with a
* tonal highlight and [SelectedCheck] on the current one.
*/
@Composable
internal fun MonthViewStylePicker(
@@ -59,7 +60,7 @@ internal fun MonthViewStylePicker(
Box(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 8.dp)
.padding(horizontal = 12.dp, vertical = 8.dp)
.height(PREVIEW_HEIGHT),
contentAlignment = Alignment.Center,
) {
@@ -84,12 +85,14 @@ internal fun MonthViewStylePicker(
}
}
}
PickerDescription(stringResource(R.string.settings_month_view_style_summary))
// The selected style's own blurb lives here, under its preview, rather
// than on every row — the rows stay single-line and dense, and the words
// describe exactly what is being shown above.
PickerDescription(stringResource(selected.descriptionRes))
options.forEachIndexed { index, style ->
val isSelected = style == selected
GroupedRow(
title = stringResource(style.labelRes),
summary = stringResource(style.descriptionRes),
position = positionOf(index, options.size),
selected = isSelected,
trailing = if (isSelected) {
@@ -105,5 +108,5 @@ internal fun MonthViewStylePicker(
}
}
private val PREVIEW_HEIGHT = 240.dp
private val PREVIEW_HEIGHT = 280.dp
private val PREVIEW_SHAPE = RoundedCornerShape(12.dp)