feat: use embedded Kanvas design for Meshery architecture diagram#7731
feat: use embedded Kanvas design for Meshery architecture diagram#7731shteypandey28-hue wants to merge 7 commits into
Conversation
db80242 to
e28eb93
Compare
|
Attach a video recording please |
|
🚀 Preview deployment: https://layer5.io/pr-preview/pr-7731/
|
64cf081 to
ecba6b8
Compare
|
I've attached the video recording below showing the Meshery Architecture Design Embed in action. It demonstrates the interactive Cytoscape graph loading properly in both light and dark modes, with the auto-centering working as expected. meshery_arch.mp4The recent commits also include a fix to ensure the script path resolves correctly across all nested routes. Let me know if you need any other adjustments! |
819e899 to
c276fb7
Compare
Signed-off-by: shteypandey28-hue <shteypandey28@gmail.com>
Signed-off-by: shteypandey28-hue <shteypandey28@gmail.com>
Signed-off-by: shteypandey28-hue <shteypandey28@gmail.com>
Signed-off-by: shteypandey28-hue <shteypandey28@gmail.com>
Signed-off-by: shteypandey28-hue <shteypandey28@gmail.com>
…routes Signed-off-by: shteypandey28-hue <shteypandey28@gmail.com>
c276fb7 to
9f9487d
Compare
There was a problem hiding this comment.
This file contains the exported Cytoscape JSON data and layout configuration generated directly from the Meshery Kanvas Playground.
The @layer5/meshery-design-embed component requires an embedScriptSrc to dynamically render the interactive diagram. When a design is exported from Kanvas via the "Export to JS/Embed" option, it generates this file containing all the necessary base64 SVG assets, coordinates, and styling configurations.
Why it's in the /static directory: Initially, I placed this in src/assets, but the embed script dynamically injects a <script type="module" src="..."> tag at runtime. Gatsby doesn't resolve relative asset paths in injected tags during runtime, resulting in a 404 error. Placing it in the static/ directory ensures Gatsby serves it as a public asset, making it directly accessible for the embed component to fetch and render the interactive architecture diagram successfully.

Description
This PR replaces the static SVG with an interactive, embedded Meshery Kanvas design using the
@layer5/meshery-design-embedcomponent. This directly addresses the feedback from @lee and @james Horton to use a proper embedded design rather than custom SVG animations.(Note: Currently using a placeholder design ID to verify the component layout. Will swap out the
embedIdand script once the final architecture design is exported from Kanvas.)Notes for Reviewers
MesheryDesignEmbed.Signed commits