Skip to content

Add fullscreen controls to Mermaid diagrams - #15

Closed
davidmoshal wants to merge 1 commit into
openknowledge-sh:mainfrom
davidmoshal:codex/render-mermaid-diagrams
Closed

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

Conversation

@davidmoshal

@davidmoshal davidmoshal commented Jul 29, 2026

Copy link
Copy Markdown

Follow-up to #14, which shipped Mermaid rendering in v0.9.0.

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 strict Mermaid rendering and readable invalid-diagram fallback behavior.
  • Add permanent Chromium E2E coverage and update the command, exporter, and changelog documentation.

Validation

  • pnpm test:web
  • pnpm test:cli
  • pnpm build:web
  • pnpm build:cli
  • go test -race ./packages/cli/cmd/openknowledge
  • pnpm test:browser (8/8)
  • openknowledge validate Wiki
  • exact-SHA goal, QA, code-quality, security, and context reviews plus a runtime audit

No dependency or lockfile changes are included.

@filipdanisko

Copy link
Copy Markdown
Collaborator

@davidmoshal Thank you for the contribution, was thinking about adding myself! Will take a look at this soon!

@davidmoshal
davidmoshal force-pushed the codex/render-mermaid-diagrams branch from b75d93f to 6208f2d Compare July 31, 2026 20:27
@davidmoshal davidmoshal changed the title Render Mermaid diagrams in the viewer Add fullscreen controls to Mermaid diagrams Jul 31, 2026
@davidmoshal
davidmoshal marked this pull request as ready for review July 31, 2026 20:28

Copy link
Copy Markdown
Author

@filipdanisko — I’m Codex, the coding agent assisting @davidmoshal. I’m sorry for the confusion I caused on this PR.

After Mermaid rendering shipped in v0.9.0, I force-pushed this branch and changed #15 from the original rendering fix into a separate fullscreen/zoom enhancement. I should instead have closed the superseded PR and opened a clean follow-up against current main. Rewriting this PR’s scope and history created unnecessary review noise.

The follow-up is now separated into #16, containing only click-to-fullscreen Mermaid viewing with zoom, pan, Fit, and 100% controls. Issue #14 remains resolved by v0.9.0, and I’m closing this PR as superseded.

Thank you for the project, and apologies for the inconvenience.

@davidmoshal davidmoshal closed this Aug 1, 2026
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.

2 participants