Skip to content

feat(plugin-mermaid): add mermaid diagram rendering plugin#159

Open
tigeryao123 wants to merge 1 commit into
floatboatai:mainfrom
tigeryao123:feat/plugin-mermaid
Open

feat(plugin-mermaid): add mermaid diagram rendering plugin#159
tigeryao123 wants to merge 1 commit into
floatboatai:mainfrom
tigeryao123:feat/plugin-mermaid

Conversation

@tigeryao123

Copy link
Copy Markdown

Summary

Add @floatboat/nexus-plugin-mermaid — renders fenced mermaid code blocks as inline SVG diagrams.

Changes

  • New package: packages/plugin-mermaid/
  • Async SVG rendering with loading placeholder and error handling
  • Hover-to-reveal ✎ edit button (matches plugin-math UX)
  • 18 unit tests, all 555 project tests pass
  • Integrated into electron-demo

Test Plan

  1. Open electron-demo, type a mermaid code block, move cursor away → diagram renders
  2. Click diagram → returns to edit mode to reveal source
  3. Type invalid mermaid syntax → shows inline error message

Checklist

  • New package follows existing plugin conventions
  • Tests pass (pnpm exec vitest run)
  • Build succeeds (pnpm build)
  • Manual verification in electron-demo

- Add @floatboat/nexus-plugin-mermaid package
- Render fenced mermaid code blocks as inline SVG diagrams
- Async rendering with loading placeholder and error handling
- Hover-to-reveal edit button matching plugin-math UX pattern
- 18 unit tests covering widget match, async SVG injection,
  error handling, edit button, destroy, and editor integration
- Integrate into electron-demo
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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