Skip to content

fix: improve zenuml print rendering, sizing, and syntax resilience#7567

Open
MrCoder wants to merge 2 commits intomermaid-js:developfrom
MrCoder:fix/zenuml-print-sizing-resilience
Open

fix: improve zenuml print rendering, sizing, and syntax resilience#7567
MrCoder wants to merge 2 commits intomermaid-js:developfrom
MrCoder:fix/zenuml-print-sizing-resilience

Conversation

@MrCoder
Copy link
Copy Markdown
Contributor

@MrCoder MrCoder commented Apr 2, 2026

Summary

Details

This change updates the Mermaid ZenUML integration to use native SVG output from @zenuml/core instead of HTML inside foreignObject.

That change addresses three user-facing problems:

Print rendering (#6004): Lifelines are rendered as SVG lines instead of HTML borders, so they continue to appear in print preview and PDF export.

Responsive sizing (#7266): ZenUML output now respects Mermaid's useMaxWidth behavior and stays within its container instead of forcing a fixed oversized SVG.

Invalid syntax resilience (#7154): Invalid ZenUML no longer freezes the editor; rendering falls back to best-effort output instead.

Validation

  • pnpm exec vitest run packages/mermaid-zenuml/src/zenumlRenderer.spec.ts
  • pnpm exec tsc -p packages/mermaid-zenuml/tsconfig.json --noEmit

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit f691124
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/69ce42c84746210008aa87d0
😎 Deploy Preview https://deploy-preview-7567--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.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 2, 2026

🦋 Changeset detected

Latest commit: f691124

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

This PR includes changesets to release 2 packages
Name Type
mermaid Patch
@mermaid-js/mermaid-zenuml 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

@github-actions github-actions bot added the Type: Bug / Error Something isn't working or is incorrect label Apr 2, 2026
@MrCoder MrCoder force-pushed the fix/zenuml-print-sizing-resilience branch from eb17992 to c8978b2 Compare April 2, 2026 08:50
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 2, 2026

Open in StackBlitz

@mermaid-js/examples

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

mermaid

npm i https://pkg.pr.new/mermaid@7567

@mermaid-js/layout-elk

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

@mermaid-js/layout-tidy-tree

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

@mermaid-js/mermaid-zenuml

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

@mermaid-js/parser

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

@mermaid-js/tiny

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

commit: f691124

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 2.00000% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.34%. Comparing base (2b938d0) to head (f691124).

Files with missing lines Patch % Lines
packages/mermaid-zenuml/src/zenumlRenderer.ts 0.00% 49 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #7567   +/-   ##
=======================================
  Coverage     3.34%   3.34%           
=======================================
  Files          524     526    +2     
  Lines        55392   55417   +25     
  Branches       795     796    +1     
=======================================
+ Hits          1853    1854    +1     
- Misses       53539   53563   +24     
Flag Coverage Δ
unit 3.34% <2.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
packages/mermaid-zenuml/src/types/zenuml-core.d.ts 100.00% <100.00%> (ø)
packages/mermaid-zenuml/src/zenumlRenderer.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.

@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Apr 2, 2026

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

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 2 changed Apr 2, 2026, 10:31 AM

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MrCoder MrCoder marked this pull request as ready for review April 2, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

1 participant