Skip to content
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: keyboard status navigation with j/k #2739

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

shuuji3
Copy link
Member

@shuuji3 shuuji3 commented Apr 1, 2024

resolves j/k navigation part of #1858

Copy link

stackblitz bot commented Apr 1, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit aa171a8
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/6625e73760334f0008dd7153

Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit aa171a8
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/6625e737d75e7c000779d3d5
😎 Deploy Preview https://deploy-preview-2739--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shuuji3 shuuji3 changed the title feat: keyboard status navigation with j/k feat: keyboard status navigation with j/k Apr 1, 2024
@shuuji3 shuuji3 force-pushed the shuuji3/feat/keyboard-status-navigation-jk branch from b50ce2b to 08f847f Compare April 7, 2024 15:46
@shuuji3 shuuji3 force-pushed the shuuji3/feat/keyboard-status-navigation-jk branch from 08f847f to 3746e16 Compare April 21, 2024 12:12
@shuuji3 shuuji3 force-pushed the shuuji3/feat/keyboard-status-navigation-jk branch from 3746e16 to 9d327f1 Compare April 21, 2024 12:13
@shuuji3
Copy link
Member Author

shuuji3 commented Apr 22, 2024

This implementation is working well if we disable the experimental virtual scrolling. When enabled and a post has a large height, the next post is not loaded until it is on-screen. As a result, this keyboard navigation code fails to find the next post to focus on and stack to the last post or is forced to go to the top post.

We are using DynamicScroller (https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/README.md#dynamicscroller) but it has little option to customize so I'm not sure how to fix this issue.

I'll disable this keyboard shortcut when the virtual scroller is enabled. But that means most users cannot use it as it is enabled by default.

@shuuji3
Copy link
Member Author

shuuji3 commented Apr 22, 2024

Disabled this feature when "Virtual Scrolling" is enabled and add instructions to do so in the shortcut help dialog.

image

@shuuji3 shuuji3 marked this pull request as ready for review April 22, 2024 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant