The "Example" buttons don't jump out at me; I found them but it took a while. Also consider labeling them with their point, e.g. "Example 3: Color"
If you change the input text to something well-formed, the graph seems to update immediately. But if you change it to something ill-formed, the graph doesn't update immediately — and then if you click "Generate" manually, it blanks the input box. Either this is a bug, or the "Generate" button doesn't do what I think it does (i.e. generate output). Again, adding a noun to the verb might help. Or just adding some usage information somewhere on the page.
For those like me who've never heard of "Mermaid," apparently it's like GraphViz's dot language but different. https://github.com/mermaid-js/mermaid
I tried the flowchart example from Mermaid's own README, but it didn't come out right: looks like the shape characters [] and {} aren't handled.
Thanks for the feedback! I agree that the web UI can be improved (quite) a bit, most of my efforts went into the actual generation of the diagrams. I'll have a look at prettifying it.
Or, less ergonomically, the general rectangle-editing commands built into more powerful code editors e.g. Emacs.
With these, simple but fairly pretty box+line+text diagrams can be inlined with your source code comments. This unification may help in the perennial struggle to keep software architecture and source code reality in sync.
But now seriously.. the diagrams are working really well for simple examples, thank you so much for sharing this tool. I have bookmarked your page, my documentation is based on text files and often have to build these kind of diagrams too.
The example buttons took me a while to be found, but are good for syntax explanation. Thank you for making this available.
It's a macOS app and I've found it great. However if given an ASCII diagram, you cannot edit it with the same ease as creating a new one (e.g. reflowing text or resizing boxes).
I really like the idea of having the mermaid source and the ASCII diagram together, so you could use the source to change the diagram if needed. But I feel that would feel cluttered to have both in a plain text file or comment, where ASCII diagrams shine.
It would be pretty cool to be able to draw a flowchart or graph on a tablet and have it automatically turned into mermaid source. That's exceptional compression.
Hah we rely on Mermaid a _heap_ at work for building internal dependency graphs from `yarn info` JSON data and a super lazy depth-first graph haha. Super useful, nice to see another renderer!
ts-directed-graph outputs Mermaid :)
This tool seems way more useful for hand-made ones, definitely bookmarking
Out of interest have you managed to get Mermaid graphs rendering outside of a browser?
I was trying to do this a while back so I could do server side rendering of graphs, but it seemed to depend strongly on the presence of a DOM. Couldn’t quite get it working with JS-DOM either.
I've used [mmdc](https://github.com/mermaid-js/mermaid-cli) to generate mermaid images from a Makefile. It looks like it is implemented with puppeteer, so perhaps it doesn't quite fit your request. But if you just want something you can use at the cli, it is great.
Are you planning to support more of mermaids features?
I tried one example where this could be useful to me - Mermaids gitGraph - and it looks like it's not supported.
On a serious note, yes not all syntax noted in the Mermaid docs work yet. I'm planning on adding more coverage of the Mermaid syntax over time. For now the basics work and (hopefully) shows its potential.
The "Example" buttons don't jump out at me; I found them but it took a while. Also consider labeling them with their point, e.g. "Example 3: Color"
If you change the input text to something well-formed, the graph seems to update immediately. But if you change it to something ill-formed, the graph doesn't update immediately — and then if you click "Generate" manually, it blanks the input box. Either this is a bug, or the "Generate" button doesn't do what I think it does (i.e. generate output). Again, adding a noun to the verb might help. Or just adding some usage information somewhere on the page.
For those like me who've never heard of "Mermaid," apparently it's like GraphViz's dot language but different. https://github.com/mermaid-js/mermaid I tried the flowchart example from Mermaid's own README, but it didn't come out right: looks like the shape characters [] and {} aren't handled.