Define edge types and create React Flow custom edge components#135
Conversation
There was a problem hiding this comment.
Pull request overview
Adds custom React Flow edge types (default, condition, error) to the Serverless Workflow diagram editor, including waypoint-based routing, labels, and arrow markers, plus accompanying styling and tests.
Changes:
- Introduces
EdgeTypesmapping and custom edge renderers with label rendering and waypoint path support. - Updates the sample
Diagramto use edge types, show labels/waypoints, and apply default arrow markers. - Adds CSS styling for edge strokes and edge labels, plus a new test suite for edge types and waypoint path generation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/serverless-workflow-diagram-editor/tests/react-flow/edges/Edges.test.tsx | New tests for edge type registration/rendering and createPathFromWayPoints. |
| packages/serverless-workflow-diagram-editor/src/styles.css | Registers a new CSS layer for custom edge labels. |
| packages/serverless-workflow-diagram-editor/src/react-flow/edges/Edges.tsx | Adds custom edge components, label renderer, and waypoint-to-SVG-path helper. |
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx | Wires edgeTypes, edge sample data (types/labels/waypoints), and default arrow markers into React Flow. |
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.css | Adds styling for edge lines and edge labels (including layer usage). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4fd7b01 to
55418e9
Compare
|
Thanks for Pr @handreyrc just added a few comments |
55418e9 to
26ef7c6
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
26ef7c6 to
588825c
Compare
588825c to
d47810e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d47810e to
38573d6
Compare
fantonangeli
left a comment
There was a problem hiding this comment.
Thank you @handreyrc , I suggested the use of it.each to avoid repetitions in tests
38573d6 to
bf4ada9
Compare
bf4ada9 to
b183d90
Compare
fantonangeli
left a comment
There was a problem hiding this comment.
LGTM thanks @handreyrc !
b183d90 to
11dfa6b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: handreyrc <handrey.cunha@gmail.com>
11dfa6b to
e26dccf
Compare
|
If you do not have further considerations this PR is good enough to be merged. Thanks! |
Closes #52
Summary
This PR adds react flow edge types, customizable edge components and support to calculated waypoints.
Changes
custom-edges.mp4