Repository navigation
break(theme-mermaid): upgrade to Mermaid 12 - #12454
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Size Change: +4.92 kB (+0.04%) Total Size: 12.4 MB 📦 View Changed
ℹ️ View Unchanged
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: +4.96 kB (+0.04%) Total Size: 12.5 MB 📦 View Changed
ℹ️ View Unchanged
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
29 of 30 tasks
YUKIKEDA
added a commit
to YUKIKEDA/ElasticLM
that referenced
this pull request
Nov 9, 2026
In the dark color scheme, @docusaurus/theme-mermaid 3.10.2 renders each diagram again with the same id; Mermaid removes the shown SVG first, and React does not put back an identical one. Patch in the id fix of meta/docusaurus#12454 (design §20.7, V1c5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Motivation
(AI-assisted)
Upgrade
@docusaurus/theme-mermaidto Mermaid^12.0.0. Use bundled ELK support and remove the optional ELK dependency, package detection, registration, and bundler flag. Update the public config types and document how to select layouts.Also fix a pre-existing rendering issue affecting production and this preview: Mermaid deletes the displayed SVG when rendering again with the same ID. If the resulting markup is identical, React does not restore it. Give each render a unique ID so diagrams remain visible during dark-mode hydration and subsequent renders.
Breaking change and upgrade instructions
Mermaid 12 makes ELK the default layout for supported diagrams, so existing diagrams can change size and arrangement. ELK and Dagre are both bundled; no additional package is required.
To retain Dagre layouts site-wide, configure:
look: 'classic'also restores the previous look. Docusaurus retains itsdefaultlight theme anddarkdark theme. For individual diagrams, setconfig.layout: dagrein Mermaid front matter instead.Remove
@mermaid-js/layout-elkfrom the site's dependencies and remove any custom layout registration. Replaceflowchart.defaultRenderer,class.defaultRenderer, andstate.defaultRendererwith the top-levellayoutoption.Mermaid 12 targets ES2024 and Safari 17.4+. Sites supporting older browsers may need additional transpilation or polyfills.
Test Plan
Test links
Deploy preview: https://deploy-preview-12454--docusaurus-2.netlify.app/
Preview pages:
Related issues/PRs
Mermaid 12 release notes