From 0a73072ff164dcf12673d5ca16bc0cce20fd8aeb Mon Sep 17 00:00:00 2001 From: Arjan Singh <1598641+arjansingh@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:32:27 -0700 Subject: [PATCH] feat(AssetBrowserModal): set initial focus to SearchBox (#5945) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Some quick design feedback. ## Changes 1. Fix the placeholder text so it's showing up correctly. 2. Make the SearchBox take initial focus when the modal is opened. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5945-feat-AssetBrowserModal-set-initial-focus-to-SearchBox-2846d73d365081bfb3e0cde78c827d5f) by [Unito](https://www.unito.io) --- src/components/input/SearchBox.stories.ts | 4 ++-- src/components/input/SearchBox.vue | 14 +++++++++----- src/locales/en/main.json | 2 +- .../assets/components/AssetBrowserModal.vue | 1 + 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/components/input/SearchBox.stories.ts b/src/components/input/SearchBox.stories.ts index 845a62059..f339fa1e7 100644 --- a/src/components/input/SearchBox.stories.ts +++ b/src/components/input/SearchBox.stories.ts @@ -8,7 +8,7 @@ const meta: Meta = { component: SearchBox, tags: ['autodocs'], argTypes: { - placeHolder: { + placeholder: { control: 'text' }, showBorder: { @@ -22,7 +22,7 @@ const meta: Meta = { } }, args: { - placeHolder: 'Search...', + placeholder: 'Search...', showBorder: false, size: 'md' } diff --git a/src/components/input/SearchBox.vue b/src/components/input/SearchBox.vue index bf05daf8b..5e82736d3 100644 --- a/src/components/input/SearchBox.vue +++ b/src/components/input/SearchBox.vue @@ -5,10 +5,10 @@ ref="input" v-model="searchQuery" :aria-label=" - placeHolder || t('templateWidgets.sort.searchPlaceholder', 'Search...') + placeholder || t('templateWidgets.sort.searchPlaceholder', 'Search...') " :placeholder=" - placeHolder || t('templateWidgets.sort.searchPlaceholder', 'Search...') + placeholder || t('templateWidgets.sort.searchPlaceholder', 'Search...') " type="text" unstyled @@ -19,17 +19,19 @@