Skip to content

feat(website): fullscreen zoom viewer for architecture diagrams - #243

Draft
JohannesRudolph wants to merge 1 commit into
mainfrom
feat/diagram-fullscreen-viewer
Draft

feat(website): fullscreen zoom viewer for architecture diagrams#243
JohannesRudolph wants to merge 1 commit into
mainfrom
feat/diagram-fullscreen-viewer

Conversation

@JohannesRudolph

Copy link
Copy Markdown
Member

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-viewer dialog that fills the viewport:

  • zoom via scroll wheel / trackpad pinch (anchored at the cursor), toolbar buttons, double-click, and + / - / 0 — 25%–1600%
  • drag to pan, Esc to close, live zoom-% readout
  • a button to open the raw SVG in a new tab

Zoom 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:

  • figure + button render, viewer opens with the SVG
  • wheel zoom reached 499% and stayed crisp
  • drag-pan applied the expected translate, 0 reset the view, Esc closed the viewer and left the page diagram intact
  • injected a mermaid block to exercise that path: renders, wraps, opens as a live <svg>, resizes on zoom

ng build passes. ng lint reports 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

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>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Scorecard Check

No module changes detected relative to origin/main.

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-243.d1o16zfeoh2slu.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant