feat: Implement Export to Draw.io functionality#2639
Conversation
Add support for exporting LikeC4 diagrams directly to Draw.io editor. When clicking the "Export to Draw.io" menu item in the app, the diagram is pre-loaded in app.diagrams.net in a new browser tab. The implementation: - Adds `generateDrawioEditUrl(xml)` generator function that builds a draw.io editor URL with compressed diagram data - Creates a new vite-plugin virtual module (`likec4:drawio`) that pre-computes URLs server-side, avoiding client-side compression overhead - Enables the "Export to Draw.io" menu item in the export button with an async click handler Co-Authored-By: Claude Haiku 4.5 <[email protected]>
🦋 Changeset detectedLatest commit: 2825ce1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis pull request adds Draw.io export functionality to the LikeC4 application. It introduces a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Enable the "Export to Draw.io" menu item in the app's export dropdown. Clicking it opens app.diagrams.net in a new tab with the current diagram pre-loaded and ready for editing.
The implementation follows the existing virtual module pattern used by other export formats (d2, mmd, puml). Draw.io URLs are pre-computed server-side to avoid shipping compression libraries to the client.
Changes
generateDrawioEditUrl()to @likec4/generators to build draw.io editor URLs with compressed diagram datalikec4:drawio) that pre-computes URLs for each view🤖 Generated with Claude Code
Summary by CodeRabbit