Skip to content

Add fullscreen controls to Mermaid diagrams - #26

Merged
openknowledge-sh merged 2 commits into
mainfrom
review/pr-16
Aug 4, 2026
Merged

Add fullscreen controls to Mermaid diagrams#26
openknowledge-sh merged 2 commits into
mainfrom
review/pr-16

Conversation

@filipdanisko

Copy link
Copy Markdown
Collaborator

Supersedes #16.

Original implementation by @davidmoshal. Commit af7ff5265f21f8d75eff6f5f557da91b7e8753c7 is retained unchanged to preserve authorship.

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.
  • Keep the local viewer and interactive HTML exports identical through shared Vite-built assets.
  • Preserve Mermaid strict security mode and invalid-diagram fallback behavior.
  • Add permanent Chromium E2E coverage and update viewer documentation.

Main integration

  • Merge current main into the original contribution.
  • Preserve the current viewer grid, OKF 0.2 surfaces, and related documentation.
  • Regenerate viewer.js and viewer.css from the merged source.
  • Verify that rebuilding the viewer leaves both committed assets bit-for-bit unchanged.
  • Include no feature-specific dependency or lockfile changes.

Validation

  • pnpm build:web
  • pnpm test:web — 8/8
  • pnpm test:cli
  • pnpm test:browser — 9/9
  • go run ./packages/cli/cmd/openknowledge validate Wiki
  • Repeated pnpm --filter @openknowledge-sh/web build:viewer with a clean Git diff

@openknowledge-sh
openknowledge-sh merged commit 0617244 into main Aug 4, 2026
8 of 9 checks 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.

3 participants