Skip to content

6638:sequence diagram additional messages - #6789

Merged
shubhamparikh2704 merged 37 commits into
developfrom
6638-sequence-diagram-additional-messages
Sep 29, 2025
Merged

shubhamparikh2704 merged 37 commits into
developfrom
6638-sequence-diagram-additional-messages

Conversation

@omkarht

@omkarht omkarht commented Jul 23, 2025 •

Copy link
Copy Markdown
Contributor

📑 Summary

This PR introduces enhanced arrowhead support in sequence diagrams, following Option B of the proposed syntax. The updates include:

  • New arrowhead type: Solid half and Stick half, represented using -| and -\ and its variants.
  • Support for half arrows:
    • Solid half arrows:
      • Top: -|\
      • Bottom: -|/
      • Reverse top: /|-
      • Reverse bottom: \|-
image
  • Stick half arrows:
    • Top: -\\
    • Bottom: -//
    • Reverse top: //-
    • Reverse bottom: \\-
image
  • Central connection circle support: append () after the arrow to indicate a central lifeline connection (e.g., ->(), -->>(), -|\(), etc.)
    image

These enhancements improve visual expressiveness and maintain compatibility with our DSL, bringing us closer to parity with tools like PlantUML and Mermaid.

Resolves #6638

📏 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

changeset-bot Bot commented Jul 23, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b75dcb8

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

@netlify

netlify Bot commented Jul 23, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit b75dcb8
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/68d247f3bb75400008679ea8
😎 Deploy Preview https://deploy-preview-6789--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 Jul 23, 2025 •

Copy link
Copy Markdown

Open in StackBlitz

@mermaid-js/examples

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

mermaid

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

@mermaid-js/layout-elk

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

@mermaid-js/layout-tidy-tree

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

@mermaid-js/mermaid-zenuml

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

@mermaid-js/parser

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

@mermaid-js/tiny

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

commit: b75dcb8

@argos-ci

argos-ci Bot commented Jul 23, 2025 •

Copy link
Copy Markdown

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

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 1 changed, 24 added Sep 23, 2025, 7:22 AM

omkarht added 2 commits July 28, 2025 15:37
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
@omkarht omkarht changed the title 6638 sequence diagram additional messages 6638:sequence diagram additional messages Jul 28, 2025
@codecov

codecov Bot commented Jul 28, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 315 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.55%. Comparing base (d5c4eff) to head (b75dcb8).
⚠️ Report is 40 commits behind head on develop.

Files with missing lines Patch % Lines
.../mermaid/src/diagrams/sequence/sequenceRenderer.ts 0.00% 209 Missing ⚠️
packages/mermaid/src/diagrams/sequence/svgDraw.js 0.00% 71 Missing ⚠️
...ckages/mermaid/src/diagrams/sequence/sequenceDb.ts 0.00% 35 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #6789      +/-   ##
==========================================
- Coverage     3.57%   3.55%   -0.03%     
==========================================
  Files          473     474       +1     
  Lines        47139   47453     +314     
  Branches       730     730              
==========================================
  Hits          1687    1687              
- Misses       45452   45766     +314     
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/src/diagrams/sequence/types.ts 100.00% <ø> (ø)
...ckages/mermaid/src/diagrams/sequence/sequenceDb.ts 0.00% <0.00%> (ø)
packages/mermaid/src/diagrams/sequence/svgDraw.js 0.00% <0.00%> (ø)
.../mermaid/src/diagrams/sequence/sequenceRenderer.ts 0.06% <0.00%> (-0.01%) ⬇️

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

@omkarht
omkarht marked this pull request as ready for review August 7, 2025 08:29
Comment thread packages/mermaid/src/docs/syntax/sequenceDiagram.md
Comment thread packages/mermaid/src/docs/syntax/sequenceDiagram.md Outdated
Comment thread packages/mermaid/src/docs/syntax/sequenceDiagram.md Outdated
Comment thread packages/mermaid/src/diagrams/sequence/svgDraw.js
Comment thread packages/mermaid/src/diagrams/sequence/parser/sequenceDiagram.jison Outdated
Comment thread packages/mermaid/src/docs/syntax/sequenceDiagram.md Outdated
@omkarht
omkarht requested a review from sidharthv96 September 2, 2025 13:33
@omkarht
omkarht requested a review from knsv September 4, 2025 06:42
@sidharthv96

Copy link
Copy Markdown
Member
image

Alignment of the right arrowhead or dotted line is incorrect

@omkarht

omkarht commented Sep 11, 2025 •

Copy link
Copy Markdown
Contributor Author

Alignment of the right arrowhead or dotted line is incorrect

@sidharthv96 , I have resolved this one in e3ef5e4

@shubhamparikh2704
shubhamparikh2704 added this pull request to the merge queue Sep 29, 2025
Merged via the queue into develop with commit 2f8d9ba Sep 29, 2025
25 checks passed
@shubhamparikh2704
shubhamparikh2704 deleted the 6638-sequence-diagram-additional-messages branch September 29, 2025 08:20
This was referenced Mar 3, 2026
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.

Add additional message types to Sequence Diagrams

4 participants