Compare commits

...

1 Commits

Author SHA1 Message Date
Vikhyath Mondreti
61bea279cd improvement(autoconnect): click to add paths also autoconnect 2026-01-08 18:04:23 -08:00
2 changed files with 15 additions and 3 deletions

View File

@@ -1337,6 +1337,11 @@ const WorkflowContent = React.memo(() => {
const baseName = type === 'loop' ? 'Loop' : 'Parallel'
const name = getUniqueBlockName(baseName, blocks)
const autoConnectEdge = tryCreateAutoConnectEdge(basePosition, id, {
blockType: type,
targetParentId: null,
})
addBlock(
id,
type,
@@ -1349,7 +1354,7 @@ const WorkflowContent = React.memo(() => {
},
undefined,
undefined,
undefined
autoConnectEdge
)
return
@@ -1368,6 +1373,12 @@ const WorkflowContent = React.memo(() => {
const baseName = defaultTriggerName || blockConfig.name
const name = getUniqueBlockName(baseName, blocks)
const autoConnectEdge = tryCreateAutoConnectEdge(basePosition, id, {
blockType: type,
enableTriggerMode,
targetParentId: null,
})
addBlock(
id,
type,
@@ -1376,7 +1387,7 @@ const WorkflowContent = React.memo(() => {
undefined,
undefined,
undefined,
undefined,
autoConnectEdge,
enableTriggerMode
)
}
@@ -1395,6 +1406,7 @@ const WorkflowContent = React.memo(() => {
addBlock,
effectivePermissions.canEdit,
checkTriggerConstraints,
tryCreateAutoConnectEdge,
])
/**

View File

@@ -480,7 +480,7 @@ export function General({ onOpenChange }: GeneralProps) {
</div>
<div className='flex items-center justify-between'>
<Label htmlFor='auto-connect'>Auto-connect on drag</Label>
<Label htmlFor='auto-connect'>Auto-connect on drop</Label>
<Switch
id='auto-connect'
checked={settings?.autoConnect ?? true}