feat: Add entry/exit node styling#176
Open
lornakelly wants to merge 2 commits into
Open
Conversation
Signed-off-by: lornakelly <lornakelly88@gmail.com>
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 dedicated rendering, configuration, and layout behavior for entry/exit “terminal” nodes in the React Flow diagram editor.
Changes:
- Introduces terminal node config (icon + i18n label key) and terminal type guard.
- Renders entry/exit nodes as compact “pill” nodes with translated labels and single handles.
- Updates diagram building + auto-layout sizing/spacing and adds/adjusts tests accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/serverless-workflow-diagram-editor/tests/react-flow/nodes/taskNodeConfig.test.ts | Adds coverage for terminal node config map + labelKey translation validity and asserts terminals aren’t returned by getNodeVisualConfig. |
| packages/serverless-workflow-diagram-editor/tests/react-flow/nodes/Nodes.test.tsx | Adds rendering assertions for terminal nodes (translated label, styling, single handle). |
| packages/serverless-workflow-diagram-editor/tests/react-flow/diagram/diagramBuilder.test.ts | Adds tests for terminal sizing via getNodeSize and ensures diagram nodes get correct dimensions. |
| packages/serverless-workflow-diagram-editor/tests/react-flow/diagram/autoLayout.integration.test.ts | Reformats node fixtures and updates spacing expectation to match new layout option. |
| packages/serverless-workflow-diagram-editor/src/react-flow/nodes/taskNodeConfig.ts | Adds terminal node config/type definitions + isTerminalNodeType. |
| packages/serverless-workflow-diagram-editor/src/react-flow/nodes/Nodes.tsx | Implements TerminalNodeContent and wires Entry/Exit nodes to it using i18n. |
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/diagramBuilder.ts | Uses getNodeSize and marks terminal nodes as non-selectable/non-draggable. |
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/autoLayout.ts | Adds terminal size constants, getNodeSize, updates fallback sizing and layered spacing. |
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.css | Adds styling for terminal “pill” nodes. |
| packages/serverless-workflow-diagram-editor/src/i18n/locales/en.ts | Adds node.entry / node.exit translation keys. |
| .changeset/entry-exit-nodes.md | Declares a minor release for adding entry/exit nodes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
80f2070 to
aadf20c
Compare
Signed-off-by: Lorna Kelly <lornakelly88@gmail.com>
aadf20c to
91d29fb
Compare
✅ Deploy Preview for swf-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for swf-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for swf-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Closes: #140
Summary
Replace placeholder nodes for entry exit container nodes
Changes
TerminalNodeContentcomponent