diff --git a/client/src/components/Workflow/Invocation/Graph/InvocationGraph.vue b/client/src/components/Workflow/Invocation/Graph/InvocationGraph.vue index 7512b0389314..30f877d39ee6 100644 --- a/client/src/components/Workflow/Invocation/Graph/InvocationGraph.vue +++ b/client/src/components/Workflow/Invocation/Graph/InvocationGraph.vue @@ -60,7 +60,6 @@ const props = withDefaults(defineProps(), { const loadingGraph = ref(true); const initialLoading = ref(true); const errored = ref(false); -const expandInvocationInputs = ref(false); const errorMessage = ref(""); const showingJobId = ref(undefined); const pollTimeout = ref(null); @@ -221,7 +220,6 @@ function getStepKey(step: Step) { :workflow="props.workflow" :hide-graph="hideGraph" :showing-job-id="showingJobId || ''" - :expand-invocation-inputs.sync="expandInvocationInputs" @update:showing-job-id="(jobId) => (showingJobId = jobId)" @focus-on-step="toggleActiveNode" /> diff --git a/client/src/components/Workflow/Invocation/Graph/WorkflowInvocationSteps.vue b/client/src/components/Workflow/Invocation/Graph/WorkflowInvocationSteps.vue index 25907b1fc5fc..e6e554dd6f18 100644 --- a/client/src/components/Workflow/Invocation/Graph/WorkflowInvocationSteps.vue +++ b/client/src/components/Workflow/Invocation/Graph/WorkflowInvocationSteps.vue @@ -27,15 +27,12 @@ interface Props { workflow: Workflow; /** Whether the invocation graph is hidden */ hideGraph?: boolean; - /** Whether the inputs are expanded */ - expandInvocationInputs: boolean; /** The id for the currently shown job */ showingJobId: string; } const emit = defineEmits<{ (e: "focus-on-step", stepId: number): void; - (e: "update:expand-invocation-inputs", value: boolean): void; (e: "update:showing-job-id", value: string | undefined): void; }>(); @@ -44,6 +41,7 @@ const props = withDefaults(defineProps(), { }); const stepsCard = ref(); +const expandInvocationInputs = ref(false); const stateStore = useWorkflowStateStore(props.storeId); const { activeNodeId } = storeToRefs(stateStore); @@ -55,10 +53,10 @@ const workflowRemainingSteps = Object.values(props.workflow.steps).filter((step) watch( () => [activeNodeId.value, stepsCard.value], ([nodeId, card]) => { - if (nodeId && card) { + if (nodeId !== undefined && card) { // if the active node id is an input step, expand the inputs section, else, collapse it const isAnInput = workflowInputSteps.findIndex((step) => step.id === activeNodeId.value) !== -1; - emit("update:expand-invocation-inputs", isAnInput); + expandInvocationInputs.value = isAnInput; if (isAnInput) { const inputHeader = stepsCard.value?.querySelector(`.portlet-header`); inputHeader?.scrollIntoView(); @@ -77,10 +75,6 @@ watch( function showStep(jobId: string | undefined) { emit("update:showing-job-id", jobId); } - -function toggleInputsSection() { - emit("update:expand-invocation-inputs", !props.expandInvocationInputs); -}