Repository navigation
feat(mermaid): upgrade to v12.2.0 and use redux-color themes - #368
Merged
Merged
Conversation
Mermaid 12 makes redux-color and the neo look the default for many diagram types, and lays those types out with ELK. Doom forced theme: default in light mode and theme: dark in dark mode, which would have kept the old palette after the upgrade. Light mode now names redux-color; dark mode names redux-dark-color, because Mermaid does not pick that palette from dark on its own. Diagrams that do not set theme, look, or layout in front matter will look different.
🦋 Changeset detectedLatest commit: 1a35cc7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
A file next to the components is imported as a global MDX identifier. `mermaid-theme.ts` became `import Mermaid-theme`, which is not valid JS, and every docs page failed to build.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #368 +/- ##
=======================================
Coverage 66.94% 66.94%
=======================================
Files 100 100
Lines 3903 3903
Branches 1152 1155 +3
=======================================
Hits 2613 2613
Misses 1026 1026
Partials 264 264 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Mermaid 12 changes what unconfigured diagrams look like. Doom was still forcing the old palettes, so an upgrade by itself would not have shown the new defaults.
Why
mermaid.initialize()always settheme: defaultin light mode andtheme: darkin dark mode. Mermaid 12's light default isredux-color, with theneolook and ELK layout for flowchart, class, state, ER, sequence and a few others. Dark mode does not pickredux-dark-colorfromtheme: dark; that palette has to be named.Leaving those two values in place would have kept every diagram on the v11 appearance after the dependency bump.
What changed
mermaid^11.15.0→^12.2.0redux-color; dark mode initializesredux-dark-colorlook: neoand ELK are not set in Doom; they come from Mermaid 12's per-diagram defaultstheme,look, orlayoutin front matter are unchanged; anything that does not will look different