shop: simplify search hint to Search
- Commit
4e1453d8f5bd7e4d6c8fc3b57f41acbf0c5f225e- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-02 03:07 UTC (4 days ago)
- Parents
390bf99
The search screen hinted "Search products". Use the shared localized UiR.string.search, delete the unused search_products string from both locales, and update the instrumented tests that waited on the old hint. Verified: :shop:lint, :shop:lintVitalRelease and :shop:testDevUnitTest (163 tests) green.
Diff
shop/src/androidTest/java/com/vayunmathur/shop/ui/CoreJourneyTest.kt
diff --git a/shop/src/androidTest/java/com/vayunmathur/shop/ui/CoreJourneyTest.kt b/shop/src/androidTest/java/com/vayunmathur/shop/ui/CoreJourneyTest.ktindex 202e0c7a22..45054033b2 100644--- a/shop/src/androidTest/java/com/vayunmathur/shop/ui/CoreJourneyTest.kt+++ b/shop/src/androidTest/java/com/vayunmathur/shop/ui/CoreJourneyTest.kt@@ -47,7 +47,7 @@ class CoreJourneyTest { device.swipe(500, 1200, 500, 400, 20) } clickText(device, "Continue")- waitAny(device, "Search products", "Shop", "No products found")+ waitAny(device, "Search", "Shop", "No products found") assertEquals(packageName, device.currentPackageName) }
shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.kt
diff --git a/shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.kt b/shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.ktindex ec2f376a34..c0f77b8a06 100644--- a/shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.kt+++ b/shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.kt@@ -63,7 +63,7 @@ class FullE2eTest { assertNotNull( "profile setup form never appeared; the app may have crashed on launch", device.wait(Until.findObject(By.text(PROFILE_SETUP_HEADING)), CONTENT_TIMEOUT_MS)- ?: device.findObject(By.text("Search products")),+ ?: device.findObject(By.text("Search")), ) // Still alive in front: the process did not crash after painting content. assertEquals(packageName, device.currentPackageName)
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 cac98d1818..999aa4eb52 100644--- a/shop/src/main/java/com/vayunmathur/shop/ui/SearchScreen.kt+++ b/shop/src/main/java/com/vayunmathur/shop/ui/SearchScreen.kt@@ -118,7 +118,7 @@ internal fun SearchContent( search = ScaffoldSearch( query = query, onQueryChange = onQueryChange,- placeholder = stringResource(R.string.search_products),+ placeholder = stringResource(UiR.string.search), modifier = Modifier.focusRequester(focusRequester), onSearch = { if (!searching && query.isNotBlank()) {
shop/src/main/res/values-et/strings.xml
diff --git a/shop/src/main/res/values-et/strings.xml b/shop/src/main/res/values-et/strings.xmlindex da79ab7cc7..977aaff826 100644--- a/shop/src/main/res/values-et/strings.xml+++ b/shop/src/main/res/values-et/strings.xml@@ -2,7 +2,6 @@ <resources> <string name="app_name">Pood</string> <string name="search">Otsi</string>- <string name="search_products">Otsi tooteid</string> <string name="no_products_found">Ühtegi toodet ei leidu</string> <string name="check_connection_retry">Sisesta otsing või proovi muud märingt</string> <string name="cart">Ostukorv</string>
shop/src/main/res/values/strings.xml
diff --git a/shop/src/main/res/values/strings.xml b/shop/src/main/res/values/strings.xmlindex d5d0cdda77..14776e585e 100644--- a/shop/src/main/res/values/strings.xml+++ b/shop/src/main/res/values/strings.xml@@ -2,7 +2,6 @@ <resources> <string name="app_name">Shop</string> <string name="search">Search</string>- <string name="search_products">Search products</string> <string name="no_products_found">No products found</string> <string name="check_connection_retry">Enter a search or try a different query</string> <!-- SearchScreen: initial state before any search has run -->