Fix parent nodes bad edges routing#181
Conversation
Signed-off-by: handreyrc <handrey.cunha@gmail.com> # Conflicts: # packages/serverless-workflow-diagram-editor/src/react-flow/diagram/autoLayout.ts # packages/serverless-workflow-diagram-editor/tests/react-flow/diagram/autoLayout.integration.test.ts
Signed-off-by: handreyrc <handrey.cunha@gmail.com>
✅ Deploy Preview for swf-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates diagram layout and edge routing to better support orthogonal paths and nested/parent-node scenarios, including port-based connections and revised waypoint handling.
Changes:
- Updated edge path generation to produce orthogonal (right-angled) segments between points.
- Revised ELK auto-layout configuration, added output ports to parent nodes, and adjusted waypoint mapping (incl. absolute coords for nested edges).
- Expanded/updated unit + integration tests and snapshots to match new routing/layout behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/serverless-workflow-diagram-editor/src/react-flow/edges/Edges.tsx | Generates orthogonal SVG paths from waypoints. |
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/autoLayout.ts | Adjusts ELK layout options, adds parent ports, and updates waypoint extraction/coordinate handling. |
| packages/serverless-workflow-diagram-editor/src/core/graph.ts | Redirects edges crossing parent boundaries and prevents duplicate redirect edges. |
| packages/serverless-workflow-diagram-editor/tests/react-flow/edges/Edges.test.tsx | Updates expected paths for new orthogonal routing behavior. |
| packages/serverless-workflow-diagram-editor/tests/react-flow/edges/snapshots/Edges.test.tsx.snap | Updates snapshot to reflect new path geometry. |
| packages/serverless-workflow-diagram-editor/tests/react-flow/diagram/autoLayout.integration.test.ts | Adds/updates test cases for ports, waypoint semantics, and nested-edge coordinate conversion. |
| packages/serverless-workflow-diagram-editor/tests/core/graph.test.ts | Adds coverage for new edge redirection behavior across nested parents. |
| packages/serverless-workflow-diagram-editor/tests/side-panel/NodeDetailsView.test.tsx | Minor test cleanup (unused import) and string formatting adjustment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: handreyrc <handrey.cunha@gmail.com>
fantonangeli
left a comment
There was a problem hiding this comment.
@handreyrc I think this is a nice improvement to add in the changeset, but "up to you".
Signed-off-by: handreyrc <handrey.cunha@gmail.com>
Signed-off-by: handreyrc <handrey.cunha@gmail.com>
|
Thanks @handreyrc , looks really nice, just one small comment |
Signed-off-by: handreyrc <handrey.cunha@gmail.com>
|
If you do not have further considerations this PR is good enough to be merged. Thanks |
Closes #179
Summary
This PR fix a series of path distortions around edges routing involving parent nodes
Changes