Modern Apps git

← Modern-Apps.git

games-minesweeper: expand the Continue button when a game is live

Commit
b63ceca385a0d352d7a6e5823fd3e5db9442aa66
Author
Vayun Mathur <[email protected]>
When
2026-12-05 16:25 UTC (17 hours ago)
Parents
efd095d
The Continue button mounted in a cut above New Game once an
active game existed. It now opens through ExpandVisibility in
the home column.

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

games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/ui/HomeScreen.kt
diff --git a/games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/ui/HomeScreen.kt b/games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/ui/HomeScreen.ktindex 73cb77e82b..70934223d0 100644--- a/games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/ui/HomeScreen.kt+++ b/games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/ui/HomeScreen.kt@@ -26,6 +26,7 @@ import com.vayunmathur.library.ui.AppScaffold import com.vayunmathur.library.ui.Button import com.vayunmathur.library.ui.Card import com.vayunmathur.library.ui.DesktopMaxWidthContainer+import com.vayunmathur.library.ui.ExpandVisibility import com.vayunmathur.library.ui.MaterialTheme import com.vayunmathur.library.ui.R as UiR import com.vayunmathur.library.ui.Spacing@@ -58,7 +59,7 @@ fun HomeScreen(             horizontalAlignment = Alignment.CenterHorizontally,             verticalArrangement = Arrangement.spacedBy(Spacing.md),         ) {-            if (viewModel.hasActiveGame()) {+            ExpandVisibility(visible = viewModel.hasActiveGame()) {                 Button(                     onClick = { backStack.add(Route.Game(uiState.config)) },                     modifier = Modifier.fillMaxWidth(),