Skip to content
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

Feature to automatically create a Mermaid.js diagram showing all providers and relationships #3442

Closed
colin-young opened this issue Mar 20, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request needs triage

Comments

@colin-young
Copy link

For any moderately complex data model, it's very easy to lose track of exactly what providers you have created and how they relate and depend on each other. Being able to automatically generate a class diagram in Mermaid.js from the code would help manage this complexity and produce a useful documentation artifact that would be kept up-to-date automatically.

Some thoughts: using ref.watch/read/listen and @riverpod annotations would probably be the easiest path. It would also have the side-effect of also detecting widgets that depend on each provider. This would help identify duplicate/similar providers and assist in optimizing data access code.

@rrousselGit
Copy link
Owner

@colin-young
Copy link
Author

Excellent!

@colin-young
Copy link
Author

And my project breaks riverpod_graph with Bad state: No element. Let me know if you want me to open a new issue and provide details.

@rrousselGit
Copy link
Owner

It's in progress afterall.

@colin-young
Copy link
Author

It's in progress afterall.

Yes, although I figure it's always good to have examples of how to break it. Assuming you're not already able to do so :)

I'll probably take a peek at the code and try to debug (for my own education) to see if I can figure anything out. But I can't give any timeline when I might get to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage
Projects
None yet
Development

No branches or pull requests

2 participants