refactor(month): make the style picker read by looking, not comparing (#38)
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:
@@ -39,8 +39,9 @@ import kotlinx.datetime.DayOfWeek
|
|||||||
* closing on tap would hide the very thing the screen is for. Back exits, the
|
* 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.
|
* 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
|
* Under the preview sits the selected style's own one-line blurb, then the
|
||||||
* rows with a tonal highlight and [SelectedCheck] on the current one.
|
* family's standard picker shape: connected single-line grouped rows with a
|
||||||
|
* tonal highlight and [SelectedCheck] on the current one.
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
internal fun MonthViewStylePicker(
|
internal fun MonthViewStylePicker(
|
||||||
@@ -59,7 +60,7 @@ internal fun MonthViewStylePicker(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(horizontal = 16.dp, vertical = 8.dp)
|
.padding(horizontal = 12.dp, vertical = 8.dp)
|
||||||
.height(PREVIEW_HEIGHT),
|
.height(PREVIEW_HEIGHT),
|
||||||
contentAlignment = Alignment.Center,
|
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 ->
|
options.forEachIndexed { index, style ->
|
||||||
val isSelected = style == selected
|
val isSelected = style == selected
|
||||||
GroupedRow(
|
GroupedRow(
|
||||||
title = stringResource(style.labelRes),
|
title = stringResource(style.labelRes),
|
||||||
summary = stringResource(style.descriptionRes),
|
|
||||||
position = positionOf(index, options.size),
|
position = positionOf(index, options.size),
|
||||||
selected = isSelected,
|
selected = isSelected,
|
||||||
trailing = if (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)
|
private val PREVIEW_SHAPE = RoundedCornerShape(12.dp)
|
||||||
|
|||||||
@@ -375,15 +375,14 @@
|
|||||||
<!-- Month view style (#38, #53) -->
|
<!-- Month view style (#38, #53) -->
|
||||||
<string name="settings_month_header">Month view</string>
|
<string name="settings_month_header">Month view</string>
|
||||||
<string name="settings_month_view_style">Month view style</string>
|
<string name="settings_month_view_style">Month view style</string>
|
||||||
<string name="settings_month_view_style_summary">Choose how the month view is laid out and how you move through it.</string>
|
|
||||||
<string name="month_style_paged">Pages</string>
|
<string name="month_style_paged">Pages</string>
|
||||||
<string name="month_style_paged_summary">One month at a time. Swipe sideways to change month.</string>
|
<string name="month_style_paged_summary">One month fills the screen. Swipe left or right to change month.</string>
|
||||||
<string name="month_style_continuous">Continuous</string>
|
<string name="month_style_continuous">Scrolling months</string>
|
||||||
<string name="month_style_continuous_summary">Scroll up and down through the months. Each month keeps to itself under its own heading, with no days borrowed from its neighbours.</string>
|
<string name="month_style_continuous_summary">Each month sits under its own heading, with a little space setting it apart from the next.</string>
|
||||||
<string name="month_style_dense">Dense</string>
|
<string name="month_style_dense">Seamless weeks</string>
|
||||||
<string name="month_style_dense_summary">The same endless scroll with the seams taken out — one unbroken run of weeks, months flowing into each other.</string>
|
<string name="month_style_dense_summary">The weeks run on without a break, each month flowing straight into the next with no gap between them.</string>
|
||||||
<string name="month_style_split">Split</string>
|
<string name="month_style_split">Split</string>
|
||||||
<string name="month_style_split_summary">A compact grid with dots for events, and the day you tap listed underneath.</string>
|
<string name="month_style_split_summary">A compact grid marks the days that have events, and the day you tap is listed underneath.</string>
|
||||||
<string name="month_split_no_events">Nothing scheduled</string>
|
<string name="month_split_no_events">Nothing scheduled</string>
|
||||||
<string name="month_split_expand">Show the whole month</string>
|
<string name="month_split_expand">Show the whole month</string>
|
||||||
<string name="month_split_collapse">Show the day\'s events</string>
|
<string name="month_split_collapse">Show the day\'s events</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user