news: expand category chips back in when search clears
- Commit
5074f10e95a8baef0820dbe2e3a2d73e6437526a- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-05 16:25 UTC (11 hours ago)
- Parents
49f9701
The category chip row vanished in a cut when search started and popped back when it cleared. It now opens and closes through ExpandVisibility in the feed column. The refresh- failed line stays instant, as before. 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
news/src/main/java/com/vayunmathur/news/ui/FeedScreen.kt
diff --git a/news/src/main/java/com/vayunmathur/news/ui/FeedScreen.kt b/news/src/main/java/com/vayunmathur/news/ui/FeedScreen.ktindex f10df32aff..2c3f328cd1 100644--- a/news/src/main/java/com/vayunmathur/news/ui/FeedScreen.kt+++ b/news/src/main/java/com/vayunmathur/news/ui/FeedScreen.kt@@ -16,6 +16,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.vayunmathur.library.ui.AppScaffold+import com.vayunmathur.library.ui.ExpandVisibility import com.vayunmathur.library.ui.R as UiR import com.vayunmathur.library.ui.ScaffoldSearch import com.vayunmathur.library.ui.adaptiveGridCells@@ -119,7 +120,7 @@ internal fun FeedContent( }, ) { padding -> Column(modifier = Modifier.fillMaxSize().padding(padding)) {- if (!searching) {+ ExpandVisibility(visible = !searching) { // Category chips (single-select, "All" = no category filter). val categories = (SourceCatalog.categoriesAmong(SourceCatalog.sources) + listOfNotNull(categoryFilter)).distinct()