-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 state diagram: add state diagram to markdown preview #3354
Conversation
570e893
to
df7d75a
Compare
I just saw that the screengrab is cutting after 5 seconds. I will re-upload a new one tomorrow. |
@Flexo013 I added a link to a gif as the video was a bit longer than wanted. |
Nice! Could you add a simple image showing something that wasn't possible before this PR? Also could you add a bit more in the description about what we gain by adding this dependency? |
Ohh mermaid added support for state diagrams around 25 days ago in their 8.4.0 release. I could either:
What do you think? @Flexo013 |
My gut feeling says that we should stick to mermaid, because fewer dependencies. Mermaid's version should be bumped regardless, so if that yields a working (and comparable) result to what we have in this PR, then I say we don't start using cat state. |
Sure, I agree. |
df7d75a
to
531a74d
Compare
@Flexo013 I reverted the code and "only" bumped mermaid version and its dependencies. Also did a sanity check whether things are still working. They do + we support state diagrams as well now :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
Description
Bumped Mermaid version to support state diagrams.
Did sanity check whether mermaid is still working.
sequence diagram like before:
new added state diagram:
old description
This PR uses the library: https://www.npmjs.com/package/state-machine-cat version 5.3.6 Do we want to add this dependency?By adding this dependency we gain the ability to create state graphs by adding it as a
state
block in the markdown editor.```state
initial => todo;
todo => doing;
doing => done;
done => final;
```
leads to this:
Without this we have the rely on the dependencies we are using right now, Mermaid and Plantuml.
Why they are not sufficient for this use-case can be found here further: #2933
Screengrab GIF
https://gfycat.com/marvelousexcitablekoala
speed up by 4x
Issue fixed
fixes #2933
Type of changes
-> I should update the example to contain a state diagram
Checklist:
IssueHunt Summary
Referenced issues
This pull request has been submitted to:
IssueHunt has been backed by the following sponsors. Become a sponsor