Skip to content

Update documentation and Nedi diagrams to Mermaid 12.1 - #3133

Closed
ktsaou wants to merge 1 commit into
masterfrom
deps/refresh-mermaid-renderer
Closed

ktsaou wants to merge 1 commit into
masterfrom
deps/refresh-mermaid-renderer

Conversation

@ktsaou

@ktsaou ktsaou commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Update Learn documentation and Nedi to Mermaid 12.1.0 with the approved version 12 rendering defaults. Keep the companion Markdown-it 15.0.2 and Viz 3.31.0 updates and recomputed SHA-384 pins. Docusaurus and the root now resolve one supported Mermaid/parser graph; no lodash override or incompatible resolution is introduced.

Actual browser qualification found that persisted dark mode left one collapsed Parents diagram blank. A small Docusaurus theme wrapper remounts the original renderer on color-mode changes, giving it a fresh SVG identity while preserving its configuration, error boundary and props. This is a checked compatibility adapter, without a copied renderer or custom layout.

Validation: forced frozen Yarn install; complete 2,032-page publication gates; all 490 Vitest tests (one existing skip) and 99 Node tests. After the adapter, the changed build and test command passed again. All twelve actual documentation cases (three routes, both themes, desktop/mobile) rendered every diagram with no horizontal overflow. Persisted dark reload, theme switching and client navigation passed. The real public Nedi embed loaded the integrity-checked assets and rendered a synthetic client-only Markdown/link, Mermaid and Graphviz response; desktop/mobile passed without a model request or network write.

This replacement incorporates the intent of #3093 and supersedes its unsupported lodash exception and the overlapping Viz-only #3073 proposal. Existing loader, Markdown adapter, embed endpoints/cache parameters and SEO policy remain unchanged. Modern ES2024 browsers, including Safari 17.4 or newer, are required.


Summary by cubic

Updates documentation and Nedi diagrams to mermaid 12.1.0 with the approved version 12 rendering defaults, and bumps the companion markdown-it 15.0.2 and @viz-js/viz 3.31.0 with recomputed SHA-384 pins. Docusaurus and the Nedi embed now resolve one supported Mermaid/parser graph.

A small Docusaurus theme wrapper remounts the upstream renderer on color-mode changes, fixing a blank diagram in persisted dark mode while preserving configuration, error boundary, and props. Rendering now requires an ES2024-capable browser, including Safari 17.4 or newer. The README documents the supported browser range and notes that the local lock and the CDN asset share the same version but update independently.

Written for commit f71b81d. Summary will update on new commits.

View guided diff Turn on auto-fix

@ktsaou
ktsaou requested a review from a team as a code owner October 9, 2026 00:53
@ktsaou
ktsaou requested review from mtblz and witalisoft October 9, 2026 00:53
@netlify

netlify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for netdata-docusaurus ready!

Name Link
🔨 Latest commit f71b81d
🔍 Latest deploy log https://app.netlify.com/projects/netdata-docusaurus/deploys/6ac83b293a3f1f0008c2eb2d
😎 Deploy Preview https://deploy-preview-3133--netdata-docusaurus.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f1b4fc5a-708d-45de-a039-928e05ac6e1d
📥 Commits

Reviewing files that changed from the base of the PR and between 3e846ee and f71b81d.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • README.md
  • package.json
  • src/components/Nedi/assets.js
  • src/theme/Mermaid/index.js
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant Dev as Developer
    participant Docs as Docusaurus Site
    participant Theme as Mermaid Theme Wrapper
    participant Renderer as Mermaid Renderer
    participant Nedi as Nedi Embed
    participant CDN as CDN (jsDelivr)
    participant Browser as Browser

    Note over Dev,Docs: Documentation Build & Runtime Flow

    Dev->>Docs: Build site with Mermaid 12.1.0
    Docs->>Theme: Initialize Docusaurus theme
    Theme->>Renderer: Load Mermaid renderer (version 12 defaults)
    
    Note over Docs,Theme: Client-Side Rendering
    
    Browser->>Docs: Request page with diagrams
    Docs->>Theme: Render Mermaid component
    Theme->>Theme: Check color mode
    alt Color mode change (e.g., dark mode persisted)
        Theme->>Theme: Remount renderer with new key
        Theme->>Renderer: Render diagram with fresh SVG identity
    else Initial render or same color mode
        Theme->>Renderer: Render diagram with existing identity
    end
    Renderer-->>Browser: Display rendered diagram
    
    Note over Nedi,CDN: Ask Nedi Asset Loading
    
    Browser->>Nedi: Load Ask Nedi interface
    Nedi->>CDN: Fetch markdown-it@15.0.2 (integrity-checked)
    CDN-->>Nedi: Return markdown-it script
    Nedi->>CDN: Fetch mermaid@12.1.0 (integrity-checked)
    CDN-->>Nedi: Return Mermaid 12.1.0
    Nedi->>CDN: Fetch @viz-js/viz@3.31.0 (integrity-checked)
    CDN-->>Nedi: Return viz script
    
    Note over Nedi: Render synthetic Markdown/Link, Mermaid, Graphviz
    Nedi->>Renderer: Render diagrams client-side
    Renderer-->>Browser: Display diagrams in Nedi
    
    Note over Docs,Nedi: Browser Requirements
    Note over Docs,Nedi: ES2024-capable browser required (Safari 17.4+)
Loading

View guided diff | Turn on auto-fix | Re-trigger cubic

@ktsaou
ktsaou marked this pull request as draft October 9, 2026 09:36
@ktsaou

ktsaou commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

Superseded by #3136 (#3136), which combines all supported Learn package, runtime, tooling and copied-browser-asset updates with a fresh inventory and combined validation. This proposal's history and branch are retained; review the combined draft instead.

@ktsaou ktsaou closed this Oct 9, 2026
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.

1 participant