Skip to content

Conversation

darshanr0107
Copy link
Contributor

@darshanr0107 darshanr0107 commented Aug 6, 2025

📑 Summary

This PR updates the edge rendering logic to ensure that when a class with a colour property is applied to an edge via its ID, the colour is also correctly applied to the edge label text—just like when using linkStyle.

Resolves #6784

📏 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

netlify bot commented Aug 6, 2025

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 2e1d156
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/68b6da291ef5e900081225e9
😎 Deploy Preview https://deploy-preview-6826--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 Aug 6, 2025

Open in StackBlitz

@mermaid-js/examples

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

mermaid

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

@mermaid-js/layout-elk

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

@mermaid-js/mermaid-zenuml

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

@mermaid-js/parser

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

@mermaid-js/tiny

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

commit: 2e1d156

Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.66%. Comparing base (2972bf2) to head (2e1d156).
⚠️ Report is 145 commits behind head on develop.

Files with missing lines Patch % Lines
.../rendering-elements/shapes/handDrawnShapeStyles.ts 0.00% 5 Missing ⚠️
...aid/src/rendering-util/rendering-elements/edges.js 0.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6826   +/-   ##
=======================================
  Coverage     3.66%   3.66%           
=======================================
  Files          455     454    -1     
  Lines        45599   45594    -5     
  Branches       709     709           
=======================================
  Hits          1669    1669           
+ Misses       43930   43925    -5     
Flag Coverage Δ
unit 3.66% <0.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...aid/src/rendering-util/rendering-elements/edges.js 0.00% <0.00%> (ø)
.../rendering-elements/shapes/handDrawnShapeStyles.ts 0.00% <0.00%> (ø)

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

Copy link

argos-ci bot commented Aug 6, 2025

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

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 1 added Sep 2, 2025, 12:02 PM

Copy link

changeset-bot bot commented Aug 6, 2025

🦋 Changeset detected

Latest commit: 2e1d156

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

Copy link
Collaborator

@knsv knsv left a comment

Choose a reason for hiding this comment

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

This change breaks the Argos tests, specifically when styling using position number.

Some optional description over here if you need to add more info

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

This change breaks the Argos tests, specifically when styling using position number.

resolved in 227cef0

@darshanr0107 darshanr0107 requested a review from knsv August 12, 2025 14:10
@darshanr0107 darshanr0107 marked this pull request as ready for review August 12, 2025 14:10
Copy link
Contributor

The following issue(s) were detected:
• pnpm-lock.yaml changed without any package.json modification

Please address these and push an update.

Posted automatically by GitHub Actions

Some optional description over here if you need to add more info

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

The following issue(s) were detected:
• pnpm-lock.yaml changed without any package.json modification

Please address these and push an update.

Posted automatically by GitHub Actions

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.

Remove the pnpm-lock changes in this PR, and tests needs to pass.
Code changes looks good, but need to see argos test before approving.

Copy link
Collaborator

@knsv knsv left a comment

Choose a reason for hiding this comment

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

LGTM!

@knsv knsv added this pull request to the merge queue Sep 10, 2025
Merged via the queue into develop with commit baf4093 Sep 10, 2025
25 checks passed
@knsv knsv deleted the 6784-edge-label-color-mismatch branch September 10, 2025 13:53
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.

Working with IDs of Edges doesn't provide the same result as linkStyle (color)
3 participants