motion: use floret-kit's expandEnter/collapseExit for revealable sections

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) <noreply@anthropic.com>
This commit is contained in:
2026-06-28 15:13:06 +02:00
parent 37662e83bb
commit 4c05c86e95
4 changed files with 13 additions and 17 deletions

View File

@@ -9,10 +9,8 @@ import de.jeanlucmakiola.floret.reminders.ReminderOverride
import de.jeanlucmakiola.floret.reminders.ReminderUnit import de.jeanlucmakiola.floret.reminders.ReminderUnit
import de.jeanlucmakiola.floret.reminders.decomposeReminderMinutes import de.jeanlucmakiola.floret.reminders.decomposeReminderMinutes
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.expandVertically import de.jeanlucmakiola.floret.identity.collapseExit
import androidx.compose.animation.fadeIn import de.jeanlucmakiola.floret.identity.expandEnter
import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkVertically
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
@@ -99,8 +97,8 @@ fun ReminderLeadPicker(
) )
AnimatedVisibility( AnimatedVisibility(
visible = customExpanded, visible = customExpanded,
enter = expandVertically() + fadeIn(), enter = expandEnter(),
exit = shrinkVertically() + fadeOut(), exit = collapseExit(),
) { ) {
CustomReminderEditor( CustomReminderEditor(
amountText = amountText, amountText = amountText,

View File

@@ -1,10 +1,8 @@
package de.jeanlucmakiola.agendula.ui.edit package de.jeanlucmakiola.agendula.ui.edit
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.expandVertically import de.jeanlucmakiola.floret.identity.collapseExit
import androidx.compose.animation.fadeIn import de.jeanlucmakiola.floret.identity.expandEnter
import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkVertically
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.isSystemInDarkTheme
@@ -549,8 +547,8 @@ private fun EditContent(
private fun OptionalFormSection(visible: Boolean, content: @Composable ColumnScope.() -> Unit) { private fun OptionalFormSection(visible: Boolean, content: @Composable ColumnScope.() -> Unit) {
AnimatedVisibility( AnimatedVisibility(
visible = visible, visible = visible,
enter = expandVertically() + fadeIn(), enter = expandEnter(),
exit = shrinkVertically() + fadeOut(), exit = collapseExit(),
) { ) {
Column(modifier = Modifier.fillMaxWidth(), content = content) Column(modifier = Modifier.fillMaxWidth(), content = content)
} }

View File

@@ -11,10 +11,8 @@ import androidx.activity.compose.BackHandler
import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.expandVertically
import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkVertically
import androidx.compose.animation.slideInHorizontally import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally import androidx.compose.animation.slideOutHorizontally
import androidx.compose.foundation.background 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.agendula.ui.common.ReminderLeadPicker
import de.jeanlucmakiola.floret.components.pastelize import de.jeanlucmakiola.floret.components.pastelize
import de.jeanlucmakiola.floret.components.positionOf 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.identity.predictiveBack
import de.jeanlucmakiola.floret.locale.AppLanguage import de.jeanlucmakiola.floret.locale.AppLanguage
import de.jeanlucmakiola.floret.reminders.ReminderOverride import de.jeanlucmakiola.floret.reminders.ReminderOverride
@@ -457,8 +457,8 @@ private fun RemindersScreen(
) )
AnimatedVisibility( AnimatedVisibility(
visible = perListExpanded, visible = perListExpanded,
enter = expandVertically() + fadeIn(), enter = expandEnter(),
exit = shrinkVertically() + fadeOut(), exit = collapseExit(),
) { ) {
Column { Column {
lists.forEachIndexed { index, list -> lists.forEachIndexed { index, list ->