From 9cfbf3fe968d7098b9ca424f6cd36f8c5f7302c8 Mon Sep 17 00:00:00 2001 From: Matteo Baglini Date: Tue, 28 Jan 2025 11:45:49 +0100 Subject: [PATCH 1/3] chore: ignore asdf configuration file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2e42dbc..2da150d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /lib *.tgz /LICENSES +.tool-versions \ No newline at end of file From a4f0dd5771acea32459c9b8c9cbe7aeb361f0835 Mon Sep 17 00:00:00 2001 From: Matteo Baglini Date: Tue, 28 Jan 2025 11:55:12 +0100 Subject: [PATCH 2/3] feat: removed space as separator to create chips --- src/components/search-bar.test.tsx | 4 ++-- src/components/search-bar.tsx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/search-bar.test.tsx b/src/components/search-bar.test.tsx index f11c31b..224201f 100644 --- a/src/components/search-bar.test.tsx +++ b/src/components/search-bar.test.tsx @@ -70,7 +70,7 @@ describe('Search bar', () => { ).toBeVisible(); }); - it.each(['[Enter]', ',', '[Space]'])( + it.each(['[Enter]', ','])( 'should enable the search button when the user presses keyboard key (%s) to add the chips', async (key) => { const { user } = setup(); @@ -372,7 +372,7 @@ describe('Search bar', () => { screen.getByRole('textbox', { name: `Search in ${app1SearchView.label}` }), 'key1' ); - await user.type(screen.getByRole('textbox'), ' '); + await user.type(screen.getByRole('textbox'), ','); expect(localStorageStore[LOCAL_STORAGE_SEARCH_KEY]).toContainEqual({ value: 'key1', label: 'key1', diff --git a/src/components/search-bar.tsx b/src/components/search-bar.tsx index 06cda00..0a8a755 100644 --- a/src/components/search-bar.tsx +++ b/src/components/search-bar.tsx @@ -374,8 +374,7 @@ export const SearchBar = (): React.JSX.Element => { confirmChipOnBlur={false} separators={[ { key: 'Enter', ctrlKey: false }, - { key: ',', ctrlKey: false }, - { key: ' ', ctrlKey: false } + { key: ',', ctrlKey: false } ]} background={searchDisabled ? 'gray5' : 'gray6'} onChange={onQueryChange} From 9054f5cda5bae6cb0a1d9c7733530ce40768d7e4 Mon Sep 17 00:00:00 2001 From: Matteo Baglini Date: Thu, 30 Jan 2025 16:32:47 +0100 Subject: [PATCH 3/3] chore: update default search bar label --- src/components/search-bar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/search-bar.tsx b/src/components/search-bar.tsx index 0a8a755..9394da0 100644 --- a/src/components/search-bar.tsx +++ b/src/components/search-bar.tsx @@ -271,7 +271,7 @@ export const SearchBar = (): React.JSX.Element => { const placeholder = useMemo( () => inputHasFocus && currentSearchModuleRoute - ? t('search.active_input_label', 'Separate your keywords by a comma or pressing TAB') + ? t('search.active_input_label', 'Separate your keywords by a comma') : t('search.idle_input_label', 'Search in {{module}}', { module: moduleLabel }),