question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I think that MermaidJS is a great idea, a language to write diagrams, but this repository needs some organizing because I have seen dead documentation and inconsistent code-style in many places.

Ideas

These are some ideas that I came up with to make mermaid a better project.

  • Enforce Code styling I have seen the code having inconsistent code style in many places
    • Add a GitHub Action
    • Add a lint:fix script (#2471)
    • Lint all files
      • Note that for the HTML files, the HTML will have to be escaped to prevent parsing errors and messed up the formatting
      • Use eslint-plugin-markdown (#2530)
      • Use eslint-plugin-html (#2531)
      • Use prettier on all files (not only src/**/*.js)
    • Add a commit hook using Husky (#1878) (#2522)
    • Enforce .editorconfig is followed using linters
    • Use stylelint
    • Use eslint-plugin-jsdoc https://npmjs.com/package/eslint-plugin-jsdoc (#2471)
      • When implementing this remember to turn off conflicting rules with prettier-plugin-jsdoc
  • Documentation
  • Metadata
    • Update descriptions in package.json
    • Actually install defined Husky Hooks (#2522)
    • Move todo.md somewhere else
      • I understand it might be useful for personal notes, but putting that in GitHub projects, or making it more formal as a ROADMAP.md would be better
    • Mark dist/* as linguist-generated
    • Have more specific issue templates (#2739)
      • Diagram Proposals
      • Syntax Proposals
      • Theme Proposals
    • Don’t lock/unlock issues (#967) (#2503)
      • This prevents users from being able to give their ideas against why the issues are closed because there are times when the issue is closed and then another idea is brought up.
    • Add some sort of deploy bot to allow preview of documentation on PRs (maybe Netlify because that is what we use in mermaid-live-editor)
    • Standardize commit message with https://www.conventionalcommits.org/en/v1.0.0/ (#2529)
  • Bulid
    • Don’t push dist to GitHub
    • Group webpack files
  • Source
    • Add JSDOC to helper functions to help contributors and add IntelliSense (#2464)
    • Switch from Annex B escape and unescape to something else

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:8
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
knsvcommented, Apr 22, 2022

@financelurker thats a good idea. I think that we are reaching a point where the base package of mermaid needs to be split up. If you don’t care about gantt charts why include and load them? I have been thinking about a lazy loading. This could be another way or even better a part of that setup.

There are some refactoring activities that need to happen first though. The code that initially handled two diagrams is not as clean when handling 10+ diagrams after"organic growth". We need to define what a diagram is so that mermaid can treat them all diagrams in the same way with a basic interface. This is high up on my prioritisation list and diagram organisation is a part of that.

0reactions
financelurkercommented, May 20, 2022

Well, I don’t know either. But having a look at https://github.com/mermaid-js/mermaid/issues/177 there’s a lot of demand of different and new diagram types. And cleaning up the mermaid architecture (described in my issue here: https://github.com/mermaid-js/mermaid/issues/3061 ) could make adding new diagram types more easy and streamlined (especially for people who don’t want to understand the orchestration-layer of mermaid).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mermaid Layouts - GitLab
This page is intended to help out with some advanced layout options for Mermaid diagrams such as creating diagrams that are wider than...
Read more >
theorganizedmermaid - Instagram
Natasha-Organizing Consultant/Real Mermaid/Artist/Gamer. www.TheOrganizedMermaid.com 805-491-1293 Join Poshmark w/code ORGANIZEDTASHA for a $10 credit.
Read more >
The Organized Mermaid
The Organized Mermaid offers the best professional organizer & decluttering services in Camarillo CA, Ventura County & Santa Barbara County.
Read more >
Mermaid Cheat Sheet @ https://jojozhuang.github.io
Cheat Sheet for Mermaid. 1. Flowcharts. A flowchart is a type of diagram that represents an algorithm, workflow or process. The flowchart shows...
Read more >
Mermaid: Create diagrams quickly and effortlessly
Mermaid is a tool that lets you create complicated diagrams in Markdown — it works with simple commands and an intuitive syntax.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found