Skip to content

Conversation

darshanr0107
Copy link
Contributor

@darshanr0107 darshanr0107 commented Jul 14, 2025

📑 Summary

  • Refactors the existing Mind map implementation from a functional approach to a class-based architecture to improve code organization, maintainability, and extensibility.

  • Return a new DB object when diagramObject.db is called.

  • Introduces new MindmapDB class to encapsulate database operations and state

  • Migrates existing functions to class methods

Resolves #6750

📏 Design Decisions

Describe the way your implementation works or what design decisions you made if applicable.

📋 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:.

Copy link

changeset-bot bot commented Jul 14, 2025

🦋 Changeset detected

Latest commit: a9a0a9b

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

This PR includes changesets to release 2 packages
Name Type
mermaid Patch
@mermaid-js/examples Patch

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

Copy link

netlify bot commented Jul 14, 2025

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit a9a0a9b
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/687639ab817eeb0008e1d69b
😎 Deploy Preview https://deploy-preview-6751--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.

Copy link

pkg-pr-new bot commented Jul 14, 2025

Open in StackBlitz

@mermaid-js/examples

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

mermaid

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

@mermaid-js/layout-elk

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

@mermaid-js/mermaid-zenuml

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

@mermaid-js/parser

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

@mermaid-js/tiny

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

commit: a9a0a9b

Copy link

codecov bot commented Jul 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 125 lines in your changes missing coverage. Please review.

Project coverage is 3.70%. Comparing base (d7f1f12) to head (a9a0a9b).
Report is 20 commits behind head on develop.

Files with missing lines Patch % Lines
packages/mermaid/src/diagrams/mindmap/mindmapDb.ts 0.00% 121 Missing ⚠️
...mermaid/src/diagrams/mindmap/mindmap-definition.ts 0.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #6751      +/-   ##
==========================================
- Coverage     3.85%   3.70%   -0.15%     
==========================================
  Files          454     454              
  Lines        44761   44722      -39     
  Branches       707     707              
==========================================
- Hits          1725    1658      -67     
- Misses       43036   43064      +28     
Flag Coverage Δ
unit 3.70% <0.00%> (-0.15%) ⬇️

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

Files with missing lines Coverage Δ
...es/mermaid/src/diagrams/mindmap/mindmapRenderer.ts 0.00% <ø> (ø)
...kages/mermaid/src/diagrams/mindmap/mindmapTypes.ts 100.00% <ø> (ø)
packages/mermaid/src/diagrams/mindmap/svgDraw.ts 0.00% <ø> (ø)
...mermaid/src/diagrams/mindmap/mindmap-definition.ts 8.33% <0.00%> (-1.67%) ⬇️
packages/mermaid/src/diagrams/mindmap/mindmapDb.ts 0.00% <0.00%> (ø)

... and 4 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.

Copy link

argos-ci bot commented Jul 14, 2025

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

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 15, 2025, 11:31 AM

@darshanr0107 darshanr0107 requested a review from sidharthv96 July 15, 2025 06:49
@sidharthv96 sidharthv96 disabled auto-merge July 15, 2025 10:56
@darshanr0107 darshanr0107 requested a review from sidharthv96 July 15, 2025 11:23
@sidharthv96 sidharthv96 enabled auto-merge July 15, 2025 14:38
@sidharthv96 sidharthv96 added this pull request to the merge queue Jul 15, 2025
Merged via the queue into develop with commit abf2227 Jul 15, 2025
25 checks passed
@sidharthv96 sidharthv96 deleted the 6750-convert-mindmap-to-class-based-approach branch July 15, 2025 14:51
@github-actions github-actions bot mentioned this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update mindmap diagram to use the new class-based approach in the DB
3 participants