[Feature]: View Mermaid diagrams in documents full size, with zoom, and download them
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 15/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- frontend
Research direction
The diagram rendering lives in ArtifactMarkdown.tsx, where Mermaid's useMaxWidth setting and the .mermaid-diagram svg { max-width: 100% } CSS rule shrink wide diagrams. The work is already in progress as PR #831, stacked on #828, so review that branch rather than starting fresh. Done means a full-size dialog with zoom, pan and fit controls, plus a Download SVG button that keeps the diagram's background.
Written by the indexing model from the issue text.
Description
Description
Diagrams in generated documents are often too small to read in the document preview, even in the preview overlay. I'd like a way to see a diagram at full size and zoom in on it, and to download it.
The cause is that Mermaid draws each diagram at its natural size but limits it to its container's width (useMaxWidth), and the app's CSS does the same (.mermaid-diagram svg { max-width: 100% }). A wide left-to-right flowchart is therefore scaled down to a fraction of its size in an ordinary panel.
Use case
A generated architecture document has a component diagram with a dozen nodes in a row. In the preview it's a thin strip whose labels can't be read, and the preview overlay only makes it a little bigger. Reviewers want to read the diagram, zoom into one part of it, or download it to share and view elsewhere.
Area
Frontend (web application)
Additional context
I have this working and will raise a PR, stacked on the fix for #828 because both touch ArtifactMarkdown.tsx. It adds two buttons to each rendered Mermaid diagram:
- View full size: a dialog at the diagram's own size, with zoom buttons, keyboard zoom, Ctrl or Command with the scroll wheel, fit to window, and drag to pan.
- Download SVG: a standalone SVG on the background the diagram was drawn on.
It needs no new dependencies.
- Dominant language
- JavaScript
- Stars
- 128
- Forks
- 62
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 102
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/sample-collaborative-ai-dlc
-
area/infra nfr/operations
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aws-samples/sample-collaborative-ai-dlc#843 ·
Maintainers usually reply within 1 day
-
[Bug]: Platform credential review times out on a large executions table (full-table inventory scan)Possibly taken @dc2tom claimed this 1 day ago. Openarea/backend nfr/performance topic/admin
Difficulty 3/5 Half a day Newbie friendliness 45/100
aws-samples/sample-collaborative-ai-dlc#840 ·
Maintainers usually reply within 1 day
-
[Bug]: Durable watchdog and PR-wait reconciler only check the first 100 rows of their indexPossibly taken @rafaelsmf claimed this 2 days ago. Openarea/backend nfr/reliability topic/intents
Difficulty 3/5 Half a day Newbie friendliness 45/100
aws-samples/sample-collaborative-ai-dlc#836 ·
Maintainers usually reply within 1 day
-
[RFC]: Spend and work controls: usage totals, holds, spend limits and caps per space and intentOpenarea/backend nfr/cost rfc topic/intents topic/spaces
Difficulty 5/5 Over a week Newbie friendliness 12/100
aws-samples/sample-collaborative-ai-dlc#833 ·
Maintainers usually reply within 1 day
-
[Bug]: Wide tables in the document preview are cut off and the activity panel can't be widened enough to read themPossibly taken @adrianrobinson42 claimed this 4 days ago. Openarea/frontend good first issue topic/knowledge
Difficulty 3/5 1-2 days Newbie friendliness 20/100
aws-samples/sample-collaborative-ai-dlc#828 · 1 comment ·
Maintainers usually reply within 1 day
All issues in aws-samples/sample-collaborative-ai-dlc
Similar issues
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
LangerSword/gitone#7 ·
-
bootstrap enhancement themes
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
quarto-dev/quarto-cli#15421 · 2 comments ·
Maintainers usually reply within 1 day
-
good first issue reliability security should-have
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 13 days
-
[BUG]: chunkSource protocol stripping truncates URLs or reads an inner schemePossibly taken @Bensonbenyi claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Mintplex-Labs/anything-llm#7338 ·
Maintainers usually reply within 1 day