Skip to content

Conversation

@milesspencer35
Copy link

📑 Summary

Added support for sequence numbers in sequence diagrams to use decimal values up to the hundredths place, and enabled incrementing using decimal values to the same precision. Other PR had issues, so this is a new one.

Resolves #7078

📏 Design Decisions

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

  • Updated the Jison parser for sequence diagrams to accept decimal values to the hundredths place.
  • Updated how the sequenceIndex and sequenceIndexStep are added to remove floating-point errors.
  • Decrease the font size once a sequence number gets sufficiently long and spills out of the circle. I decided this was the best course of action because it was a simple fix for a rare use case.

📋 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 18, 2025

🦋 Changeset detected

Latest commit: 50b2166

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
Copy link

netlify bot commented Nov 18, 2025

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 50b2166
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/691cae3da27c2c00080e766e
😎 Deploy Preview https://deploy-preview-7174--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 the Type: Enhancement New feature or request label Nov 18, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 18, 2025

Open in StackBlitz

@mermaid-js/examples

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

mermaid

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

@mermaid-js/layout-elk

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

@mermaid-js/layout-tidy-tree

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

@mermaid-js/mermaid-zenuml

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

@mermaid-js/parser

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

@mermaid-js/tiny

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

commit: 50b2166

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.55%. Comparing base (717d3b3) to head (50b2166).
⚠️ Report is 136 commits behind head on develop.

Files with missing lines Patch % Lines
.../mermaid/src/diagrams/sequence/sequenceRenderer.ts 0.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #7174      +/-   ##
==========================================
- Coverage     3.55%   3.55%   -0.01%     
==========================================
  Files          474     473       -1     
  Lines        47453   47504      +51     
  Branches       730     731       +1     
==========================================
  Hits          1687    1687              
- Misses       45766   45817      +51     
Flag Coverage Δ
unit 3.55% <0.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
.../mermaid/src/diagrams/sequence/sequenceRenderer.ts 0.06% <0.00%> (-0.01%) ⬇️

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

@argos-ci
Copy link

argos-ci bot commented Nov 18, 2025

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

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 added Nov 18, 2025, 5:45 PM

@milesspencer35 milesspencer35 marked this pull request as ready for review November 18, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for decimal numbers with sequence diagram

1 participant