Support Properly-Styled Decision Nodes in State Diagrams #1304
Labels
Contributor needed
Graph: State
Status: Approved
Is ready to be worked on
Type: Enhancement
New feature or request
Decision nodes are an important part of designing UML state diagrams and activity diagrams. Even the most simple of diagrams tend to have some form of conditional. Mermaidjs, however, does not support this feature natively - the user has to use a workaround to accomplish the proper style, or ignore styling all-together.
The Solution I'd Like
PlantUml uses the following in their activity diagram syntax:
Their website notes:
For compatability, the
if/then/else/endif
syntax should definitely be adopted. However, I think we should also provide an alternate, more streamlined syntax, such as the following:This way, we could maintain two syntaxes: one that's more verbose, but allows for compatability, and another that's less verbose, and meshes better with existing mermaid syntax.
Current Workarounds / Alternatives
Use a flowchart instead of a state diagram and to try and emulate the proper style, as seen in Is it possible to move the labels closer to the nodes in Flowcharts? #1233:
View Diagram
Use a state diagram, and just deal with the decision nodes not being drawn with the proper style, as seen in my description of an alternate branch syntax:
View Diagram
The text was updated successfully, but these errors were encountered: