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

Migrate UML diagram to Mermaid #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ParanoidUser
Copy link
Contributor

Ahoy, @koppor! 👋 Hope you're not weary of these pull requests flood 🙃 In 2022, GitHub introduced support for various diagrams in markdown files. The suggestion is to transition the current UML diagram (plantuml + png) to Mermaid diagram-as-code syntax rendered by GitHub. If you like this idea, we could also consider switching from UML to another diagram type, like a Flowchart. I'd love to hear your thoughts on this.

Class Diagram

classDiagram
  direction TB
  class ADR {
    <<abstract>>
  }
  ADR <|-- MADR
  ADR <|-- YStatement
  ADR <|-- Nygard
Loading

Flowchart

graph BT;
    MADR-->ADR;
    YStatement-->ADR;
    Nygard-->ADR;
Loading

@koppor
Copy link
Member

koppor commented Jan 30, 2024

I know both tools, but did not have time to switch. Thank you for doing it!

Each UML diagram has its intention. A flowchart is more a flow than showing the inheritance relations.

Which aspect do you miss and be displayed as diagram?

@koppor
Copy link
Member

koppor commented Jan 30, 2024

Is it possible to hide the class members in MermaidJS? Meaning hide members for MermaidJS?

@ParanoidUser
Copy link
Contributor Author

Is it possible to hide the class members in MermaidJS? Meaning hide members for MermaidJS?

Unfortunately, it's not currently possible to hide class members in MermaidJS. This feature request has been sitting in the backlog, and we're hoping it gets prioritized at some point. Personally, I find that having empty members/methods boxes doesn't look appealing, which is why I've started exploring other diagram types.

@koppor
Copy link
Member

koppor commented Jan 30, 2024

Is it possible to hide the class members in MermaidJS? Meaning hide members for MermaidJS?
Unfortunately, it's not currently possible to hide class members in MermaidJS. This feature request has been sitting in the backlog, and we're hoping it gets prioritized at some point. Personally, I find that having empty members/methods boxes doesn't look appealing, which is why I've started exploring other diagram types.

For me, the important thing of the diagram is the semantics of inheritance. Thus, there is IMHO no other diagram type. Especially, the arrows should be the inheritance arrows specified by UML.

Empty boxes are perfectly legal in UML class diagrams. See https://stackoverflow.com/a/30381979/873282.

I like them more, because of less visual clutter.

In PlantUML, it is possible to use graphviz directly. Then, one can do tweaks if one wants. I think, this is not possible with MermaidJS.

Maye, we have to wait until mermaid-js/mermaid#3139 is resolved.

@ParanoidUser
Copy link
Contributor Author

Nice move! I'll touch base with the Mermaid team to find out their progress on the feature.

@koppor
Copy link
Member

koppor commented Jan 31, 2024

Nice move! I'll touch base with the Mermaid team to find out their progress on the feature.

Or try to contribute directly :p

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

Successfully merging this pull request may close these issues.

None yet

2 participants