feat(timeline): optional hour separator lines in week & day view
Add a showHourLines preference (default off — the existing clean look). When on, the week and day timelines draw a faint outline-variant line at each hour boundary, sitting over the column background but beneath event blocks. The toggle is provided app-wide via LocalShowHourLines and applied through a reusable hourSeparatorLines() modifier. Closes #5 (Codeberg) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,22 @@ class SettingsPrefsTest {
|
||||
assertThat(prefs.weekStart.first()).isEqualTo(WeekStartPref.SUNDAY)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `time format defaults to auto and round-trips`(@TempDir tempDir: Path) = runTest {
|
||||
val prefs = SettingsPrefs(newDataStore(tempDir))
|
||||
assertThat(prefs.timeFormat.first()).isEqualTo(TimeFormatPref.AUTO)
|
||||
prefs.setTimeFormat(TimeFormatPref.TWELVE_HOUR)
|
||||
assertThat(prefs.timeFormat.first()).isEqualTo(TimeFormatPref.TWELVE_HOUR)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `hour lines default off and round-trips`(@TempDir tempDir: Path) = runTest {
|
||||
val prefs = SettingsPrefs(newDataStore(tempDir))
|
||||
assertThat(prefs.showHourLines.first()).isFalse()
|
||||
prefs.setShowHourLines(true)
|
||||
assertThat(prefs.showHourLines.first()).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `garbage stored enum falls back to default`(@TempDir tempDir: Path) = runTest {
|
||||
val store = newDataStore(tempDir)
|
||||
|
||||
Reference in New Issue
Block a user