From 00bd208f1898c001fd438cb6b75892d4d1415868 Mon Sep 17 00:00:00 2001 From: Mika Berglund Date: Tue, 27 Feb 2024 00:15:56 +0200 Subject: [PATCH 1/5] Added link to Blazorade Mermaid to the community integrations page. --- packages/mermaid/src/docs/ecosystem/integrations-community.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index 977384572..f97a44474 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -247,3 +247,4 @@ Communication tools and platforms - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) - [ExDoc](https://github.com/elixir-lang/ex_doc) - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) +- [Blazorade Mermaid: Render Mermaid diagrams in Blazor applications](https://github.com/Blazorade/Blazorade-Mermaid/wiki) \ No newline at end of file From cbb715a44df4c5a5d99d021a53969dfe131318a5 Mon Sep 17 00:00:00 2001 From: Nicolas Chang <25302138+NicolasCwy@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:25:05 +0800 Subject: [PATCH 2/5] Amend docs to document gitgraph parallel commits --- docs/syntax/gitgraph.md | 57 ++++++++++++++++++++ packages/mermaid/src/docs/syntax/gitgraph.md | 33 ++++++++++++ 2 files changed, 90 insertions(+) diff --git a/docs/syntax/gitgraph.md b/docs/syntax/gitgraph.md index bf2927d39..80c0e72fe 100644 --- a/docs/syntax/gitgraph.md +++ b/docs/syntax/gitgraph.md @@ -419,6 +419,7 @@ In Mermaid, you have the option to configure the gitgraph diagram. You can confi - `showCommitLabel` : Boolean, default is `true`. If set to `false`, the commit labels are not shown in the diagram. - `mainBranchName` : String, default is `main`. The name of the default/root branch. - `mainBranchOrder` : Position of the main branch in the list of branches. default is `0`, meaning, by default `main` branch is the first in the order. +- `parallelCommits`: Boolean, default is `false`. If set to `true`, commits x distance away from the parent are shown at the same level in the diagram. Let's look at them one by one. @@ -915,6 +916,62 @@ Usage example: commit ``` +## Parallel commits (v10.8.0+) + +Commits in Mermaid display temporal information in gitgraph by default. For example if two commits are one commit away from its parent, the commit that was made earlier is rendered closer to its parent. You can turn this off by enabling the `parallelCommits` flag. + +### Temporal Commits (default, `parallelCommits: false`) + +```mermaid-example + %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': false}} }%% + gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit +``` + +```mermaid + %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': false}} }%% + gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit +``` + +### Parallel commits (`parallelCommits: true`) + +```mermaid-example + %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': true}} }%% + gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit +``` + +```mermaid + %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': true}} }%% + gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit +``` + ## Themes Mermaid supports a bunch of pre-defined themes which you can use to find the right one for you. PS: you can actually override an existing theme's variable to get your own custom theme going. Learn more about theming your diagram [here](../config/theming.md). diff --git a/packages/mermaid/src/docs/syntax/gitgraph.md b/packages/mermaid/src/docs/syntax/gitgraph.md index b09e1f1ab..d8da3eb27 100644 --- a/packages/mermaid/src/docs/syntax/gitgraph.md +++ b/packages/mermaid/src/docs/syntax/gitgraph.md @@ -277,6 +277,7 @@ In Mermaid, you have the option to configure the gitgraph diagram. You can confi - `showCommitLabel` : Boolean, default is `true`. If set to `false`, the commit labels are not shown in the diagram. - `mainBranchName` : String, default is `main`. The name of the default/root branch. - `mainBranchOrder` : Position of the main branch in the list of branches. default is `0`, meaning, by default `main` branch is the first in the order. +- `parallelCommits`: Boolean, default is `false`. If set to `true`, commits x distance away from the parent are shown at the same level in the diagram. Let's look at them one by one. @@ -568,6 +569,38 @@ Usage example: commit ``` +## Parallel commits (v10.8.0+) + +Commits in Mermaid display temporal information in gitgraph by default. For example if two commits are one commit away from its parent, the commit that was made earlier is rendered closer to its parent. You can turn this off by enabling the `parallelCommits` flag. + +### Temporal Commits (default, `parallelCommits: false`) + +```mermaid-example + %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': false}} }%% + gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit +``` + +### Parallel commits (`parallelCommits: true`) + +```mermaid-example + %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': true}} }%% + gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit +``` + ## Themes Mermaid supports a bunch of pre-defined themes which you can use to find the right one for you. PS: you can actually override an existing theme's variable to get your own custom theme going. Learn more about theming your diagram [here](../config/theming.md). From 370cd98d2385068574484f1c71ce796ebd0d910a Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 27 Feb 2024 15:29:41 +0530 Subject: [PATCH 3/5] docs: Fix config --- docs/syntax/gitgraph.md | 88 ++++++++++++-------- packages/mermaid/src/docs/syntax/gitgraph.md | 44 ++++++---- 2 files changed, 78 insertions(+), 54 deletions(-) diff --git a/docs/syntax/gitgraph.md b/docs/syntax/gitgraph.md index 80c0e72fe..099d90e5e 100644 --- a/docs/syntax/gitgraph.md +++ b/docs/syntax/gitgraph.md @@ -923,53 +923,69 @@ Commits in Mermaid display temporal information in gitgraph by default. For exam ### Temporal Commits (default, `parallelCommits: false`) ```mermaid-example - %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': false}} }%% - gitGraph: - commit - branch develop - commit - commit - checkout main - commit - commit +--- +config: + gitGraph: + parallelCommits: false +--- +gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit ``` ```mermaid - %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': false}} }%% - gitGraph: - commit - branch develop - commit - commit - checkout main - commit - commit +--- +config: + gitGraph: + parallelCommits: false +--- +gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit ``` ### Parallel commits (`parallelCommits: true`) ```mermaid-example - %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': true}} }%% - gitGraph: - commit - branch develop - commit - commit - checkout main - commit - commit +--- +config: + gitGraph: + parallelCommits: true +--- +gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit ``` ```mermaid - %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': true}} }%% - gitGraph: - commit - branch develop - commit - commit - checkout main - commit - commit +--- +config: + gitGraph: + parallelCommits: true +--- +gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit ``` ## Themes diff --git a/packages/mermaid/src/docs/syntax/gitgraph.md b/packages/mermaid/src/docs/syntax/gitgraph.md index d8da3eb27..e7ffe6b8b 100644 --- a/packages/mermaid/src/docs/syntax/gitgraph.md +++ b/packages/mermaid/src/docs/syntax/gitgraph.md @@ -576,29 +576,37 @@ Commits in Mermaid display temporal information in gitgraph by default. For exam ### Temporal Commits (default, `parallelCommits: false`) ```mermaid-example - %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': false}} }%% - gitGraph: - commit - branch develop - commit - commit - checkout main - commit - commit +--- +config: + gitGraph: + parallelCommits: false +--- +gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit ``` ### Parallel commits (`parallelCommits: true`) ```mermaid-example - %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'parallelCommits': true}} }%% - gitGraph: - commit - branch develop - commit - commit - checkout main - commit - commit +--- +config: + gitGraph: + parallelCommits: true +--- +gitGraph: + commit + branch develop + commit + commit + checkout main + commit + commit ``` ## Themes From 2c59ceb00538e259f4a49e0e714eba95f2055e38 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 27 Feb 2024 15:41:58 +0530 Subject: [PATCH 4/5] Fix docs --- .cspell/libraries.txt | 1 + docs/ecosystem/integrations-community.md | 3 +++ packages/mermaid/src/docs/ecosystem/integrations-community.md | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.cspell/libraries.txt b/.cspell/libraries.txt index f51304da3..d1ab97662 100644 --- a/.cspell/libraries.txt +++ b/.cspell/libraries.txt @@ -8,6 +8,7 @@ Astah automerge bilkent bisheng +Blazor codedoc Codemia codepaths diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index 0d3676431..07acbf72e 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -252,3 +252,6 @@ Communication tools and platforms - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) - [ExDoc](https://github.com/elixir-lang/ex_doc) - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) +- [Blazorade Mermaid: Render Mermaid diagrams in Blazor applications](https://github.com/Blazorade/Blazorade-Mermaid/wiki) + + diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index 32f04745d..a42ca28d9 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -247,4 +247,6 @@ Communication tools and platforms - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) - [ExDoc](https://github.com/elixir-lang/ex_doc) - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) -- [Blazorade Mermaid: Render Mermaid diagrams in Blazor applications](https://github.com/Blazorade/Blazorade-Mermaid/wiki) \ No newline at end of file +- [Blazorade Mermaid: Render Mermaid diagrams in Blazor applications](https://github.com/Blazorade/Blazorade-Mermaid/wiki) + + From e59f29054689aa0297d4ff6cd17dd654cbea9843 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 27 Feb 2024 15:44:59 +0530 Subject: [PATCH 5/5] Fix community integrations --- docs/ecosystem/integrations-community.md | 4 +--- packages/mermaid/src/docs/ecosystem/integrations-community.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index 07acbf72e..6ef09d879 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -234,6 +234,7 @@ Communication tools and platforms - [Bisheng](https://www.npmjs.com/package/bisheng) - [bisheng-plugin-mermaid](https://github.com/yct21/bisheng-plugin-mermaid) +- [Blazorade Mermaid: Render Mermaid diagrams in Blazor applications](https://github.com/Blazorade/Blazorade-Mermaid/wiki) - [Codemia: A tool to practice system design problems](https://codemia.io) ✅ - [ExDoc](https://github.com/elixir-lang/ex_doc) - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) @@ -250,8 +251,5 @@ Communication tools and platforms - [reveal-ck-mermaid-plugin](https://github.com/tmtm/reveal-ck-mermaid-plugin) - [mermaid-isomorphic](https://github.com/remcohaszing/mermaid-isomorphic) - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) -- [ExDoc](https://github.com/elixir-lang/ex_doc) - - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) -- [Blazorade Mermaid: Render Mermaid diagrams in Blazor applications](https://github.com/Blazorade/Blazorade-Mermaid/wiki) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index a42ca28d9..24812bb3d 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -229,6 +229,7 @@ Communication tools and platforms - [Bisheng](https://www.npmjs.com/package/bisheng) - [bisheng-plugin-mermaid](https://github.com/yct21/bisheng-plugin-mermaid) +- [Blazorade Mermaid: Render Mermaid diagrams in Blazor applications](https://github.com/Blazorade/Blazorade-Mermaid/wiki) - [Codemia: A tool to practice system design problems](https://codemia.io) ✅ - [ExDoc](https://github.com/elixir-lang/ex_doc) - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) @@ -245,8 +246,5 @@ Communication tools and platforms - [reveal-ck-mermaid-plugin](https://github.com/tmtm/reveal-ck-mermaid-plugin) - [mermaid-isomorphic](https://github.com/remcohaszing/mermaid-isomorphic) - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) -- [ExDoc](https://github.com/elixir-lang/ex_doc) - - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) -- [Blazorade Mermaid: Render Mermaid diagrams in Blazor applications](https://github.com/Blazorade/Blazorade-Mermaid/wiki)