From 0ae9d8db6af5bc0ae3172933bddee37f30b3ed49 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 29 May 2024 20:36:37 -0300 Subject: [PATCH 1/2] chore: Refactor ParameterComponent handle button rendering This commit refactors the rendering of the handle button in the ParameterComponent. It improves the readability and maintainability of the code by simplifying the logic and removing unnecessary ternary operators. --- .../components/parameterComponent/index.tsx | 44 ++++++++++--------- src/frontend/src/utils/styleUtils.ts | 2 + 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/frontend/src/customNodes/genericNode/components/parameterComponent/index.tsx b/src/frontend/src/customNodes/genericNode/components/parameterComponent/index.tsx index 33e3d6ddc..3838b6c68 100644 --- a/src/frontend/src/customNodes/genericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/customNodes/genericNode/components/parameterComponent/index.tsx @@ -258,28 +258,30 @@ export default function ParameterComponent({ {title} - - - + + + )} )} diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index c73ec5d23..3ac09c8e8 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -53,6 +53,7 @@ import { FileType2, FileUp, FlaskConical, + ScanEye, FolderIcon, FolderPlus, FolderPlusIcon, @@ -397,6 +398,7 @@ export const nodeIconsLucide: iconsType = { textsplitters: Scissors, wrappers: Gift, helpers: Wand2, + ScanEye, experimental: FlaskConical, langchain_utilities: PocketKnife, WolframAlphaAPIWrapper: SvgWolfram, From 86b6672bbd8f6c35e0525882da698aa1d2f88b7d Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 29 May 2024 21:03:54 -0300 Subject: [PATCH 2/2] refactor name props --- .../src/components/recordsOutputComponent/index.tsx | 6 +++--- .../outputModal/components/switchOutputView/index.tsx | 5 ++++- .../src/modals/IOModal/components/IOFieldView/index.tsx | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/components/recordsOutputComponent/index.tsx b/src/frontend/src/components/recordsOutputComponent/index.tsx index 5d157d8d6..a917d00fd 100644 --- a/src/frontend/src/components/recordsOutputComponent/index.tsx +++ b/src/frontend/src/components/recordsOutputComponent/index.tsx @@ -6,13 +6,13 @@ import TableComponent from "../tableComponent"; import { extractColumnsFromRows } from "../../utils/utils"; function RecordsOutputComponent({ - flowPool, + flowPoolObject, pagination, }: { - flowPool: FlowPoolObjectType; + flowPoolObject: FlowPoolObjectType; pagination: boolean; }) { - const rows = flowPool?.data?.artifacts?.records ?? []; + const rows = flowPoolObject?.data?.artifacts?.records ?? []; const columns = extractColumnsFromRows(rows, "union"); const columnDefs = columns.map((col, idx) => ({ ...col, diff --git a/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx b/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx index ee09a9983..4ff9c2be8 100644 --- a/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx +++ b/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx @@ -31,7 +31,10 @@ export default function SwitchOutputView(nodeId): JSX.Element { - + ); diff --git a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx index 9d955336d..f97ec9672 100644 --- a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx @@ -247,7 +247,7 @@ export default function IOFieldView({ return (