-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/feat/workflow-parallel-support' …
…into feat/workflow-parallel-support
- Loading branch information
Showing
12 changed files
with
369 additions
and
158 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
55 changes: 55 additions & 0 deletions
55
web/app/components/workflow/nodes/_base/components/next-step/container.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import Add from './add' | ||
import Item from './item' | ||
import type { | ||
CommonNodeType, | ||
Node, | ||
} from '@/app/components/workflow/types' | ||
|
||
type ContainerProps = { | ||
nodeId: string | ||
nodeData: CommonNodeType | ||
sourceHandle: string | ||
nextNodes: Node[] | ||
branchName?: string | ||
} | ||
|
||
const Container = ({ | ||
nodeId, | ||
nodeData, | ||
sourceHandle, | ||
nextNodes, | ||
branchName, | ||
}: ContainerProps) => { | ||
return ( | ||
<div className='p-0.5 space-y-0.5 rounded-[10px] bg-background-section-burn'> | ||
{ | ||
branchName && ( | ||
<div | ||
className='flex items-center px-2 system-2xs-semibold-uppercase text-text-tertiary truncate' | ||
title={branchName} | ||
> | ||
{branchName} | ||
</div> | ||
) | ||
} | ||
{ | ||
nextNodes.map(nextNode => ( | ||
<Item | ||
key={nextNode.id} | ||
nodeId={nextNode.id} | ||
data={nextNode.data} | ||
sourceHandle='source' | ||
/> | ||
)) | ||
} | ||
<Add | ||
isParallel={!!nextNodes.length} | ||
nodeId={nodeId} | ||
nodeData={nodeData} | ||
sourceHandle={sourceHandle} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
export default Container |
This file contains 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
Oops, something went wrong.