Export diagram from model to mermaid code#174
Open
cheryl7114 wants to merge 6 commits into
Open
Conversation
added 3 commits
June 8, 2026 15:38
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
✅ Deploy Preview for swf-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds Mermaid export capabilities to the diagram editor, exposing “copy” and “download” actions from the SidePanel and providing a core utility to generate Mermaid code.
Changes:
- Add
exportToMermaid+ clipboard/file download helpers insrc/core - Expose “Copy Mermaid Code” and “Download as Mermaid File” buttons in
SidePanel - Add i18n strings and tests for both core export and SidePanel rendering states
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/serverless-workflow-diagram-editor/tests/side-panel/SidePanel.test.tsx | Adds UI-state tests for Mermaid export buttons visibility. |
| packages/serverless-workflow-diagram-editor/tests/core/mermaidExport.test.ts | Adds a unit test for Mermaid conversion output shape. |
| packages/serverless-workflow-diagram-editor/src/side-panel/SidePanel.tsx | Adds export buttons + handlers wired to new Mermaid export helpers. |
| packages/serverless-workflow-diagram-editor/src/i18n/locales/en.ts | Adds English strings for Mermaid export UI. |
| packages/serverless-workflow-diagram-editor/src/core/mermaidExport.ts | Introduces Mermaid export, clipboard copy, and download helpers. |
| packages/serverless-workflow-diagram-editor/src/core/index.ts | Re-exports the new Mermaid export module. |
| .changeset/mermaid-export.md | Declares a minor release for the new functionality. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Contributor
|
@cheryl7114, Could you take a look? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Changes Made
Added two buttons to export diagram model (JSON/YAML) to Mermaid: