Comments (6)
Ok, plain search is fine, but I'd indeed like to have this focus mode 🙂
It's just really helpful to see things in a tree structure.
from nix-tree.
Okay, I think this is a good idea. The implementation is going to be a bit tricky, because it affects many places. So I'll probably only start to look at it the next weekend.
from nix-tree.
So, here's some bad news. I think the trivial way to implement this (hide everything which is not either an ancestor or descendent of the "focused" store path) won't be as nice.
Because, imagine having the focused path at the middle pane. You'd expect the left pane to contain the parents of that path, but the above approach does not do that (it'll only show the children of the previously selected grandparent).
I think the ideal would be flipping the dependency graph and apply the mechanism for the right panes to the left pane; so having all parents of the focused path on the left, and their parents on the left of the left and so on (it's hard to explain, sorry).
However, it is tricky to implement. Also it introduces a lot of design issues (what will the sizes mean in that case, how will why-depends/search will work). So, I don't think I'll be able to spend necessary time on it soon enough. However I will keep considering it and maybe we'll figure out a nice way to do this.
from nix-tree.
Here's how I'd do this right now:
nix-tree
has already has a search functionality (shortcuts
), so I'd use it to search the store path I'm looking for. But it's just a case-insensitive plain text search, so no fancy expressions there.- Store paths directly depend on it are on the bottom status bar, called
Immediate Parents
. nix-tree
also has awhy-depends
mode (shortcutw
), and you can see the store path transitively depend on it there. You can even navigate to one of those, highlighting the part there on the main panes.
Does that work for you?
Otherwise, we can have something like a "focus mode", where a shortcut marks the current selected store path "focused"; then only its ancestors and descendents will be visible. Then probably pressing it again will remove the focus. It kind of make sense to me, but I'm afraid of adding too many confusing functionality to it. But please let me know if you prefer something like that, or if you have another suggestion.
from nix-tree.
Ok, you know best :) although I don't understand the middle pane explanation. Won't you only see connected parts of the graph?
from nix-tree.
So, let's think about this graph:
And say, you navigated to node e
through root -> a -> b -> e
. Your panes would look like this in the current state of nix-tree
.
------------------
| [b] | [e] | f |
------------------
But, this does not mean that b
is the only parent of e
, it merely means that the previous pane contained only b
.
I think, if you were to now use the hypothetical "focus" feature on e
, you'd prefer to see something like:
-----------------
| [b] | [e] | f |
| c | | |
| d | | |
-----------------
This'd make it easier to see which packages depend on e
, which I think is closer to what you want. However, implementing this is tricky (mostly UX-wise).
from nix-tree.
Related Issues (20)
- Nix tree eats a core, even in idle HOT 2
- Feature request: Manage gcroots interactively HOT 3
- Restore flakes support? HOT 1
- Freeze when using "yank" function HOT 8
- Reverse dependencies (`--query --referrers`) HOT 10
- Add support for flake syntax, like `nixpkgs#hello` HOT 3
- Feature request: browse output directories and source input directories HOT 4
- Feature request: Help diagnose packages with file collisions HOT 2
- Feature request: inspect raw derivation HOT 2
- Reproducible hanging HOT 2
- Feature request: impure flag HOT 1
- Feature request: Have the ability to show closure size when using --derivation HOT 1
- Feature request: man-page which program + terminology? HOT 2
- Feature request: display bindings in the lower right corner of `nix-tree`. HOT 4
- Feature request: Hide a closure from search results HOT 1
- Unable to see the dependencies of pandoc flake HOT 1
- Feature request: graphviz export HOT 2
- Feature request: add `--file` flag
- Segmentation fault when hitting key binding before progress bar starts HOT 7
- Support new path-info syntax introduced in nix 2.19 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix-tree.