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

Tree navigation using keyboard #213

Open
Keagel opened this issue Apr 27, 2020 · 5 comments
Open

Tree navigation using keyboard #213

Keagel opened this issue Apr 27, 2020 · 5 comments

Comments

@Keagel
Copy link

Keagel commented Apr 27, 2020

Description

For example, by default :

  • Alt + k - Goes up one tab
  • Alt + j - Goes down one tab
  • Alt + Shift + k - Goes up one level (of the current tab's tree)
  • Alt + Shift + j - Goes down one level

Combined with panel switching this should allow for easier keyboard-only navigation.

@mbnuqw
Copy link
Owner

mbnuqw commented Apr 27, 2020

I can add shortcut for activating parent tab. But for the other commands we already have keybindings:

  • Goes up/down:
    • We have default Firefox shortcuts (ctrl+pgUp/Down) - if you need just switch to the next/prev tab.
    • Using sidebery shortcuts "Select up/down" and then "Activate selection" - if you need to "jump" to more than one step, this will prevent the unneeded switching of tabs, which have some performance cost.
  • Goes up one level - isn't it just ctrl+pgDown (switching to the next (child) tab)?

Also, after I'll add the search feature, we will be able to "jump" to the target tag like that:

  • press the shortcut to open the search popup
  • start typing the title/url/etc..
  • press enter to activate the first result

@Keagel
Copy link
Author

Keagel commented Apr 27, 2020

Using sidebery shortcuts "Select up/down" and then "Activate selection" - if you need to "jump" to more than one step, this will prevent the unneeded switching of tabs, which have some performance cost.

That does seem like a good solution, though using select up/down doesn't unfold the trees which limits which tabs you can activate. A note: by default, Alt + Space is used for "Activate selection" but this is a Windows shortcut (opens the window menu). Maybe change the default one to something else?

Goes up one level - isn't it just ctrl+pgDown (switching to the next (child) tab)?

I was thinking of something like this:

2020-04-27_22-32-59

Pressing Alt + Shift + k from the current tab would select the parent, then the parent's parent and so on. Alt + Shift + j would go down the tree and select the first tab with children (if there are multiple trees within the current branch), expanding as it traverses it.
That would make it easy to go up in the tree then create new tabs from this level, or fold the branch and close it entirely, etc.

The search feature will definitely be a huge thing for those of us with many tabs. This is just something to easily switch between tabs that are in your sight, so to speak.

@mbnuqw
Copy link
Owner

mbnuqw commented Apr 29, 2020

doesn't unfold the trees

To unfold/fold tree you can just press the "Activate selection" shortcut again (this is yet another problem with the docs, sorry).

this is a Windows shortcut (opens the window menu). Maybe change the default one to something else?

Good point! I can set empty shortcuts instead of providing the defaults to enforce users to set their preferred (and available in system) shortcuts. Note: this can be introduced only for new users.

Alright, you convinced me 😄. I'll definitely add horizontal tabs navigation (parent <-> child) and will look at up/down navigation (maybe I'll add some debouncing mechanism to prevent fast page switching)

mbnuqw added a commit that referenced this issue May 19, 2022
- Switching to the N:th tab of panel
- Switching to the last tab of panel
- Switching to the parent tab
(#182, #631, #213)
@megamorphg
Copy link

@mbnuqw

To unfold/fold tree you can just press the "Activate selection" shortcut again (this is yet another problem with the docs, sorry).
Does this mean this is a limitation? It would be great to have a single shortcut for expand/fold rather than two different ones. Like a "toggle node expansion" action because one would really only want to ever do one or the other in any case.

Additionally, I had some other thoughts for tree navigation/actions to have. Ideally would like a keyboard action, context menu item, and button for each of these:

  • unfold all sub-nodes of highlighted tab (s)
    Use case: useful after doing "Collapse All" where everything has been folded. Would save a dozen clicks and keyboard actions to open up a project fully.

  • fold all sub-nodes of highlighted tab (s)
    Use case: current "Collapse All" does this to all projects but sometimes just want to fold all sub-nodes for just one group (not all groups)

  • Additional "custom" fold and unfold actions similar to above to to act up to X-level (2nd node, 3rd node, etc.)

They would be tremendously helpful going between nested tab groups, which I primarily use for different support projects, folding/unfolding entire sub-groups at a time.

Panels would work for separating projects but they are global to all windows: I do not want a panel for X project in every one of my windows.
Maybe I should use bookmark panels here...? I found issues with using that.

@mbnuqw
Copy link
Owner

mbnuqw commented Jun 21, 2022

@megamorphg

Does this mean this is a limitation?
No, just unclear shortcut description. The "Activate selection" command is already can be used to "toggle node expansion" of an active tab or selected bookmarks folder.

About fold/unfold commands - yes, they may be added, also I want to add an option that will allow you to keep inner sub-items unfolded if their parent is folded.

About panels in multiple windows - I'm planning to experiment with binding a panel to window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants