From 31f51554f95e79550a260eecc2b7d693149a1dc9 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Mon, 6 Jul 2026 19:51:49 +0200 Subject: [PATCH 1/2] feat: open Day view when tapping a date header in Week/Agenda MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tapping a date header in the Week (day-of-week column) and Agenda (sticky section) views now drills into that date in Day view, mirroring the Agenda widget's header behaviour. Both reuse the existing onOpenDay callback (pendingDayIso + drillToDay) that Month already used, so the back stack lands on Day with the tapped view as its parent. Month already navigated on any cell tap (the transparent tap layer sits above the day number), so no change was needed there — all four views now behave consistently. Closes #37 Co-Authored-By: Claude Opus 4.8 --- .../calendula/ui/CalendarHost.kt | 2 ++ .../calendula/ui/agenda/AgendaScreen.kt | 17 ++++++++++++++--- .../calendula/ui/week/WeekScreen.kt | 18 +++++++++++++++--- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt index e0ce981..3e66a43 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt @@ -284,6 +284,7 @@ fun CalendarHost( CalendarView.Week -> WeekScreen( selectedView = currentView, onSelectView = onSelectView, + onOpenDay = onOpenDay, onEventClick = onEventClick, onOpenSettings = onOpenSettings, onOpenSearch = onOpenSearch, @@ -315,6 +316,7 @@ fun CalendarHost( CalendarView.Agenda -> AgendaScreen( selectedView = currentView, onSelectView = onSelectView, + onOpenDay = onOpenDay, onEventClick = onEventClick, onOpenSettings = onOpenSettings, onOpenSearch = onOpenSearch, diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/agenda/AgendaScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/agenda/AgendaScreen.kt index 8286ee8..06c462a 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/agenda/AgendaScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/agenda/AgendaScreen.kt @@ -93,6 +93,7 @@ private val zone = TimeZone.currentSystemDefault() fun AgendaScreen( selectedView: CalendarView, onSelectView: (CalendarView) -> Unit, + onOpenDay: (LocalDate) -> Unit, onEventClick: (EventInstance) -> Unit, onOpenSettings: () -> Unit, onOpenSearch: () -> Unit, @@ -191,6 +192,7 @@ fun AgendaScreen( pastDisplay = pastDisplay, onRetry = viewModel::goToToday, onEventClick = onEventClick, + onOpenDay = onOpenDay, modifier = Modifier .weight(1f) .fillMaxWidth(), @@ -289,6 +291,7 @@ private fun AgendaContent( pastDisplay: PastEventDisplay, onRetry: () -> Unit, onEventClick: (EventInstance) -> Unit, + onOpenDay: (LocalDate) -> Unit, modifier: Modifier = Modifier, ) { when (state) { @@ -318,6 +321,7 @@ private fun AgendaContent( dimPast = pastDisplay == PastEventDisplay.DIM, now = now, onEventClick = onEventClick, + onOpenDay = onOpenDay, modifier = modifier, ) } @@ -333,6 +337,7 @@ private fun AgendaList( dimPast: Boolean, now: Instant, onEventClick: (EventInstance) -> Unit, + onOpenDay: (LocalDate) -> Unit, modifier: Modifier = Modifier, ) { LazyColumn( @@ -342,7 +347,7 @@ private fun AgendaList( ) { days.forEach { day -> stickyHeader(key = "header-${day.date}") { - AgendaDayHeader(date = day.date, today = today) + AgendaDayHeader(date = day.date, today = today, onOpenDay = onOpenDay) } itemsIndexed( items = day.events, @@ -362,10 +367,16 @@ private fun AgendaList( } @Composable -private fun AgendaDayHeader(date: LocalDate, today: LocalDate) { +private fun AgendaDayHeader( + date: LocalDate, + today: LocalDate, + onOpenDay: (LocalDate) -> Unit, +) { Surface( color = MaterialTheme.colorScheme.surface, - modifier = Modifier.fillMaxWidth(), + modifier = Modifier + .fillMaxWidth() + .clickable { onOpenDay(date) }, ) { Text( text = agendaDayLabel(date, today), diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt index c40ab29..3af71f0 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt @@ -128,6 +128,7 @@ private fun WeekUiState.Success.allDayStripHeight(): Dp { fun WeekScreen( selectedView: CalendarView, onSelectView: (CalendarView) -> Unit, + onOpenDay: (LocalDate) -> Unit, onEventClick: (EventInstance) -> Unit, onOpenSettings: () -> Unit, onOpenSearch: () -> Unit, @@ -249,6 +250,7 @@ fun WeekScreen( onSwipePrev = goPrev, onRetry = jumpToToday, onEventClick = onEventClick, + onOpenDay = onOpenDay, onCreateAt = { d, minutes -> onCreateEvent(d, minutes) }, modifier = Modifier .padding(innerPadding) @@ -268,6 +270,7 @@ private fun WeekContent( onSwipePrev: () -> Unit, onRetry: () -> Unit, onEventClick: (EventInstance) -> Unit, + onOpenDay: (LocalDate) -> Unit, onCreateAt: (LocalDate, Int) -> Unit, modifier: Modifier = Modifier, ) { @@ -342,6 +345,7 @@ private fun WeekContent( scrollState = scrollState, allDayHeight = allDayHeight, onEventClick = onEventClick, + onOpenDay = onOpenDay, onCreateAt = onCreateAt, ) } @@ -355,6 +359,7 @@ private fun WeekSuccess( scrollState: ScrollState, allDayHeight: Dp, onEventClick: (EventInstance) -> Unit, + onOpenDay: (LocalDate) -> Unit, onCreateAt: (LocalDate, Int) -> Unit, ) { Column(modifier = Modifier.fillMaxSize()) { @@ -363,7 +368,7 @@ private fun WeekSuccess( .fillMaxWidth() .background(topSectionColor), ) { - WeekDayHeader(days = state.days, today = state.today) + WeekDayHeader(days = state.days, today = state.today, onOpenDay = onOpenDay) AllDayStrip(state = state, height = allDayHeight, onEventClick = onEventClick) } // Breathing room between the (colour-shifting) top section and the @@ -427,7 +432,11 @@ private fun WeekTopBar( } @Composable -private fun WeekDayHeader(days: List, today: LocalDate) { +private fun WeekDayHeader( + days: List, + today: LocalDate, + onOpenDay: (LocalDate) -> Unit, +) { val locale = currentLocale() val weekStart = days.first() val weekNumber = remember(weekStart) { @@ -453,7 +462,10 @@ private fun WeekDayHeader(days: List, today: LocalDate) { val javaDow = java.time.DayOfWeek.of(date.dayOfWeek.ordinal + 1) val isToday = date == today Column( - modifier = Modifier.weight(1f), + modifier = Modifier + .weight(1f) + .clip(RoundedCornerShape(12.dp)) + .clickable { onOpenDay(date) }, horizontalAlignment = Alignment.CenterHorizontally, ) { Text( From b449fff77cab430f0cec49b307f272c5918d836c Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Mon, 6 Jul 2026 21:34:40 +0200 Subject: [PATCH 2/2] =?UTF-8?q?release:=20v2.14.0=20=E2=80=94=20Day=20view?= =?UTF-8?q?=20on=20date-header=20tap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump versionName to 2.14.0 (versionCode 21400) and cut the changelog for the day-view-on-date-header-tap feature (#37). Merging this to main triggers the release pipeline. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 10 ++++++++++ app/build.gradle.kts | 4 ++-- fastlane/metadata/android/en-US/changelogs/21400.txt | 7 +++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/21400.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 3526c95..cf85561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.14.0] — 2026-07-06 + +### Added +- Tap a date header to open that day. In Week and Agenda view, tapping a date + header now opens that date in Day view — the same drill-in that Month view and + the agenda widget already offered, so every view behaves the same way. It makes + jumping to a specific day quicker: switch to Week, swipe to the week you want, + then tap the date to open it. Thanks to @ptab for the suggestion ([#37]). + ## [2.13.1] — 2026-07-06 ### Added @@ -838,3 +847,4 @@ automatically, with zero telemetry and no internet permission. [#29]: https://codeberg.org/jlmakiola/calendula/issues/29 [#30]: https://codeberg.org/jlmakiola/calendula/issues/30 [#34]: https://codeberg.org/jlmakiola/calendula/issues/34 +[#37]: https://codeberg.org/jlmakiola/calendula/issues/37 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 38a3422..dc638b4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,8 +28,8 @@ android { // which builds this version and then creates the matching vX.Y.Z tag + // release itself (versionCode is pinned to MAJOR*10000 + MINOR*100 + // PATCH from versionName, e.g. 2.7.2 -> 20702). See docs/RELEASING.md. - versionCode = 21301 - versionName = "2.13.1" + versionCode = 21400 + versionName = "2.14.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/fastlane/metadata/android/en-US/changelogs/21400.txt b/fastlane/metadata/android/en-US/changelogs/21400.txt new file mode 100644 index 0000000..e6f8195 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/21400.txt @@ -0,0 +1,7 @@ +### Added +- Tap a date header to open that day. In Week and Agenda view, tapping a date + header now opens that date in Day view — the same drill-in that Month view and + the agenda widget already offered, so every view behaves the same way. It makes + jumping to a specific day quicker: switch to Week, swipe to the week you want, + then tap the date to open it. Thanks to @ptab for the suggestion ([#37]). +