From a368991d390e5a0e8155dfa6d0eb6c91363ada40 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Fri, 1 Dec 2023 18:18:18 -0300 Subject: [PATCH] fix(GenericNode): change icon name from "Ungroup" to "group_components" to match the corresponding icon component fix(GradientSparkles): add new icon component "GradientUngroup" to render the "Ungroup" icon with gradient stroke fix(ComponentsComponent): add TODO comment to create a placeholder for when there are no components created yet fix(styleUtils): import and use the new "GradientUngroup" icon component for the "group_components" icon in nodeIconsLucide --- .../src/CustomNodes/GenericNode/index.tsx | 6 +++--- .../src/icons/GradientSparkles/index.tsx | 16 ++++++++++++++++ .../MainPage/components/components/index.tsx | 2 +- src/frontend/src/utils/styleUtils.ts | 7 ++++++- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 05fd19c23..594744bf5 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -177,7 +177,7 @@ export default function GenericNode({ } > -
+
{data.node?.display_name}
{data.node?.flow && ( )}
diff --git a/src/frontend/src/icons/GradientSparkles/index.tsx b/src/frontend/src/icons/GradientSparkles/index.tsx index f07c415e1..470708f89 100644 --- a/src/frontend/src/icons/GradientSparkles/index.tsx +++ b/src/frontend/src/icons/GradientSparkles/index.tsx @@ -60,3 +60,19 @@ export const GradientGroup = (props) => { ); }; + +export const GradientUngroup = (props) => { + return ( + <> + + + + + + + + + + + ); +}; diff --git a/src/frontend/src/pages/MainPage/components/components/index.tsx b/src/frontend/src/pages/MainPage/components/components/index.tsx index d2fac0216..c932954aa 100644 --- a/src/frontend/src/pages/MainPage/components/components/index.tsx +++ b/src/frontend/src/pages/MainPage/components/components/index.tsx @@ -105,7 +105,7 @@ export default function ComponentsComponent({
{!isLoading && data.length === 0 ? (
- You haven't created any {name}s yet. + {/* TODO: create placeholder */}
) : (
diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index a29aafb59..795d32988 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -113,7 +113,11 @@ import { EvernoteIcon } from "../icons/Evernote"; import { FBIcon } from "../icons/FacebookMessenger"; import { GitBookIcon } from "../icons/GitBook"; import { GoogleIcon } from "../icons/Google"; -import { GradientInfinity, GradientSave } from "../icons/GradientSparkles"; +import { + GradientInfinity, + GradientSave, + GradientUngroup, +} from "../icons/GradientSparkles"; import { HuggingFaceIcon } from "../icons/HuggingFace"; import { IFixIcon } from "../icons/IFixIt"; import { MetaIcon } from "../icons/Meta"; @@ -276,6 +280,7 @@ export const nodeIconsLucide: iconsType = { WikipediaQueryRun: SvgWikipedia, WolframAlphaQueryRun: SvgWolfram, custom_components: GradientInfinity, + group_components: GradientUngroup, custom: Edit, Trash2, Boxes,