-
Notifications
You must be signed in to change notification settings - Fork 537
support keyboard-first navigation #3963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
a5321d8
a0a9f88
d54d2c7
e5dbecc
04276d1
da07a02
5b6cc42
a2c2877
69b395c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -931,7 +931,7 @@ function useTabsShortcuts() { | |
| ); | ||
|
|
||
| useHotkeys( | ||
| "mod+alt+left", | ||
| "meta+alt+left", | ||
|
||
| () => selectPrev(), | ||
| { | ||
| preventDefault: true, | ||
|
|
@@ -942,7 +942,7 @@ function useTabsShortcuts() { | |
| ); | ||
|
|
||
| useHotkeys( | ||
| "mod+alt+right", | ||
| "meta+alt+right", | ||
| () => selectNext(), | ||
| { | ||
| preventDefault: true, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,7 +121,7 @@ export function SearchableSelect({ | |
| onSelect={() => handleSelect(option.value)} | ||
| className={cn([ | ||
| "cursor-pointer", | ||
| "focus:bg-neutral-200! hover:bg-neutral-200! aria-selected:bg-transparent", | ||
| "hover:bg-neutral-200! data-[selected=true]:bg-neutral-200!", | ||
| ])} | ||
|
Comment on lines
+124
to
125
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚩 searchable-select removes focus: and aria-selected: styles, relying solely on data-[selected=true] The CommandItem styling was changed from Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| > | ||
| <span className="truncate flex-1">{option.label}</span> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚩 ctrl+alt+left/right hotkey collision between AI/Settings sub-tabs and note-input tabs
The new
ctrl+alt+left/righthotkeys added here and insettings.tsx:104-131use the same key combination as the pre-existing hotkeys inapps/desktop/src/components/main/body/sessions/note-input/index.tsx:352-394. Inreact-hotkeys-hook, all mounted handlers for the same key fire. If both the AI/Settings view and the note-input view are mounted simultaneously (e.g., multiple tabs rendered in the DOM), pressingctrl+alt+leftwould trigger both handlers. However, based on the tab rendering pattern (conditional rendering with{activeTab === ...}), only the active tab's content component should be mounted, which likely prevents the conflict. This warrants investigation to confirm that inactive tab content is truly unmounted rather than hidden.Was this helpful? React with 👍 or 👎 to provide feedback.