From 4c05c86e95c19f28e20d98cd2e19917ef15f39bd Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sun, 28 Jun 2026 15:13:06 +0200 Subject: [PATCH] motion: use floret-kit's expandEnter/collapseExit for revealable sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the inline expandVertically/shrinkVertically + fade in the reminder picker, task edit form and settings with the shared transitions — which adds reduced-motion support and the Expressive springs. Bumps the submodule. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../agendula/ui/common/ReminderLeadPicker.kt | 10 ++++------ .../jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt | 10 ++++------ .../agendula/ui/settings/SettingsScreen.kt | 8 ++++---- floret-kit | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/common/ReminderLeadPicker.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/common/ReminderLeadPicker.kt index 5d6016a..9abcd88 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/common/ReminderLeadPicker.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/common/ReminderLeadPicker.kt @@ -9,10 +9,8 @@ import de.jeanlucmakiola.floret.reminders.ReminderOverride import de.jeanlucmakiola.floret.reminders.ReminderUnit import de.jeanlucmakiola.floret.reminders.decomposeReminderMinutes import androidx.compose.animation.AnimatedVisibility -import androidx.compose.animation.expandVertically -import androidx.compose.animation.fadeIn -import androidx.compose.animation.fadeOut -import androidx.compose.animation.shrinkVertically +import de.jeanlucmakiola.floret.identity.collapseExit +import de.jeanlucmakiola.floret.identity.expandEnter import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -99,8 +97,8 @@ fun ReminderLeadPicker( ) AnimatedVisibility( visible = customExpanded, - enter = expandVertically() + fadeIn(), - exit = shrinkVertically() + fadeOut(), + enter = expandEnter(), + exit = collapseExit(), ) { CustomReminderEditor( amountText = amountText, diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt index 4029a20..3dffc7c 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/TaskEditScreen.kt @@ -1,10 +1,8 @@ package de.jeanlucmakiola.agendula.ui.edit import androidx.compose.animation.AnimatedVisibility -import androidx.compose.animation.expandVertically -import androidx.compose.animation.fadeIn -import androidx.compose.animation.fadeOut -import androidx.compose.animation.shrinkVertically +import de.jeanlucmakiola.floret.identity.collapseExit +import de.jeanlucmakiola.floret.identity.expandEnter import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.isSystemInDarkTheme @@ -549,8 +547,8 @@ private fun EditContent( private fun OptionalFormSection(visible: Boolean, content: @Composable ColumnScope.() -> Unit) { AnimatedVisibility( visible = visible, - enter = expandVertically() + fadeIn(), - exit = shrinkVertically() + fadeOut(), + enter = expandEnter(), + exit = collapseExit(), ) { Column(modifier = Modifier.fillMaxWidth(), content = content) } diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/settings/SettingsScreen.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/settings/SettingsScreen.kt index b6efcd6..a5179cd 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/settings/SettingsScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/settings/SettingsScreen.kt @@ -11,10 +11,8 @@ import androidx.activity.compose.BackHandler import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.animation.AnimatedVisibility -import androidx.compose.animation.expandVertically import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut -import androidx.compose.animation.shrinkVertically import androidx.compose.animation.slideInHorizontally import androidx.compose.animation.slideOutHorizontally import androidx.compose.foundation.background @@ -93,6 +91,8 @@ import de.jeanlucmakiola.floret.components.Position import de.jeanlucmakiola.agendula.ui.common.ReminderLeadPicker import de.jeanlucmakiola.floret.components.pastelize import de.jeanlucmakiola.floret.components.positionOf +import de.jeanlucmakiola.floret.identity.collapseExit +import de.jeanlucmakiola.floret.identity.expandEnter import de.jeanlucmakiola.floret.identity.predictiveBack import de.jeanlucmakiola.floret.locale.AppLanguage import de.jeanlucmakiola.floret.reminders.ReminderOverride @@ -457,8 +457,8 @@ private fun RemindersScreen( ) AnimatedVisibility( visible = perListExpanded, - enter = expandVertically() + fadeIn(), - exit = shrinkVertically() + fadeOut(), + enter = expandEnter(), + exit = collapseExit(), ) { Column { lists.forEachIndexed { index, list -> diff --git a/floret-kit b/floret-kit index 2085b82..ea96e97 160000 --- a/floret-kit +++ b/floret-kit @@ -1 +1 @@ -Subproject commit 2085b82a5e7f445f95e4fb61460c8363202b036e +Subproject commit ea96e970c79fd231c709525cfd127244529b6b7d