Pretty Fish: A better mermaid diagram editor

(pretty.fish)

76 points | by pastelsky 6 days ago ago

17 comments

  • Myrmornis 2 hours ago

    https://d2lang.com/ is a nicer language than Mermaid with much nicer visual appearance. It would be great if it became more widely supported.

    • erajasekar 2 hours ago

      I reached the same conclusion after comparing diagram-as-code tools — D2 feels cleaner and more expressive than Mermaid.

      I’ve been working on an AI diagramming tool built around D2: https://aidiagrammaker.com/ You describe a system in plain English, and it generates architecture diagrams, flowcharts, and sequence diagrams in D2.

      Edits can be made either directly in the D2 code or via a context-aware editor.

    • neuronexmachina an hour ago

      I agree that it's nicer and more powerful, but it's a little concerning it hasn't had any commits in the past 6 months: https://github.com/terrastruct/d2/commits/master/

    • spacecow 32 minutes ago

      Oh, finally, something that supports actual hierarchical state diagrams (that isn't Graphviz, no offense)... Mermaid's "You cannot define transitions between internal states belonging to different composite states" [1] has driven me up a wall for years.

        parentA.childA -> parentB.childB: voop
        parentB.childB -> parentA: vorp 
      
      shouldn't be that hard!

      [1] https://mermaid.ai/open-source/syntax/stateDiagram.html#comp...

    • jauntywundrkind 20 minutes ago

      How good is the LLM at creating d2? What if any skills/material can folks recommend? (Follow-up: D2-mcp has a cheat sheet, https://github.com/h0rv/d2-mcp/blob/main/d2/CHEATSHEET.md)

      And, does GitHub support it? (Follow up: alas not! Sadness. Please add!)

    • lugao 2 hours ago

      Does it produce real svgs as opposed to foreign object html in svg mess that mermaid compilers produce?

    • growrow 2 hours ago

      What makes it nicer?

      • Myrmornis 2 hours ago

        Take a look at https://d2lang.com/examples/dagre/ and https://d2lang.com/tour/intro/

        The language is richer and all diagram types are implemented consistently in the same language in a way that can be composed, as opposed to being a collection of unrelated DSLs.

        The improved visual appearance is clear from inspecting example diagrams, I believe.

  • smusamashah 26 minutes ago

    How is this one better? I thought this was going to be a visual editor where you click and edit on the diagram itself. I don't seem to be able to do that here.

  • Lord_Zero 2 hours ago

    How does the agent session thing work? Server-side you proxy requests to client via websockets or something? How does the agent see the client-side data?

  • Arubis 2 hours ago

    I will grant this: that's a brilliant name and domain.

  • laserbeam 2 hours ago

    The first thing I tried to do is resize that rectangle in the default diagram... and the resize handles do not affect the height, only the width. What is this "better" than?

  • pastelsky 6 days ago

    - Write Mermaid diagrams with a live preview. - Arrange multiple diagrams on an infinite canvas. - Group diagrams into multi-page projects. - Better themes

    • Flavius 3 hours ago

      Make no mistakes.

  • rdos 4 hours ago

    I can't seem to change the colors of the pie chart, other than the predefined themes. But all of those are horrible for a pie chart.

    • jsmith45 2 hours ago

      Yeah, as far as I know, you need to define a customized theme to customize pie chart colors. You can prepend the chart with initialization logic like:

      %%{init: {"theme": "base", "themeVariables": { "pie1": "#FF5733", "pie2": "#33FF57", "pie3": "#3357FF", "pieStrokeColor": "#000000", "pieStrokeWidth": 3, "pieOpacity": 0.8 }}}%%

      This looks like it works on this site too.

    • pjot 2 hours ago

      To be fair, pie charts are horrible in general.