Skip to content

Commit 08c2608

Browse files
committed
fix: condition to check for empty pipe
1 parent 784a415 commit 08c2608

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

packages/frontend/src/components/EmptyFlowStepHeader/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function EmptyFlowStepHeader(
1717
props: EmptyFlowStepHeaderProps,
1818
): JSX.Element {
1919
const { isTrigger, onModalOpen, isNested } = props
20-
const { isDrawerOpen, isMobile, isNewPipe } = useContext(EditorContext)
20+
const { isDrawerOpen, isMobile, isEmptyPipe } = useContext(EditorContext)
2121

2222
return (
2323
<Flex
@@ -39,7 +39,7 @@ export default function EmptyFlowStepHeader(
3939
bg: 'interaction.muted.neutral.active',
4040
}}
4141
w={getFlowStepHeaderWidth(isDrawerOpen, isMobile, isNested)}
42-
sx={isNewPipe && isTrigger ? pulsingBoxStyles : {}}
42+
sx={isEmptyPipe && isTrigger ? pulsingBoxStyles : {}}
4343
>
4444
<Icon as={isTrigger ? BiSolidBolt : BiPlus} boxSize={6} />
4545
<Text textStyle="subhead-1">

packages/frontend/src/contexts/Editor.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ interface IEditorContextValue {
4747
currentTestExecutionStep: IExecutionStep | null
4848
isDrawerOpen: boolean
4949
isMobile: boolean
50-
isNewPipe: boolean
50+
isEmptyPipe: boolean
5151
isTestExecuting: boolean
5252
shouldWarnOnLeave: boolean
5353
stepsWithVars: StepWithVariables[]
@@ -79,7 +79,7 @@ export const EditorContext = createContext<IEditorContextValue>({
7979
currentTestExecutionStep: null,
8080
isDrawerOpen: false,
8181
isMobile: false,
82-
isNewPipe: false,
82+
isEmptyPipe: false,
8383
isTestExecuting: false,
8484
shouldWarnOnLeave: false,
8585
stepsWithVars: [],
@@ -170,9 +170,8 @@ export const EditorProvider = ({
170170
const { data: getAppsData, loading: isLoadingAllApps } = useQuery(GET_APPS)
171171

172172
const steps = flow?.steps ?? []
173-
const isNewPipe =
174-
steps.length === 2 &&
175-
steps.every((s) => s.key === null && s.appKey === null)
173+
const isEmptyPipe =
174+
steps.length <= 2 && steps.every((s) => s.key === null && s.appKey === null)
176175

177176
const hasIfThen = flow?.steps.some(
178177
(step: IStep) => step.key === TOOLBOX_ACTIONS.IfThen,
@@ -388,7 +387,7 @@ export const EditorProvider = ({
388387
hasIfThen,
389388
isDrawerOpen,
390389
isMobile,
391-
isNewPipe,
390+
isEmptyPipe,
392391
flow,
393392
flowId,
394393
currentTestExecutionStep,

0 commit comments

Comments
 (0)