question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Outputting a visual graph of the component hierarchy

See original GitHub issue

We have a huge component hierarchy, with many levels of subcomponents as well as “parallel” components (ie a dev component that extends the app component and replaces it, so it has all the same bindings / component hierarchy plus some dev bindings).

Our component hierarchy map to regions of the app (e.g. App scope > LoggedIn scope > Settings scope > Printer Settings scope > Add New Printer scope) so this would give us a nice graph of how the app is structured.

Dagger1 used to output .dot files for bindings, which was fun but not practical (too many bindings). It would be great if Dagger2 could output a .dot file mapping the component hierarchy, or some other format.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:61
  • Comments:26 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
arunkumar9t2commented, Apr 9, 2021

I was able to use Dagger SPI + GraphViz to build https://github.com/arunkumar9t2/scabbard. It also has an IDE plugin to link @Component to generated graph.

Example:

To solve the too many bindings problem, I group the bindings by component path to keep the graph readable, however this has few side effects which I plan to address. (Fixed in 0.3.0).

I also believe with the current SPI, it is possible to build component hierarchy like @pyricau suggested. I plan to try this some time soon. Any feedback greatly appreciated, thanks.

Since 0.4.0, Scabbard supports component hierarchy as originally mentioned in the issue.

Capture

14reactions
netdpbcommented, May 17, 2017

As Ron said, we are working on something that will let you inspect the binding graph, and even add validation rules at compile time. It’s not nearly ready, and probably won’t hit until next quarter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - How can I visualize my React Component-Tree using ...
React Monocle parses through your React source files to generate a visual tree graph representing your React component hierarchy.
Read more >
What is Component Diagram? - Visual Paradigm
Component diagrams are essentially class diagrams that focus on a system's components that often used to model the static implementation view of a...
Read more >
The Component for Displaying Graphs - Documentation
Managing the visual representation of the elements displayed in it, for example graph elements and decorations like selection, focus, and highlighting.
Read more >
VFX Graph Sorting Order - Unity Forum
To sort individual outputs within the same VFX Graph asset, select the ... their Transparency Priority within the Visual Effect component:
Read more >
29 Using Hierarchy Viewer Components - Oracle Help Center
Hierarchy viewers use a shape called a node to reference the data in a hierarchy. The shape and content of the nodes is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found