Skip to content

feat(editor): add Mermaid preview fullscreen control - #597

Merged
murongg merged 2 commits into
v2from
feature/593-mermaid-fullscreen
Jul 28, 2026
Merged

feat(editor): add Mermaid preview fullscreen control#597
murongg merged 2 commits into
v2from
feature/593-mermaid-fullscreen

Conversation

@murongg

@murongg murongg commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a full-screen and restore toggle to the enlarged Mermaid preview toolbar
  • let the preview panel fill the Markra viewport while preserving zoom, pan, and reset controls
  • keep the existing enlarge-preview icon and use distinct standard icons for enter and exit full screen
  • restore the regular dialog on the first Escape before closing it on the next Escape
  • hide the CodeMirror code-header gap while Mermaid is in preview mode, while preserving it in source mode

Why

Large Mermaid diagrams can outgrow the current constrained preview dialog, making detailed sections difficult to inspect.

Validation

  • pnpm --filter @markra/editor test — 33 test files, 356 tests passed on the isolated rerun
  • pnpm --filter @markra/app test -- src/styles.test.ts — 60 tests passed
  • pnpm --filter @markra/editor typecheck:test — passed
  • pnpm --filter @markra/app typecheck:test — passed
  • pnpm --filter @markra/editor build — passed
  • pnpm --filter @markra/app build — passed
  • local desktop browser QA — Mermaid preview gap computed as display: none with zero height; source mode restored the 12px gap
  • An initial six-way concurrent verification run exposed two unrelated jsdom timing failures; the editor suite passed when rerun alone.

Risk

Low. The change is limited to the existing Mermaid preview widget, its dialog styles, and focused test coverage.

Closes #593

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markra-web Ready Ready Preview, Comment Jul 28, 2026 2:27pm

@murongg
murongg merged commit 8eedebf into v2 Jul 28, 2026
21 checks passed
@murongg
murongg deleted the feature/593-mermaid-fullscreen branch July 28, 2026 14:30
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.

[Feature]: Mermaid预览弹窗希望支持全屏控制按钮

1 participant