rschristian / deptree

Visualize the dependency tree of a package or project
https://deptree.rschristian.dev
MIT License
17 stars 2 forks source link

Collapse subtree #4

Open ArnaudBarre opened 3 months ago

ArnaudBarre commented 3 months ago

Me again, following #3, I would like to be able to collapse tree I already know (ex @typescript-eslint) to be able to look at the other dependency more easily.

hacknug commented 3 days ago

Probably not what you want but I'm hiding unflagged branches using css:

pre.w-max ~ div:not(:has(.decoration-2)) {
  display: none;
}
This is what it looks like 👇

I can open a PR adding an option to toggle this if @rschristian thinks it would be helpful 👍

rschristian commented 3 days ago

I think that'd be neat, PR certainly appreciated!

hacknug commented 1 day ago

A first version addressing this issue is ready over at #8. Let me know if there's anything else you'd like me to add there or if you know how to prevent the children from re-rendering when adding a class to an element 😅