-
Notifications
You must be signed in to change notification settings - Fork 323
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
Graphs are unreadable past 15 dependencies #289
Comments
If you're familiar with macOS, this should give you a good idea of how I'd expect to be able to explore the dependencies in a project: It gives you a clear view of each dependency and sub dependency:
It's interactive but doesn't have to be: Shared dependencies can just end with a symbol, e.g. |
I just realized that I can get what I'm suggesting by just opening each file and reading its What that lacks though is the ability to see the dependency branch (i.e. not just one list of imports at a time, but both the parents and the children of each dependency, like in the Finder screenshot above) |
seems hard to do. what about we make the graph "reactive" and nodes and expand / collapse by clicking them? |
I think this is a classic case of "what do we want to achieve?" and I agree that the current images are, by their nature and not a fault of madge's, ill-suited for large complex dependency graphs. Since I'm mostly interested in getting help with code organization, I use madge to detect circular dependencies, which it does itself, and to detect improper directionality. What I mean by this are two issues:
I think especially the second case can be illustrative for a better visualization strategy. I'd really like a vizualization that uses columns for scopes, sorting them hierarchically. In such a visualization, all arrows would be expected to point in the same direction, and a mismatch would be easily identifiable. Even without such directionality, just arranging columns for the first level of directories would probably be helpful. That might be a good compromise for @fregante's idea. Could tie in with #381 but I'm not proficient with mermaid.
Sounds good, but I doubt the practicality of that idea. It would necessitate additional code that would bloat madge. I think I'd leave such interactivity to other packages that may either consume madge or be composed with it. |
Also related to #202 |
Hi! This is a great tool but I'm struggling to make it useful. Graphs are not a great way to represent dependencies because shared dependencies are pulled so far right and away from their importers, forcing you to follow thousands of pixels of lines.
The entry point has 6 direct dependencies, can you spot them in less than 10 seconds? 10 seconds is a long time to spot 6 dependencies.
The solution here is to use the textual output and that cleanly shows you the 6 dependencies… if you only find the entry point in this list in alphabetical order:
Additionally the list is monodimensional: I can see the 6 dependencies, but then I can't follow them easily.
The text was updated successfully, but these errors were encountered: