Mermaid improvements#11874
Merged
Merged
Conversation
Includes a fix for incorrect viewBox casing in Radar and Packet diagram renderers (mermaid-js/mermaid#7076) and other improvements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of positioning the temporary render element offscreen at -9999px, use visibility:hidden with position:fixed so the browser computes correct bounding boxes for SVG elements. Offscreen elements can produce incorrect getBBox() results, leading to wrong viewBox dimensions and diagrams rendering too big or too small. Fixes #11782 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Track access order via a dedicated LRU index key so the cache evicts least-recently-used entries rather than arbitrary ones. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
NoWauu
pushed a commit
to NoWauu/outline
that referenced
this pull request
May 12, 2026
* fix: Upgrade mermaid to 11.13.0 Includes a fix for incorrect viewBox casing in Radar and Packet diagram renderers (mermaid-js/mermaid#7076) and other improvements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: Use visibility:hidden for mermaid rendering element Instead of positioning the temporary render element offscreen at -9999px, use visibility:hidden with position:fixed so the browser computes correct bounding boxes for SVG elements. Offscreen elements can produce incorrect getBBox() results, leading to wrong viewBox dimensions and diagrams rendering too big or too small. Fixes outline#11782 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add session storage for generated diagrams to reduce relayout * fix: Use LRU eviction for mermaid sessionStorage cache Track access order via a dedicated LRU index key so the cache evicts least-recently-used entries rather than arbitrary ones. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
justnx
reviewed
May 14, 2026
| renderElement.style.visibility = "hidden"; | ||
| renderElement.style.top = "0"; | ||
| renderElement.style.left = "0"; | ||
| renderElement.style.width = "100%"; |
There was a problem hiding this comment.
100% binds rendering to viewport. Shouldn’t this use the editor width instead? Thinks this could break scaling/wide screens/virtual desktops.
tommoor
added a commit
that referenced
this pull request
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related #11782