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

Ideas for navigation in browse #32

Open
alexander-held opened this issue Mar 17, 2022 · 1 comment
Open

Ideas for navigation in browse #32

alexander-held opened this issue Mar 17, 2022 · 1 comment

Comments

@alexander-held
Copy link
Member

I imagine that an important use case for uproot-browser browse might be quick checks of a produced ROOT file, where the user already knows fairly well what they are looking for. In that context, here are a few navigation ideas hat may help users get to their goal even more quickly.

Filtering
When browsing a tree with hundreds of branches, some type of filter functionality could be useful to find branches of interest more efficiently. I am imagining perhaps a text field that may e.g. take a regular expression, and then only show objects that match in the sidebar. Filtering could either happen at the current "level" of indentation (e.g. in a file with many trees, work on the trees, but then if the user already has entered a tree, work on the level of branches in that tree). Presumably it could also be possible to match multiple levels via something like treename/branchname.

Jump to matching object
Slightly related to this would be a way to jump to the nearest matching branch when starting to type the corresponding letters with which its name starts. In a tree full of branches, typing el could jump the cursor to branches that start with that. Given that some letters already correspond to some functionality, perhaps this would need to be escaped to be useful (e.g. similar to other functionality, j for "jump" to enter "jump mode", followed by the desired letters, even though vim fans may intuitively use j differently).

Scrolloff & multi-line scroll
When clicking a branch, the up/down arrows do seem to work for navigating through the structure in the tree to some extent, but I am not sure whether this is on purpose or not. The highlighted entry scrolls off-screen for me with iTerm2 sometimes when doing a combination of click + up/down arrow navigation. Clicking on an entry also does not highlight it in the same way as scrolling does (which changes background color). To make scrolling more efficient, a non-zero vim-like scrolloff (to see what comes up next below the current branch), and the possibility to do multi-line skips by entering a number and then up/down arrow could both be convenient.

Navigating folder structure
It is possible to "enter" a lower level of a structure (e.g. go from a tree to its branches) via return, but I am not aware of a way to quickly get back to a higher level again. Left/right arrow (or h/l) could serve the purpose of entering/exiting a lower level.

@henryiii henryiii mentioned this issue Mar 17, 2022
12 tasks
@amangoel185
Copy link
Collaborator

Thank you, these ideas are really insightful!

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

No branches or pull requests

2 participants