Skip to content

Conversation

darshanr0107
Copy link
Contributor

@darshanr0107 darshanr0107 commented Sep 25, 2025

📑 Summary

  • Mermaid had two configs for HTML labels (htmlLabels and flowchart.htmlLabels) with inconsistent precedence.
  • This PR deprecates flowchart.htmlLabels. Root-level htmlLabels is now the single source of truth.

📏 Design Decisions

  • AddedgetEffectiveHtmlLabels(config) to centralize logic.
  • Root-level takes precedence;flowchart.htmlLabels logs a deprecation warning.
  • Marked flowchart.htmlLabelsas deprecated in the schema.

📋 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 Sep 25, 2025

🦋 Changeset detected

Latest commit: e82e464

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

This PR includes changesets to release 1 package
Name Type
mermaid Minor

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 Sep 25, 2025

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit e82e464
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/68d52f81a3f9ca0008cb4db9
😎 Deploy Preview https://deploy-preview-6995--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 Sep 25, 2025

Open in StackBlitz

@mermaid-js/examples

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

mermaid

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

@mermaid-js/layout-elk

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

@mermaid-js/layout-tidy-tree

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

@mermaid-js/mermaid-zenuml

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

@mermaid-js/parser

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

@mermaid-js/tiny

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

commit: e82e464

Copy link

argos-ci bot commented Sep 25, 2025

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

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 145 changed Sep 25, 2025, 12:14 PM

…date insertEdgeLabel to use new getEffectiveHtmlLabels helper

on-behalf-of: @Mermaid-Chart <[email protected]>
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 11.59420% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.59%. Comparing base (d5c4eff) to head (e82e464).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
packages/mermaid/src/dagre-wrapper/nodes.js 0.00% 10 Missing ⚠️
...ackages/mermaid/src/diagrams/requirement/styles.js 0.00% 9 Missing ⚠️
.../src/rendering-util/rendering-elements/clusters.js 0.00% 7 Missing ⚠️
packages/mermaid/src/dagre-wrapper/clusters.js 0.00% 5 Missing ⚠️
packages/mermaid/src/dagre-wrapper/edges.js 0.00% 4 Missing ⚠️
packages/mermaid/src/dagre-wrapper/shapes/util.js 0.00% 4 Missing ⚠️
packages/mermaid/src/dagre-wrapper/createLabel.js 0.00% 3 Missing ⚠️
...aid/src/rendering-util/rendering-elements/edges.js 0.00% 3 Missing ⚠️
...c/rendering-util/rendering-elements/shapes/util.ts 0.00% 3 Missing ⚠️
packages/mermaid/src/config.ts 75.00% 2 Missing ⚠️
... and 6 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #6995      +/-   ##
==========================================
+ Coverage     3.57%   3.59%   +0.01%     
==========================================
  Files          473     474       +1     
  Lines        47139   47177      +38     
  Branches       730     732       +2     
==========================================
+ Hits          1687    1694       +7     
- Misses       45452   45483      +31     
Flag Coverage Δ
unit 3.59% <11.59%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
packages/mermaid/src/config.type.ts 100.00% <ø> (ø)
packages/mermaid/src/diagrams/common/common.ts 32.05% <100.00%> (+0.29%) ⬆️
.../mermaid/src/diagrams/requirement/requirementDb.ts 0.00% <0.00%> (ø)
packages/mermaid/src/config.ts 25.17% <75.00%> (+3.04%) ⬆️
packages/mermaid/src/dagre-wrapper/shapes/note.js 0.00% <0.00%> (ø)
...ges/mermaid/src/diagrams/class/classRenderer-v2.ts 0.37% <0.00%> (-0.01%) ⬇️
packages/mermaid/src/mermaidAPI.ts 0.30% <0.00%> (-0.01%) ⬇️
...c/rendering-util/rendering-elements/createLabel.js 0.00% <0.00%> (ø)
...c/rendering-util/rendering-elements/shapes/note.ts 0.00% <0.00%> (ø)
packages/mermaid/src/dagre-wrapper/createLabel.js 0.00% <0.00%> (ø)
... and 8 more

... and 1 file 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 marked this pull request as ready for review September 25, 2025 09:34
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.

1 participant