-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
Feature: keyboard scrolling with j and k #117
Feature: keyboard scrolling with j and k #117
Conversation
Thanks for your PR, I just tested it and it worked well! To have full keyboard support, instead of scrolling a fixed amount, we'll need to scroll item by item, and be able to take actions for each item (e.g. press S to save/unsave, etc). So one change to be made is, in addition to tracking which column is selected, we need to track which item is selected. Instead of using Please check https://tweetdeck.twitter.com/, we could make the exact same behavior as them. Play with it by pressing H/J/K/L or the LEFT/UP/DOWN/RIGHT arrows. You'll notice a few things:
About the code, there's some performance optimizations to be made. One alternative could be to make Let me know if you are willing to make these changes. |
Awesome, thanks for the review. I'll work on these changes :) |
Ok. The functionality now is closer to what you specified. Now it's time for performance improvements. I'm using |
It's pretty good now, thanks for your contribution! 🎉🎉🎉 I'll merge and play with it a little bit. |
🎉 |
This is my go on implementing this feature. Not much experience with TypeScript so any tips and reviews are welcome. I'll gladly refactor this to make it better. :)
Both the scrolling amount and the wait time for another scrolling are hardcoded. I'm gonna rename it to constants to make it more readable. So far, what do you all think? The functionality is implemented, you just need to select a column and press
j
andk
to scroll it up and down. Multiple press don't really behave well, so that's why I mitigated this by putting a scrolling flag on event.