feat(website): fullscreen zoom viewer for architecture diagrams - #243
Draft
JohannesRudolph wants to merge 1 commit into
Draft
feat(website): fullscreen zoom viewer for architecture diagrams#243JohannesRudolph wants to merge 1 commit into
JohannesRudolph wants to merge 1 commit into
Conversation
Architecture diagrams are wide and detailed, and browser zoom does not help: the page reflows and the diagram stays fitted to its column. Every image in a reference architecture's markdown body now gets a fullscreen viewer with wheel/pinch zoom anchored at the cursor, drag-to-pan, keyboard shortcuts and a link to the raw SVG. Zoom changes the diagram's layout size rather than applying a scale() transform, so the browser re-renders the vector instead of blowing up a bitmap rasterized at fit size — text stays sharp when zoomed in. Mermaid-rendered diagrams go through the same path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Scorecard CheckNo module changes detected relative to |
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
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.
Problem
Users can't zoom into architecture diagrams on reference architecture pages. Browser zoom doesn't help — the page just reflows and the diagram stays fitted to its (fairly narrow) content column. Zooming an
<img>of an SVG via browser zoom also rasterizes it, so labels go blurry.What this does
Every image in a reference architecture's markdown body is wrapped in a figure with a small Fullscreen affordance. Clicking it opens a new shared
mst-diagram-viewerdialog that fills the viewport:+/-/0— 25%–1600%Escto close, live zoom-% readoutZoom resizes the diagram's layout box instead of applying
transform: scale(). A transform would rasterize the SVG once at fit size and blow that bitmap up — exactly the blurry result browser zoom already gives. Resizing makes the browser re-render the vector, so text stays sharp at 500%.Mermaid-rendered diagrams (still supported by the detail page, though reference architectures now commit DOT/SVG) go through the same path and hand the live
<svg>to the viewer.The affordance is always visible rather than hover-only, so it also exists on touch devices.
Verification
Driven in Chrome against the dev server on the STACKIT Landing Zone page:
0reset the view,Escclosed the viewer and left the page diagram intact<svg>, resizes on zoomng buildpasses.ng lintreports the same 27 pre-existing errors with and without this change.Review notes
Left as draft — worth a look at the viewer chrome (toolbar/hint bar styling) before merging, and it's only wired into the reference architecture detail page, the one place that currently renders markdown bodies.
🤖 Generated with Claude Code