Skip to content

Commit b8bc0c6

Browse files
committed
fix(workflows): suppress hidden action tooltips while running
1 parent 773daf8 commit b8bc0c6

1 file changed

Lines changed: 36 additions & 26 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -417,13 +417,15 @@ export const ActionBar = memo(
417417
</Button>
418418
</span>
419419
</Tooltip.Trigger>
420-
<Tooltip.Content side='top'>
421-
{isLocked || isParentLocked
422-
? 'Block is locked'
423-
: !isEnabled && isParentDisabled
424-
? 'Parent container is disabled'
425-
: getTooltipMessage(isEnabled ? 'Disable' : 'Enable')}
426-
</Tooltip.Content>
420+
{!isWorkflowRunning && (
421+
<Tooltip.Content side='top'>
422+
{isLocked || isParentLocked
423+
? 'Block is locked'
424+
: !isEnabled && isParentDisabled
425+
? 'Parent container is disabled'
426+
: getTooltipMessage(isEnabled ? 'Disable' : 'Enable')}
427+
</Tooltip.Content>
428+
)}
427429
</Tooltip.Root>
428430
)}
429431

@@ -453,7 +455,7 @@ export const ActionBar = memo(
453455
</Button>
454456
</DropdownMenuTrigger>
455457
</Tooltip.Trigger>
456-
<Tooltip.Content side='top'>Color</Tooltip.Content>
458+
{!isWorkflowRunning && <Tooltip.Content side='top'>Color</Tooltip.Content>}
457459
</Tooltip.Root>
458460
<DropdownMenuContent
459461
align='center'
@@ -509,13 +511,15 @@ export const ActionBar = memo(
509511
</Button>
510512
</span>
511513
</Tooltip.Trigger>
512-
<Tooltip.Content side='top'>
513-
{isLocked && isParentLocked
514-
? 'Parent container is locked'
515-
: isLocked
516-
? 'Unlock'
517-
: 'Lock'}
518-
</Tooltip.Content>
514+
{!isWorkflowRunning && (
515+
<Tooltip.Content side='top'>
516+
{isLocked && isParentLocked
517+
? 'Parent container is locked'
518+
: isLocked
519+
? 'Unlock'
520+
: 'Lock'}
521+
</Tooltip.Content>
522+
)}
519523
</Tooltip.Root>
520524
)}
521525

@@ -538,9 +542,11 @@ export const ActionBar = memo(
538542
</Button>
539543
</span>
540544
</Tooltip.Trigger>
541-
<Tooltip.Content side='top'>
542-
{isLocked || isParentLocked ? 'Block is locked' : getTooltipMessage('Duplicate')}
543-
</Tooltip.Content>
545+
{!isWorkflowRunning && (
546+
<Tooltip.Content side='top'>
547+
{isLocked || isParentLocked ? 'Block is locked' : getTooltipMessage('Duplicate')}
548+
</Tooltip.Content>
549+
)}
544550
</Tooltip.Root>
545551
)}
546552

@@ -573,11 +579,13 @@ export const ActionBar = memo(
573579
</Button>
574580
</span>
575581
</Tooltip.Trigger>
576-
<Tooltip.Content side='top'>
577-
{isLocked || isParentLocked
578-
? 'Block is locked'
579-
: getTooltipMessage('Remove from Subflow')}
580-
</Tooltip.Content>
582+
{!isWorkflowRunning && (
583+
<Tooltip.Content side='top'>
584+
{isLocked || isParentLocked
585+
? 'Block is locked'
586+
: getTooltipMessage('Remove from Subflow')}
587+
</Tooltip.Content>
588+
)}
581589
</Tooltip.Root>
582590
)}
583591

@@ -599,9 +607,11 @@ export const ActionBar = memo(
599607
</Button>
600608
</span>
601609
</Tooltip.Trigger>
602-
<Tooltip.Content side='top'>
603-
{isLocked || isParentLocked ? 'Block is locked' : getTooltipMessage('Delete')}
604-
</Tooltip.Content>
610+
{!isWorkflowRunning && (
611+
<Tooltip.Content side='top'>
612+
{isLocked || isParentLocked ? 'Block is locked' : getTooltipMessage('Delete')}
613+
</Tooltip.Content>
614+
)}
605615
</Tooltip.Root>
606616
</div>
607617
</div>

0 commit comments

Comments
 (0)