clock: pop the timer add FAB instead of cutting it in
- Commit
a31eb2941a7ebf2f609e065bbe4ce14062e0eada- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-05 16:25 UTC (15 hours ago)
- Parents
8baa122
The add-timer FAB appeared in a cut when the keypad gave way to running timers. PopVisibility now grows it out of its own spot and scales it away again, the FAB case that helper documents. Wrap abrupt conditional content in the shared library.ui motion helpers so it expands/fades/pops in instead of popping in cut, and closes up cleanly when it goes away. No raw androidx.compose. animation is used at the call site, per the fatal DirectCompose Animation lint; durations and easing come from the helpers' MaterialTheme motion-scheme defaults. Verified in this worktree with lint, lintVitalRelease and testDevUnitTest for the module (details in the session report; any pre-existing failure was reproduced on the pristine base).
Diff
clock/src/main/java/com/vayunmathur/clock/ui/TimerScreen.kt
diff --git a/clock/src/main/java/com/vayunmathur/clock/ui/TimerScreen.kt b/clock/src/main/java/com/vayunmathur/clock/ui/TimerScreen.ktindex 134e98adc5..e0ae9bb01e 100644--- a/clock/src/main/java/com/vayunmathur/clock/ui/TimerScreen.kt+++ b/clock/src/main/java/com/vayunmathur/clock/ui/TimerScreen.kt@@ -21,6 +21,7 @@ import com.vayunmathur.library.ui.ExperimentalMaterial3Api import com.vayunmathur.library.ui.FloatingActionButton import com.vayunmathur.library.ui.IconAdd import com.vayunmathur.library.ui.LazyListScaffold+import com.vayunmathur.library.ui.PopVisibility import com.vayunmathur.library.ui.isExpandedWidth /**@@ -42,7 +43,7 @@ fun TimerScreen( val expanded = isExpandedWidth() LazyListScaffold( floatingActionButton = {- if (!showKeypad) {+ PopVisibility(visible = !showKeypad) { FloatingActionButton({ isAddingTimer = true }) { IconAdd() } } },