Skip to content

Conversation

@omkarht
Copy link
Contributor

@omkarht omkarht commented Nov 19, 2025

📑 Summary

This PR fixes the classDef style application mechanism in treemap diagrams. Previously, user-defined styles via classDef were not being applied correctly due to type inconsistencies and SVG attribute override issues. This fix ensures that treemap diagrams now properly respect custom styles defined through classDef, bringing them in line with other diagram types like flowchart and state diagrams.

Resolves #7167

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

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2025

🦋 Changeset detected

Latest commit: 1aa4cd9

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

This PR includes changesets to release 1 package
Name Type
mermaid 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

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 1aa4cd9
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/6927f56b2d884a00099700dc
😎 Deploy Preview https://deploy-preview-7178--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.

@github-actions github-actions bot added Type: Bug / Error Something isn't working or is incorrect Sponsored by MermaidChart labels Nov 19, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 19, 2025

Open in StackBlitz

@mermaid-js/examples

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

mermaid

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

@mermaid-js/layout-elk

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

@mermaid-js/layout-tidy-tree

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

@mermaid-js/mermaid-zenuml

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

@mermaid-js/parser

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

@mermaid-js/tiny

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

commit: 1aa4cd9

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.55%. Comparing base (2346801) to head (1aa4cd9).
⚠️ Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
packages/mermaid/src/diagrams/treemap/parser.ts 0.00% 1 Missing ⚠️
packages/mermaid/src/diagrams/treemap/utils.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #7178   +/-   ##
=======================================
  Coverage     3.55%   3.55%           
=======================================
  Files          473     473           
  Lines        47500   47500           
  Branches       731     731           
=======================================
  Hits          1687    1687           
  Misses       45813   45813           
Flag Coverage Δ
unit 3.55% <0.00%> (ø)

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

Files with missing lines Coverage Δ
packages/mermaid/src/diagrams/treemap/parser.ts 0.00% <0.00%> (ø)
packages/mermaid/src/diagrams/treemap/utils.ts 2.56% <0.00%> (ø)
🚀 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.

@argos-ci
Copy link

argos-ci bot commented Nov 19, 2025

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

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 4 changed, 5 added Nov 27, 2025, 7:14 AM

@omkarht omkarht marked this pull request as ready for review November 20, 2025 07:15
Copy link
Member

@sidharthv96 sidharthv96 left a comment

Choose a reason for hiding this comment

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

Does the argos changes validate this fix?

@omkarht
Copy link
Contributor Author

omkarht commented Nov 27, 2025

Does the argos changes validate this fix?

Yes @sidharthv96 , the Argos results validate the fix. I’ve also added 5 additional test cases to ensure broader coverage and confirm the behaviour.

@shubhamparikh2704 shubhamparikh2704 added this pull request to the merge queue Nov 27, 2025
Merged via the queue into develop with commit a30b3bb Nov 27, 2025
26 checks passed
@shubhamparikh2704 shubhamparikh2704 deleted the fix/7167-treemap-stroke-border-removal branch November 27, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Sponsored by MermaidChart Type: Bug / Error Something isn't working or is incorrect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Treemap: stroke:none / border removal not working

4 participants