Skip to content

mindmap breaking issue in ELK layout - #7019

Merged
ashishjain0512 merged 3 commits into
developfrom
tmp-mindmap-elk
Sep 30, 2025
Merged

ashishjain0512 merged 3 commits into
developfrom
tmp-mindmap-elk

Conversation

@darshanr0107

@darshanr0107 darshanr0107 commented Sep 29, 2025 •

Copy link
Copy Markdown
Contributor

📑 Summary

This PR fixes a mindmap rendering issue in ELK layout where Mermaid failed with type error

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

@changeset-bot

changeset-bot Bot commented Sep 29, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8b3057f

The changes in this PR will be included in the next version bump.

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

@netlify

netlify Bot commented Sep 29, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 8b3057f
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/68db7f80358d1a00082d4c92
😎 Deploy Preview https://deploy-preview-7019--mermaid-js.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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 29, 2025 •

Copy link
Copy Markdown

Open in StackBlitz

@mermaid-js/examples

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/examples@7019

mermaid

npm i https://pkg.pr.new/mermaid-js/mermaid@7019

@mermaid-js/layout-elk

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-elk@7019

@mermaid-js/layout-tidy-tree

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-tidy-tree@7019

@mermaid-js/mermaid-zenuml

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/mermaid-zenuml@7019

@mermaid-js/parser

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/parser@7019

@mermaid-js/tiny

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/tiny@7019

commit: 8b3057f

@codecov

codecov Bot commented Sep 29, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.55%. Comparing base (7effdc1) to head (8b3057f).
⚠️ Report is 47 commits behind head on develop.

Files with missing lines Patch % Lines
packages/mermaid-layout-elk/src/render.ts 0.00% 14 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #7019      +/-   ##
==========================================
- Coverage     3.57%   3.55%   -0.03%     
==========================================
  Files          474     474              
  Lines        47150   47465     +315     
  Branches       730     730              
==========================================
  Hits          1687    1687              
- Misses       45463   45778     +315     
Flag Coverage Δ
unit 3.55% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/mermaid-layout-elk/src/render.ts 0.13% <0.00%> (-0.01%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@darshanr0107 darshanr0107 changed the title resolve mindmap breaking issue in ELK layout mindmap breaking issue in ELK layout Sep 29, 2025
@argos-ci

argos-ci Bot commented Sep 29, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Sep 30, 2025, 7:08 AM

on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>

@knsv knsv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a mindmap rendering issue in ELK layout where Mermaid failed with a type error by restructuring how NodeWithVertex objects are created and handled in the rendering process.

  • Replaces type assertion with explicit object construction for better type safety
  • Removes redundant nodeDb assignment that was causing conflicts
  • Adds improved error logging for debugging ELK layout issues

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/mermaid-layout-elk/src/render.ts Fixes type handling and object creation for nodes, removes duplicate nodeDb assignment, adds error logging
cypress/platform/knsv2.html Adds test cases for mindmap with ELK layout to verify the fix
.changeset/slow-lemons-know.md Documents the bug fix in the changelog

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/mermaid-layout-elk/src/render.ts
Comment thread cypress/platform/knsv2.html
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>

@ashishjain0512 ashishjain0512 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ashishjain0512
ashishjain0512 added this pull request to the merge queue Sep 30, 2025
Merged via the queue into develop with commit c1c14e4 Sep 30, 2025
26 checks passed
@ashishjain0512
ashishjain0512 deleted the tmp-mindmap-elk branch September 30, 2025 09:15
This was referenced Mar 3, 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.

4 participants