From a3821f43675c447bf43379ded3ebab65ca1d4a51 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 17 Jun 2024 10:53:11 -0300 Subject: [PATCH 1/4] Fixed not being able to throw nodes at screen --- .../src/components/inputComponent/index.tsx | 13 +- src/frontend/src/utils/reactflowUtils.ts | 126 +++++++++--------- 2 files changed, 70 insertions(+), 69 deletions(-) diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 10763de70..b5875b3dc 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -24,7 +24,6 @@ export default function InputComponent({ blurOnEnter = false, optionsIcon = "ChevronsUpDown", selectedOption, - setSelectedOption, selectedOptions = [], setSelectedOptions, @@ -72,7 +71,7 @@ export default function InputComponent({ editNode ? "input-edit-node" : "", password && editNode ? "pr-8" : "", password && !editNode ? "pr-10" : "", - className! + className!, )} placeholder={password && editNode ? "Key" : placeholder} onChange={(e) => { @@ -155,7 +154,7 @@ export default function InputComponent({ + + + + ); +} From 8f5c224283116e56574ef76d131d343b4d649a7e Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 17 Jun 2024 11:15:03 -0300 Subject: [PATCH 4/4] Refactor flowStore.ts to improve build success alert logic --- src/frontend/src/stores/flowStore.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/stores/flowStore.ts b/src/frontend/src/stores/flowStore.ts index 6d1c2ad5c..15c5cf590 100644 --- a/src/frontend/src/stores/flowStore.ts +++ b/src/frontend/src/stores/flowStore.ts @@ -542,15 +542,13 @@ const useFlowStore = create((set, get) => ({ onBuildComplete: (allNodesValid) => { const nodeId = startNodeId || stopNodeId; if (!silent) { - if (nodeId && allNodesValid) { + if (allNodesValid) { setSuccessData({ - title: `${ + title: nodeId?`${ get().nodes.find((node) => node.id === nodeId)?.data.node ?.display_name - } built successfully`, + } built successfully`:FLOW_BUILD_SUCCESS_ALERT, }); - } else { - setSuccessData({ title: FLOW_BUILD_SUCCESS_ALERT }); } } get().setIsBuilding(false);