Skip to content

Add fullscreen controls to Mermaid diagrams - #16

Draft
davidmoshal wants to merge 1 commit into
openknowledge-sh:mainfrom
davidmoshal:codex/mermaid-viewport-preview
Draft

Add fullscreen controls to Mermaid diagrams#16
davidmoshal wants to merge 1 commit into
openknowledge-sh:mainfrom
davidmoshal:codex/mermaid-viewport-preview

Conversation

@davidmoshal

Copy link
Copy Markdown

Follow-up to #14, which shipped Mermaid rendering in v0.9.0. This clean PR supersedes #15, whose branch was mistakenly force-pushed after the original rendering work became redundant.

Summary

  • Open rendered Mermaid diagrams in an accessible viewport-filling dialog.
  • Add toolbar, wheel, drag, pinch, and keyboard zoom/pan controls, including Fit and 100%.
  • Restore the diagram and trigger focus on close, and close safely before theme rerenders.
  • Keep the local viewer and interactive HTML exports identical through the shared Vite-built viewer assets.
  • Preserve Mermaid strict security mode and readable invalid-diagram fallback behavior.
  • Add permanent Chromium E2E coverage and update the command, exporter, and changelog documentation.

Validation

  • pnpm build:web
  • pnpm test:web (8/8)
  • pnpm test:cli
  • pnpm build:cli
  • pnpm test:race
  • pnpm test:browser (8/8)
  • openknowledge validate Wiki
  • Desktop and mobile Playwright runtime audit against a real Mermaid-containing knowledge bundle

No dependency or lockfile changes are included.

Local tooling note

The aggregate pnpm test wrapper reached the unchanged packed-npm smoke test, where pnpm 10.33 propagated a project-scoped allow-scripts setting that npm 11.19 rejects. Running the unchanged test directly with node scripts/test-packed-npm.mjs passed.

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