fix(ui): support Tab key to select items in tag, env-var, and resource dropdowns#4096
fix(ui): support Tab key to select items in tag, env-var, and resource dropdowns#4096waleedlatif1 merged 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Selection handlers now call Reviewed by Cursor Bugbot for commit fba9b16. Configure here. |
Greptile SummaryThis PR adds Tab key support as an alternative to Enter for selecting items in the tag, env-var, and resource dropdowns. All three implementations correctly guard against Shift+Tab (to preserve reverse-focus behavior) and check for a valid selected index before calling Confidence Score: 5/5Safe to merge — all three implementations correctly handle Tab selection with proper Shift+Tab and empty-list guards. No P0 or P1 findings. The Shift+Tab guard and item-existence checks are consistently applied across all three components. Behavior mirrors the existing Enter key path exactly, which is well-tested. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[keydown event captured] --> B{key?}
B -- ArrowDown/ArrowUp --> C[Update selectedIndex]
B -- Tab --> D{shiftKey?}
B -- Enter --> G
B -- Escape --> H[Close dropdown]
D -- Yes --> E[break — no preventDefault\nShift+Tab moves focus naturally]
D -- No --> F{valid selectedIndex\n& item exists?}
F -- No --> E2[break — no preventDefault\nTab moves focus naturally]
F -- Yes --> G[preventDefault + stopPropagation\nSelect item — close dropdown]
Reviews (3): Last reviewed commit: "fix(ui): guard Tab selection against Shi..." | Re-trigger Greptile |
...]/home/components/mothership-view/components/add-resource-dropdown/add-resource-dropdown.tsx
Outdated
Show resolved
Hide resolved
|
@greptile |
|
@cursor review |
...wId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown.tsx
Show resolved
Hide resolved
...wId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown.tsx
Show resolved
Hide resolved
...itor/components/sub-block/components/tag-dropdown/components/keyboard-navigation-handler.tsx
Show resolved
Hide resolved
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fba9b16. Configure here.
Summary
Type of Change
Testing
Tested manually
Checklist