-
Notifications
You must be signed in to change notification settings - Fork 122
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
An option to navigate inside the tree at sidebar the 'traditional' way when using arrow keys? #323
Comments
We'd like to. However the behavior is controlled by the related browser API, and cannot be easily changed. A pure script re-implementation of the full behavior by a UI expert is likely required.
This may be possible but need further evaluation.
Ctrl-click is for selection control. We won't implement this due to conflict. It's more recommended to open in a new tab through middle click, which is also implemented by most modern browsers. |
I thought it was on purpose to have the focused item on top.
It has some issues: |
I think the root issue is that the |
With the modifications above, vertical scrolling happens as expected and only when needed. Horizontal scrolling can be a little off under specific conditions (if the user folds a folder and move to items in parental folders - until it reach the top/bottom of the window). Actually even this case will be eliminated with that
(I'll check it tonight) |
We will get the same issue as long as scrollIntoView is called. We have implemented an adjustment of its parameters to get it work in a more desirable way (it will scroll left back when going to an upper item). You can test it from the devel branch. |
Yes you are right it wouldn't have worked. I didn't give it much of a thought. The only reason I kept scrollIntoView is because when I tried to test it yesterday I couldn't find how to scroll the sidebar. If that's trivial then the solution is easy, the only times that there is a need for scrolling after Arrow up/down/left/right, is at the 3 places I mentioned in the post above and for a scroll = tree item height. Plus the case when there is a scroll using mouse that will hide the focused item which can be solved with a shortcut that will call scrollintoview to bring it at the top of the tree |
I think automatic horizontal scrolling is reasonable as there is a horizontal scrollbar, which is different from most "traditional" file manager like implementation, which either supports only single level navigation or don't support horizontal scrolling at all (and deeper items will be clipped forever). If some UI expert can contribute a neat way to emulate This change aims to prevent the issue that the horizontal scrolling goes right when entering a deeper level but doesn't go left back when going back to a shallower level, which seriously interferes keyboard only navigation. We'll go for this (at least temporarily) unless it's proven worse or there's a better practical approach. |
Horizontal scrolling of course is important, the width of sidebar is small in most cases you cannot see the full title, if needed you must be able to scroll for that. On the other hand if you provide shortcuts for scrolling as you are considering, with the approach I proposed it will remain with any scrolling the user gives until he changes it or proceed closing a folder in which case it will go to the left most position (or if undesirable avoid that as well with 2 lines of extra code to restore the scroll position as it was before the closure of the folder) |
As you may have found out, there is no simple reliable way to find an appropriate ancestor element for scroling. That is not a practical approach until some expert have contributed one. |
scroll.zip -If mouse scrolling moves focused item out of view it's already possible to handle by pressing space which will bring it back to top |
Your approach is not valid. There is no guarantee that the tree structure must be put under a scrollable element whose ID is "tree". A large code rework will be involved if we really want to change it, which is not something we'll consider shortly. |
I don't follow your reasoning. Did you check the code? It is valid |
keyboard navigation needs booktree.js to be loaded, all cases when that is happening are covered |
As it is now when moving around using arrows, on each movement the selected item automatically goes at top and left (scrolling accordingly on both directions). I guess like that can make it easier to start a capture with the dragging method but personally I never succeded to become familiar with this automatitation and I am using mouse to move around the tree. Can you pls provide an option so when moving with arrows to be in the normal way (only scrolling up/down and only when the selected item is at the top/bottom)
(+) Even better if it's added a way to also make it possible to scroll, for example with alt+arrows
(+)If it is easy to implement also a behavior where ctrl+click on an item that will open it in a new tab (instead of the same tab when it is a simple click - similar to ctrl+click of links in webpages)
The text was updated successfully, but these errors were encountered: