From a463e8b1e6a2608080a4ba8db5592113cba3204b Mon Sep 17 00:00:00 2001 From: David Leek Date: Wed, 3 Jul 2024 09:33:28 +0200 Subject: [PATCH] chore: command bar feedback focus and text size (#7521) --- frontend/src/component/commandBar/CommandBar.tsx | 6 +++++- frontend/src/component/commandBar/CommandBarFeedback.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/component/commandBar/CommandBar.tsx b/frontend/src/component/commandBar/CommandBar.tsx index 34170b95a1..53e824430d 100644 --- a/frontend/src/component/commandBar/CommandBar.tsx +++ b/frontend/src/component/commandBar/CommandBar.tsx @@ -202,7 +202,11 @@ export const CommandBar = () => { const onKeyDown = (event: React.KeyboardEvent) => { if (event.key === 'Escape') { setShowSuggestions(false); - } else if (event.keyCode >= 48 && event.keyCode <= 110) { + } else if ( + event.keyCode >= 48 && + event.keyCode <= 110 && + !hasNoResults + ) { searchInputRef.current?.focus(); } }; diff --git a/frontend/src/component/commandBar/CommandBarFeedback.tsx b/frontend/src/component/commandBar/CommandBarFeedback.tsx index 564c28ef63..060ffe6d5c 100644 --- a/frontend/src/component/commandBar/CommandBarFeedback.tsx +++ b/frontend/src/component/commandBar/CommandBarFeedback.tsx @@ -14,7 +14,7 @@ const StyledContainer = styled('div')(({ theme }) => ({ })); const StyledText = styled('span')(({ theme }) => ({ - fontSize: theme.spacing(1.5), + fontSize: theme.fontSizes.bodySize, })); const StyledButton = styled(Button)(({ theme }) => ({