From 4f86eb5731aa4d7f24fa6431c2b850d005e7854e Mon Sep 17 00:00:00 2001 From: ajnart Date: Sat, 22 Aug 2026 10:53:16 +0200 Subject: [PATCH] fix: address board switcher review --- .../src/components/board/board-switcher.tsx | 16 +++++++++++----- packages/translation/src/lang/en.json | 3 ++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/apps/nextjs/src/components/board/board-switcher.tsx b/apps/nextjs/src/components/board/board-switcher.tsx index d9ecba21f..bb309b6b4 100644 --- a/apps/nextjs/src/components/board/board-switcher.tsx +++ b/apps/nextjs/src/components/board/board-switcher.tsx @@ -16,6 +16,7 @@ import { ThemeIcon, UnstyledButton, useMatches, + VisuallyHidden, } from "@mantine/core"; import { useHotkeys } from "@mantine/hooks"; import { IconArrowDown, IconArrowRight, IconLayoutBoard, IconReplace } from "@tabler/icons-react"; @@ -54,10 +55,7 @@ export const BoardSwitcher = ({ children }: BoardSwitcherProps) => { }); const availableBoards = useMemo( - () => - boards - .filter((board) => board.id !== currentBoard?.id) - .toSorted((first, second) => first.name.localeCompare(second.name)), + () => boards.filter((board) => board.id !== currentBoard?.id), [boards, currentBoard?.id], ); const filteredBoards = useMemo(() => { @@ -176,7 +174,15 @@ export const BoardSwitcher = ({ children }: BoardSwitcherProps) => { overlayProps={{ backgroundOpacity: 0.18, blur: 2 }} transitionProps={{ transition: "fade", duration: 100, timingFunction: "ease" }} > - + + {t("keyboard.instructions")} {results} diff --git a/packages/translation/src/lang/en.json b/packages/translation/src/lang/en.json index 8b7c8e241..b67a8a6ab 100644 --- a/packages/translation/src/lang/en.json +++ b/packages/translation/src/lang/en.json @@ -5140,7 +5140,8 @@ "currentHidden": "Current board: {name}", "keyboard": { "navigate": "Navigate", - "open": "Open" + "open": "Open", + "instructions": "Type to filter boards. Use the arrow keys to move through results and Enter to open a board." }, "empty": { "title": "No other boards",