mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

Add hint on "flowchart" and "graph"

Open koppor opened this issue 2 years ago • 1 comments

:bookmark_tabs: Summary

This PR changes two things:

Add hint on graph

The documentation on flowcharts uses flowchart

image

When opening the live editor (https://mermaid.live/), it uses graph for a flow chart

image

The documentation contains the hint on graph only in "Other examples":

image

image

Reformat notes

Currently, notes are formatted using **Note:**. According to https://vitepress.vuejs.org/guide/markdown#custom-containers, it is possible to have other stylings:

image

image

This PR uses that for the flowchart description.

:straight_ruler: Design Decisions

  • Consistency of tooling and documentation
  • Using available styling syntax to provide a nicer rendering

:clipboard: Tasks

Make sure you

  • [x] :book: have read the contribution guidelines
  • [ ] :computer: have added unit/e2e tests (if appropriate)
  • [x] :notebook: have added documentation (if appropriate)
  • [x] :bookmark: targeted develop branch

koppor avatar Feb 16 '23 08:02 koppor

Graph has been replaced with Flowchart in https://github.com/mermaid-js/mermaid-live-editor/pull/654 Also, I just added the formatting rules into Contributing.md https://github.com/mermaid-js/mermaid/commit/4ed6ec1a4dd4d406f1bb28551fcca19f84bb19c4. Can you please update the PR?

sidharthv96 avatar Feb 16 '23 12:02 sidharthv96

Updated 😅

From https://github.com/mermaid-js/mermaid/commit/4ed6ec1a4dd4d406f1bb28551fcca19f84bb19c4 I see that

```note

is converted to > **Note:**<br> and not ::: note<br>. I assume, this is intended as you aim for a light highlight of that content?

koppor avatar Apr 05 '23 09:04 koppor

@koppor it converts based on the output format. Default output is github markdown, which uses the ** syntax. When building for vitepress, it'll convert to ::: format.

sidharthv96 avatar Apr 23 '23 17:04 sidharthv96

@sidharthv96 I resolved the conflicts again. Should I change something more?

koppor avatar Jun 12 '23 07:06 koppor

@koppor we have note, tip, danger and warning.

info is not supported. note will be transformed to info when building the vitepress docs. So, don't worry.

sidharthv96 avatar Jun 12 '23 07:06 sidharthv96

@sidharthv96 Fixed.

koppor avatar Jun 12 '23 07:06 koppor

@koppor, Thank you for the contribution! You are now eligible for a year of Premium account on MermaidChart. Sign up with your GitHub account to activate.

mermaid-bot[bot] avatar Jun 12 '23 08:06 mermaid-bot[bot]