-
-
Notifications
You must be signed in to change notification settings - Fork 238
feat: add keyboard navigation to compare page package search #1377
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
feat: add keyboard navigation to compare page package search #1377
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughAdds full keyboard navigation to PackageSelector.vue: introduces highlightedIndex, listRef and PAGE_JUMP; constructs navigableItems (No-Dependency + filtered results) with an index offset; handles ArrowUp/ArrowDown, PageUp/PageDown, Enter (select highlighted or fall back to exact-match/easter-egg), and Escape (clear input/reset highlight); resets highlightedIndex on input changes and package add; auto-scrolls highlighted item into view; renders No-Dependency and results as navigable items with mouseenter updating highlight. Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
|
This works really nicely! |
|
Thanks @whitep4nth3r . 😊 |
most probably resolves #1346
In the compare page, we search packages to compare. Now, suppose we search "nuxt". So it provides you a list of suggestion. If we want to select any package from the suggestion list we need to use our mouse or touchpad to select a package from the suggestion list. It would be really nice if we can use keyboard page up and page down to select the packages from the suggestion list. That is the new feature of keyboard navigation. We can now select packages from the suggestion list using page up and page down in the keyboard.
Before: We get suggestion of packages and if we want to select we need to use mouse or touchpad.

After: We can now pick packages using page up or page down in the keyboard
