Modern Apps git

← Modern-Apps.git

launcher: simplify search hints to Search

Commit
b5c552620122881766312d421a0020bc141b936b
Author
Vayun Mathur <[email protected]>
When
2026-12-02 03:07 UTC (4 days ago)
Parents
8a21c7e
The app drawer hinted "Search apps" and the widget picker
"Search widgets", both hardcoded. Both now use the shared
localized UiR.string.search; tests and instrumented
constants that pinned the old text now use "Search".

Verified: :launcher:testDevUnitTest green (407 tests).
:launcher:lint and :launcher:lintVitalRelease are red at
baseline (1 DialogAsRoute error in untouched
ItemMenuContent) and remain so unchanged.

Diff

launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.kt
diff --git a/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.kt b/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.ktindex cfa3e78084..3eb6573f68 100644--- a/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.kt+++ b/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.kt@@ -21,7 +21,7 @@ import org.junit.runner.RunWith  *  * Launcher's home screen paints wallpaper plus icons whose labels come from the  * installed apps, so no literal text there is stable enough to assert on. The- * drawer is an overlay on that same screen with a hardcoded "Search apps" field,+ * drawer is an overlay on that same screen with a hardcoded "Search" field,  * so the test swipes it open and keys on that instead.  *  * UiDevice polling, not compose-test: compose's Espresso idle-sync reflects on@@ -100,7 +100,7 @@ class FullE2eTest {     private companion object {         private const val CONTENT_TIMEOUT_MS = 15_000L         private const val GATE_TIMEOUT_MS = 5_000L-        private const val SEARCH_PLACEHOLDER = "Search apps"+        private const val SEARCH_PLACEHOLDER = "Search"         private const val PERMISSION_GATE_TITLE = "Grant Required Permissions"          /**
launcher/src/androidTest/java/com/vayunmathur/launcher/ui/LauncherHomeTest.kt
diff --git a/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/LauncherHomeTest.kt b/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/LauncherHomeTest.ktindex d28e8db018..ef06533d90 100644--- a/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/LauncherHomeTest.kt+++ b/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/LauncherHomeTest.kt@@ -20,7 +20,7 @@ import org.junit.runner.RunWith  *  * Launcher's home screen paints wallpaper plus icons whose labels come from the installed  * apps, so no literal text there is stable enough to assert on. The drawer is an overlay on- * that same screen with a hardcoded "Search apps" field; typing filters the drawer in place+ * that same screen with a hardcoded "Search" field; typing filters the drawer in place  * and the typed query rendering proves the interaction landed without a crash.  *  * UiDevice polling, not compose-test: compose's Espresso idle-sync reflects on@@ -109,7 +109,7 @@ class LauncherHomeTest {     private companion object {         private const val CONTENT_TIMEOUT_MS = 15_000L         private const val GATE_TIMEOUT_MS = 5_000L-        private const val SEARCH_PLACEHOLDER = "Search apps"+        private const val SEARCH_PLACEHOLDER = "Search"         private const val EDIT_TEXT_CLASS = "android.widget.EditText"         private const val QUERY = "hello"         private const val PERMISSION_GATE_TITLE = "Grant Required Permissions"
launcher/src/main/java/com/vayunmathur/launcher/ui/DrawerContent.kt
diff --git a/launcher/src/main/java/com/vayunmathur/launcher/ui/DrawerContent.kt b/launcher/src/main/java/com/vayunmathur/launcher/ui/DrawerContent.ktindex 8398bbbcf4..70348fd350 100644--- a/launcher/src/main/java/com/vayunmathur/launcher/ui/DrawerContent.kt+++ b/launcher/src/main/java/com/vayunmathur/launcher/ui/DrawerContent.kt@@ -27,6 +27,7 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip+import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.vayunmathur.launcher.platform.DrawerActions import com.vayunmathur.launcher.platform.DrawerUiState@@ -39,6 +40,7 @@ import com.vayunmathur.library.ui.SettingsSwitchRow import com.vayunmathur.library.ui.Spacing import com.vayunmathur.library.ui.Tab import com.vayunmathur.library.ui.Text+import com.vayunmathur.library.ui.R as UiR import kotlinx.coroutines.launch  /**@@ -111,9 +113,7 @@ fun DrawerContent(             CommonSearchBar(                 value = state.query,                 onValueChange = actions::setQuery,-                // The shared default placeholder is a hardcoded "Search", which says nothing on a-                // screen that is only ever a list of apps.-                placeholder = "Search apps",+                placeholder = stringResource(UiR.string.search),                 padding = PaddingValues(horizontal = Spacing.lg, vertical = Spacing.sm),             ) 
launcher/src/main/java/com/vayunmathur/launcher/ui/WidgetPickerContent.kt
diff --git a/launcher/src/main/java/com/vayunmathur/launcher/ui/WidgetPickerContent.kt b/launcher/src/main/java/com/vayunmathur/launcher/ui/WidgetPickerContent.ktindex fe15a82d8c..5de8066698 100644--- a/launcher/src/main/java/com/vayunmathur/launcher/ui/WidgetPickerContent.kt+++ b/launcher/src/main/java/com/vayunmathur/launcher/ui/WidgetPickerContent.kt@@ -20,6 +20,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.layout.ContentScale+import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.vayunmathur.launcher.platform.LocalIconLoader import com.vayunmathur.launcher.platform.WidgetEntry@@ -31,6 +32,7 @@ import com.vayunmathur.library.ui.MaterialTheme import com.vayunmathur.library.ui.SettingsSection import com.vayunmathur.library.ui.Spacing import com.vayunmathur.library.ui.Text+import com.vayunmathur.library.ui.R as UiR import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -56,7 +58,7 @@ fun WidgetPickerContent(         CommonSearchBar(             value = state.query,             onValueChange = actions::setWidgetQuery,-            placeholder = "Search widgets",+            placeholder = stringResource(UiR.string.search),             padding = PaddingValues(horizontal = Spacing.lg, vertical = Spacing.sm),         ) 
launcher/src/test/java/com/vayunmathur/launcher/ui/LauncherHomePopupsTest.kt
diff --git a/launcher/src/test/java/com/vayunmathur/launcher/ui/LauncherHomePopupsTest.kt b/launcher/src/test/java/com/vayunmathur/launcher/ui/LauncherHomePopupsTest.ktindex be988414f5..865bba4c44 100644--- a/launcher/src/test/java/com/vayunmathur/launcher/ui/LauncherHomePopupsTest.kt+++ b/launcher/src/test/java/com/vayunmathur/launcher/ui/LauncherHomePopupsTest.kt@@ -90,7 +90,7 @@ class LauncherHomePopupsTest {      @Test fun widgetPickerSheetOpens() {         show(menuItemId = null, widgetPickerOpen = true)-        rule.onNodeWithText("Search widgets").assertIsDisplayed()+        rule.onNodeWithText("Search").assertIsDisplayed()     }