mbnuqw / sidebery

Firefox extension for managing tabs and bookmarks in sidebar.
MIT License
3.43k stars 175 forks source link

Tree navigation using keyboard #213

Open Keagel opened 4 years ago

Keagel commented 4 years ago

Description

For example, by default :

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

mbnuqw commented 4 years ago

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

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

Keagel commented 4 years ago

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 commented 4 years ago

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 :smile:. 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)

megamorphg commented 2 years ago

@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:

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 commented 2 years ago

@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.