Skip to content

Directive support for many diagrams, config bugfix #1582

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

Merged
merged 19 commits into from
Jul 28, 2020

Conversation

cmmoran
Copy link
Collaborator

@cmmoran cmmoran commented Jul 27, 2020

📑 Summary

Directive support for most diagrams
Slight pie refactor
Added pie unit tests
Fixed a config issue where multiple diagrams on the same page (using the same mermaid context) would inadvertently share the same configuration if the first config utilized the init directive to set configuration variables.

📏 Design Decisions

The jison parsing statements for directive support are fairly drop-in and require very little change on the parser. These changes have been added and the modifications to the parserDb support file have been made for the following diagrams:

  • pie
  • gantt
  • user-journey
  • flowchart (graph)
  • class
  • er
  • state

The remaining one(s) to update are:

  • info (is this a starter example?)
  • git (experimental)

cmmoran and others added 15 commits July 23, 2020 05:58

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
Fixed an issue in journey svgDraw.drawText expected an attribute (textMargin) but did not receive one and raised an error: <tspan> attribute x: Expected length, "NaN".
Added parseDirective to journeyDb

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
…agram-v2 for class diagrams)

Unverified

This user has not yet uploaded their public signing key.

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
…urityLevel='loose' must be set by the siteConfig. The default securityLevel as of now is 'strict'. This causes html to be url encoded.

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
Added the parser as the first argument to parseDirective to support custom directive handling (for now delegated within mermaidAPI but should probably discriminate based on type for delegation)

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
Diagrams now properly reset to siteConfig when there are multiple diagrams on a single page

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
Fixed a regression bug I introduced in theme.spec.js

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
Ensured tests pass

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
Added directive support to pie
(Refactored pie parsing to be a bit more clear)
Added more unit tests to pie

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
…s-in-actor-names-in-sequence-diagrams' into develop
@cmmoran cmmoran changed the title Directive support for journey (+<tspan> NaN bugfix) Directive support for many diagrams, config bugfix Jul 27, 2020

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
Fixed an issue with markerUnits: (default is 'strokeWidth' not 0
@cmmoran cmmoran requested a review from knsv July 28, 2020 00:26
cmmoran added 3 commits July 28, 2020 04:45
Fixes

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
GraphObjects.md: [ and ] should be escaped in text (they're links otherwise)
flow.jison: fixed a parsing issue when the direction is omitted (defaults to 'TB')
stateRenderer-v2: was silently failing due to a try/catch in the parse function. (intentional?) removed to show errorHandler
mermaidAPI: removed unnecessary call to updateRendererConfigs since reinitialize does this

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
… correct)

Verified

This commit was signed with the committer’s verified signature.
cmmoran Chris Moran
Fixed a class diagram parsing issue
@knsv knsv merged commit b23988c into mermaid-js:develop Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants