fix: improve zenuml print rendering, sizing, and syntax resilience#7567
fix: improve zenuml print rendering, sizing, and syntax resilience#7567MrCoder wants to merge 2 commits into
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: f691124 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
eb17992 to
c8978b2
Compare
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/layout-tidy-tree
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Superseded by #7647 — rebased onto latest develop with a clean lockfile. |
|
Thanks @MrCoder for keeping it clean |
Summary
@zenuml/coreDetails
This change updates the Mermaid ZenUML integration to use native SVG output from
@zenuml/coreinstead of HTML insideforeignObject.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
useMaxWidthbehavior 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.tspnpm exec tsc -p packages/mermaid-zenuml/tsconfig.json --noEmit