-
-
Notifications
You must be signed in to change notification settings - Fork 565
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: basic keyboard shortcuts #319
Conversation
Run & review this pull request in StackBlitz Codeflow. |
✅ Deploy Preview for elk-zone ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
…d', 'notUsingInput'
Hmm the 'Compose' shortcut is triggered also for any combinations incl. |
OK, pushed some improvements, |
|
I have tried to address issues with key 'exclusiveness' (example Also noticed a but with vueuse (vueuse/vueuse#2515). (maybe |
# Conflicts: # components/status/StatusCard.vue
This is beautiful. A couple of comments:
|
related Akryum/vue-virtual-scroller#499 The actual reason why current approach is not working with vue-virtual-scroller - is that the order of the items in the DOM parent element is totally different from what's displayed, since it's controlled by the virtual scroller via style ( So we should probably work with the data stream -> 'issues' array to track prev/active/next status, using status ids. 🤔 maybe |
# Conflicts: # components/modal/ModalContainer.vue # composables/dialog.ts
(I hope you don't mind drive-by commens. Feel free to ignore) This is great! One way it could be improved: Currently the scrolling with j / k is somewhat unpredictable. If the newly selected status still fits on the page only the focus is moved. If it doesn't fit, the page scrolls, and the focused status moves to the center of the page. This makes it hard to follow the focus with my eyes, because it's hard to predict where the next status will be drawn on the page after navigation. IMHO there would be two alternative approaches that each would work better:
Both options would make it easier to follow the focus. Just my 2¢... |
✅ Deploy Preview for elk-docs canceled.
|
- too complex for first iteration, do separately
I've added Follow-up tasks with proposed mappings
Therefore with the basics added and a first setup to build on - I think this is ready to be reviewed. |
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.
Thanks a lot for taking the time to work on this feature and split the PR into mergeable pieces @hartmut-co-uk 🧡
It works great for the current set of shortcuts. I think we should move forward and keep iterating with your plan.
implements #39
TODOs
?
->shift + ?
shift + ?
/esc
c
for 'Compose'g..h
Open Home Timelineg..n
Open Notificationsf
b
navigate timeline prev/next status(moved to a future iteration due to complexity)Next statusj
Prev statusk
-> feat: keyboard shortcuts - v2 - nagivation (simple) #1855
-> feat: keyboard shortcuts - v3 - actions #1856
-> feat: keyboard shortcuts - v4 - media #1857
-> feat: keyboard shortcuts - v5 - timeline/thread navigation + actions #1858
Options for improvement
g .. h
/g .. n
) show a notification message ~"Going to home" by @edimitchelj
/k
navigation.Current solution uses DOM & querySelectors, hard to maintain / comes with high risk of regressions while working on other features..