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

Inheritance diagrams #83

Closed
corykinney opened this issue Jul 7, 2023 · 3 comments
Closed

Inheritance diagrams #83

corykinney opened this issue Jul 7, 2023 · 3 comments
Labels
feature New feature or request

Comments

@corykinney
Copy link

Describe the solution you'd like
It would be interesting to have the option to display a generated inheritance diagram with links to the documentation for parent/child classes. This could be a good option for a second Insiders funding tier.

classDiagram
    class Parent
    link Parent "#module.Parent"
    Parent <|-- Child 
Loading

The mermaid.js classDiagram is designed for inheritance diagrams like this and even supports linking. I imagine it wouldn't be too hard to parse the inheritance structure and assemble the corresponding diagram syntax, for example:

classDiagram
    class Parent
    link Parent "#module.Parent"
    Parent <|-- Child 

The option could be off by default and toggled on specific classes like so:

options:
  show_inheritance_diagram: True
@pawamoy
Copy link
Member

pawamoy commented Jul 8, 2023

Hi @corykinney, that's a cool idea! Thanks for the suggestion, I'll keep that in mind 🙂

@pawamoy pawamoy added the feature New feature or request label Jul 8, 2023
@pawamoy
Copy link
Member

pawamoy commented Mar 24, 2024

I have implemented this, see the docs. It's in the $1500/month funding goal. Live example here.

For now, I used simple flowcharts, as I was afraid showing all attributes and all methods in a real Mermaid classDiagram by default would most of the times create too big diagrams, rendering them unreadable. We can totally reconsider and iterate an improved version later, of course (not as a new insiders feature, just as an enhancement 👍).

Each node in the flowchart is clickable and will link to the corresponding class 🙂
Feedback welcome!

@pawamoy pawamoy closed this as completed Mar 24, 2024
@corykinney
Copy link
Author

Nice! Hopefully that funding goal will get reached so we can see this in the non-insiders version! Thanks again.

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

No branches or pull requests

2 participants