-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support styling of subgraphs #845
Conversation
Pull Request Test Coverage Report for Build 753
💛 - Coveralls |
Can we get a release for this @knsv? :) |
A release is coming but I am afraid it will take a few weeks. We are aiming for a quicker pulse moving forward by making the release process/test less manual. We are also expanding the core team. If you are interested take a look at the readme file for the areas we need help with if you want to take a more active role. |
We had a number of users run into this change breaking their diagrams (#895). Is there a way we can preserve backwards compatibility? |
Mermaid v8.2.3 added support for styling in subgraphs, but if there are multiple words in a title, quotes are required. ``` graph TB SubGraph1 --> SubGraph1Flow subgraph "SubGraph 1 Flow" SubGraph1Flow(SubNode 1) SubGraph1Flow -- Choice1 --> DoChoice1 SubGraph1Flow -- Choice2 --> DoChoice2 end subgraph "Main Graph" Node1[Node 1] --> Node2[Node 2] Node2 --> SubGraph1[Jump to SubGraph1] SubGraph1 --> FinalThing[Final Thing] end ``` ``` graph TB SubGraph1 --> SubGraph1Flow subgraph SubGraph 1 Flow SubGraph1Flow(SubNode 1) SubGraph1Flow -- Choice1 --> DoChoice1 SubGraph1Flow -- Choice2 --> DoChoice2 end subgraph Main Graph Node1[Node 1] --> Node2[Node 2] Node2 --> SubGraph1[Jump to SubGraph1] SubGraph1 --> FinalThing[Final Thing] end ``` * mermaid-js/mermaid#845 * mermaid-js/mermaid#391 (comment) Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
Mermaid v8.2.3 added support for styling in subgraphs, but if there are multiple words in a title, quotes are required. ``` graph TB SubGraph1 --> SubGraph1Flow subgraph "SubGraph 1 Flow" SubGraph1Flow(SubNode 1) SubGraph1Flow -- Choice1 --> DoChoice1 SubGraph1Flow -- Choice2 --> DoChoice2 end subgraph "Main Graph" Node1[Node 1] --> Node2[Node 2] Node2 --> SubGraph1[Jump to SubGraph1] SubGraph1 --> FinalThing[Final Thing] end ``` ``` graph TB SubGraph1 --> SubGraph1Flow subgraph SubGraph 1 Flow SubGraph1Flow(SubNode 1) SubGraph1Flow -- Choice1 --> DoChoice1 SubGraph1Flow -- Choice2 --> DoChoice2 end subgraph Main Graph Node1[Node 1] --> Node2[Node 2] Node2 --> SubGraph1[Jump to SubGraph1] SubGraph1 --> FinalThing[Final Thing] end ``` * mermaid-js/mermaid#845 * mermaid-js/mermaid#391 (comment) Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
Mermaid v8.2.3 added support for styling in subgraphs, but if there are multiple words in a title, quotes are required. ``` graph TB SubGraph1 --> SubGraph1Flow subgraph "SubGraph 1 Flow" SubGraph1Flow(SubNode 1) SubGraph1Flow -- Choice1 --> DoChoice1 SubGraph1Flow -- Choice2 --> DoChoice2 end subgraph "Main Graph" Node1[Node 1] --> Node2[Node 2] Node2 --> SubGraph1[Jump to SubGraph1] SubGraph1 --> FinalThing[Final Thing] end ``` ``` graph TB SubGraph1 --> SubGraph1Flow subgraph SubGraph 1 Flow SubGraph1Flow(SubNode 1) SubGraph1Flow -- Choice1 --> DoChoice1 SubGraph1Flow -- Choice2 --> DoChoice2 end subgraph Main Graph Node1[Node 1] --> Node2[Node 2] Node2 --> SubGraph1[Jump to SubGraph1] SubGraph1 --> FinalThing[Final Thing] end ``` * mermaid-js/mermaid#845 * mermaid-js/mermaid#391 (comment) Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
Mermaid v8.2.3 added support for styling in subgraphs, but if there are multiple words in a title, quotes are required. * mermaid-js/mermaid#845 * mermaid-js/mermaid#391 (comment) Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
Mermaid v8.2.3 added support for styling in subgraphs, but if there are multiple words in a title, quotes are required. * mermaid-js/mermaid#845 * mermaid-js/mermaid#391 (comment) Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
Closes #391.
This PR changes the DSL and will break any
subgraph
definitions that have multiple words in the title without quotes.For example, the following subgraph will break:
It adds the following
id[Title]
syntax, as per #391 (comment):Any ID'd subgraph can now be used with the
style
command:Note that given how subgraph SVG tags are built up, there is no (current) way to style the title text.