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(focus): Add more shortcuts to focus the child/sibling #2237

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

15cm
Copy link
Contributor

@15cm 15cm commented Apr 22, 2019

I strongly feel current keyboard shortcuts are not enough for users, e.g. me, to navigate the TST with keyboard. 3 shortcuts are added in this PR. I would like to explain why they are useful here:

  1. Move focus to the last child
    When we config TST to open the link as a new child, the child will be appended to the end of the current tree. Intuitively we will try to reach the last created child that is at the end. But these was no a shortcut to do that.

  2. Move focus to the previous/next sibling
    Currently TST has 3 ways to navigate among tabs: a level up(+1 level, focus parent), a level down(-1 level, focus child) and level irrelevant(focus previous/next). Lack of shortcuts to focus siblings(0 level) makes it painful to navigate between deep trees in the same level with keyboard.
    With these two shortcuts, we can make most of the tab navigation by combining the +1, 0, -1 level movement with keyboard.

Hence I believe these shortcuts are useful tools that should not burdens the users.

Add focusLastChild, focusPreviousSibling, focusNextSibling
@piroor piroor merged commit 6cf394c into piroor:master Apr 25, 2019
@piroor
Copy link
Owner

piroor commented Apr 25, 2019

Thanks!

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.

2 participants