Skip to content

feat(preview): click to open images in the diagram viewer#101

Merged
mattenarle10 merged 2 commits into
mainfrom
fix/pr99-image-viewer-links
Jul 10, 2026
Merged

feat(preview): click to open images in the diagram viewer#101
mattenarle10 merged 2 commits into
mainfrom
fix/pr99-image-viewer-links

Conversation

@mattenarle10

Copy link
Copy Markdown
Owner

summary

  • preserve the contributor implementation from feat(preview): click to open images in the diagram viewer #99 and its original authorship
  • open ordinary preview images in the existing diagram viewer
  • leave images wrapped in Markdown links to their intended navigation
  • add focused regression coverage for viewer clicks, linked images, size fallback, escaping, and cleanup

checks

  • bun test (26 pass)
  • bun run build
  • cargo check --manifest-path src-tauri/Cargo.toml
  • git diff --check

Replaces #99 because the contributor organization rejected maintainer branch updates despite maintainer edits being enabled.

beihai23 and others added 2 commits July 10, 2026 15:01
Reuse the existing DiagramViewerOverlay (already shared by Mermaid and
PlantUML) for inline preview images, via a new decorateImages step that
mirrors decorateMermaidBlocks / decoratePlantUmlBlocks.

- single-click any preview image to open the fullscreen viewer
- cursor: zoom-in + draggable=false suppress native image drag
- excludes images inside .mdv-plantuml and pre.mdv-mermaid (own affordance)
- svg images (*.svg, data:image/svg+xml) work via native <img> support;
  naturalWidth falls back to the rendered box when svg reports 0
- no change to the overlay component, Mermaid/PlantUML wiring, i18n, or Rust

Co-Authored-By: Claude <[email protected]>
@mattenarle10 mattenarle10 merged commit 2d238d5 into main Jul 10, 2026
2 checks passed
@mattenarle10 mattenarle10 deleted the fix/pr99-image-viewer-links branch July 10, 2026 14:53
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