fix: focus keybindings search when opening Manage Shortcuts (FE-845)#12709
fix: focus keybindings search when opening Manage Shortcuts (FE-845)#12709LittleSound wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adjusts focus management in the settings dialog by making the general SearchInput autofocus conditional and ensuring the keybindings SearchInput receives focus when that panel is active. A test verifies the new focus behavior when navigating to keybindings via the shortcuts panel. ChangesKeybinding Search Focus Management
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ✅ 1666 passed, 0 failed · 1 flaky📊 Browser Reports
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #12709 +/- ##
===========================================
- Coverage 76.61% 61.33% -15.29%
===========================================
Files 1561 1448 -113
Lines 105415 75006 -30409
Branches 32300 19527 -12773
===========================================
- Hits 80765 46002 -34763
- Misses 23827 28650 +4823
+ Partials 823 354 -469
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1154 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Summary
Opening the Keybinding panel from the Manage Shortcuts button now focuses the Search Keybindings field instead of the Search Settings field.
Changes
autofocus, so opening directly to the keybinding panel always stole focus to the wrong field. Made it conditional (:autofocus="activeCategoryKey !== 'keybinding'") and addedautofocusto the keybinding panel's own search input.Review Focus
autofocusmaps to the native attribute, which only fires on DOM insertion — flipping the reactive:autofocuswhile navigating between categories inside the dialog will not re-steal focus, so there is no regression for in-dialog navigation.Fixes FE-845