Skip to content

feat: Add and style leaf nodes#136

Open
lornakelly wants to merge 1 commit intoserverlessworkflow:mainfrom
lornakelly:lk/85/leaf-node-styling
Open

feat: Add and style leaf nodes#136
lornakelly wants to merge 1 commit intoserverlessworkflow:mainfrom
lornakelly:lk/85/leaf-node-styling

Conversation

@lornakelly
Copy link
Copy Markdown
Contributor

Closes: #85

Summary

Add styled component for custom react flow leaf nodes (Call, Emit, Listen, raise, Run, Set, Switch, Wait)

Changes

  • Add styled TaskNodeContent component
  • Replace placeholders for leaf nodes
  • Add support for light and dark themes
Screen.Recording.2026-05-05.at.12.28.17.mov

Copilot AI review requested due to automatic review settings May 5, 2026 11:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the agreed UX styling for “leaf” task nodes in the React Flow diagram editor by introducing a shared TaskNodeContent component backed by a per-node-type config map, plus corresponding CSS and tests. This moves several leaf nodes off placeholders and updates sizing to better fit the new visual design.

Changes:

  • Introduces taskNodeConfigMap (color/icon/type label) for leaf task nodes and adds unit tests to ensure completeness/shape.
  • Implements TaskNodeContent and wires leaf nodes (Call/Emit/Listen/Raise/Run/Set/Switch/Wait) to render with the new styled content.
  • Updates diagram CSS for light/dark themes and increases default node dimensions.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/serverless-workflow-diagram-editor/tests/react-flow/nodes/taskNodeConfig.test.ts Adds coverage ensuring all leaf node types have config entries with expected fields.
packages/serverless-workflow-diagram-editor/tests/react-flow/nodes/Nodes.test.tsx Expands node rendering tests and validates leaf node DOM/config integration.
packages/serverless-workflow-diagram-editor/src/react-flow/nodes/taskNodeConfig.ts Defines leaf node visual config (colors/icons/type labels).
packages/serverless-workflow-diagram-editor/src/react-flow/nodes/Nodes.tsx Adds TaskNodeContent and switches leaf nodes to styled rendering using config.
packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Updates sample diagram node labels/positions to better demonstrate new nodes.
packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.css Adds styling for task leaf nodes and tweaks dark mode/custom node styling.
packages/serverless-workflow-diagram-editor/src/core/autoLayout.ts Adjusts default node size to match the new node design.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/nodes/Nodes.tsx Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/nodes/Nodes.tsx Outdated
@lornakelly lornakelly force-pushed the lk/85/leaf-node-styling branch from 83e4f3e to 35f5cee Compare May 5, 2026 13:02
@lornakelly lornakelly force-pushed the lk/85/leaf-node-styling branch from 35f5cee to 65182ca Compare May 5, 2026 16:42
Copilot AI review requested due to automatic review settings May 5, 2026 16:42
Signed-off-by: lornakelly <lornakelly88@gmail.com>
@lornakelly lornakelly force-pushed the lk/85/leaf-node-styling branch from 65182ca to b6c1020 Compare May 5, 2026 16:44
@lornakelly
Copy link
Copy Markdown
Contributor Author

After rebase with edge changes

Screenshot 2026-05-05 at 17 45 49

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Apply node styling (UX)

2 participants