shop: expand the link prompt and scoped-search chip
- Commit
ef618178889d3ed21494d483ac316f4496ad26a4- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-05 16:25 UTC (22 hours ago)
- Parents
d96d5ca
The open-by-default prompt card and the results-from-store chip mounted in a cut above the results. Both now open through ExpandVisibility in the search column. Search errors and the empty state stay 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
shop/src/main/java/com/vayunmathur/shop/ui/SearchScreen.kt
diff --git a/shop/src/main/java/com/vayunmathur/shop/ui/SearchScreen.kt b/shop/src/main/java/com/vayunmathur/shop/ui/SearchScreen.ktindex 999aa4eb52..354c3fe670 100644--- a/shop/src/main/java/com/vayunmathur/shop/ui/SearchScreen.kt+++ b/shop/src/main/java/com/vayunmathur/shop/ui/SearchScreen.kt@@ -38,6 +38,7 @@ import com.vayunmathur.library.image.compose.AsyncImage import com.vayunmathur.library.ui.AppScaffold import com.vayunmathur.library.ui.Card import com.vayunmathur.library.ui.EmptyState+import com.vayunmathur.library.ui.ExpandVisibility import com.vayunmathur.library.ui.ErrorState import com.vayunmathur.library.ui.IconButton import com.vayunmathur.library.ui.IconClose@@ -129,15 +130,19 @@ internal fun SearchContent( ), ) { padding -> Column(Modifier.fillMaxSize().padding(padding)) {- linkPrompt?.let { LinkPromptCard(it) }- scopeName?.let { name ->- InputChip(+ ExpandVisibility(visible = linkPrompt != null) {+ linkPrompt?.let { LinkPromptCard(it) }+ }+ ExpandVisibility(visible = scopeName != null) {+ scopeName?.let { name ->+ InputChip( selected = true, onClick = onClearScope, label = { Text(stringResource(R.string.results_from_store, name)) }, trailingIcon = { IconClose() }, modifier = Modifier.padding(horizontal = 16.dp),- )+ )+ } } ProductResults( results = results,