Outputting a visual graph of the component hierarchy
See original GitHub issueWe 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:
- Created 8 years ago
- Reactions:61
- Comments:26 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.