From 4595d51e62364d313b52efc63b7d59c5158949d3 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Thu, 6 Jul 2023 21:38:42 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(parameterComponent):=20set?= =?UTF-8?q?=20disabled=20prop=20to=20false=20in=20TextAreaComponent=20to?= =?UTF-8?q?=20enable=20editing=20=E2=9C=A8=20feat(GenericNode):=20import?= =?UTF-8?q?=20Zap=20icon=20from=20lucide-react=20to=20use=20in=20validatio?= =?UTF-8?q?n=20status=20tooltip=20=F0=9F=90=9B=20fix(textAreaComponent):?= =?UTF-8?q?=20import=20classNames=20from=20utils=20to=20fix=20missing=20im?= =?UTF-8?q?port=20error=20=F0=9F=90=9B=20fix(constants):=20update=20HIGHLI?= =?UTF-8?q?GH=5FCSS=20constant=20to=20add=20overflow-y-hidden=20and=20max-?= =?UTF-8?q?w-[75vw]=20classes=20=F0=9F=90=9B=20fix(ApiModal):=20add=20cond?= =?UTF-8?q?ition=20to=20check=20if=20tweak.current=20exists=20before=20cal?= =?UTF-8?q?ling=20startTweaks()=20=E2=9C=A8=20feat(ApiModal):=20import=20V?= =?UTF-8?q?ariable=20icon=20from=20lucide-react=20to=20use=20in=20input=20?= =?UTF-8?q?variables=20section=20=F0=9F=90=9B=20fix(genericModal):=20impor?= =?UTF-8?q?t=20Variable=20icon=20from=20lucide-react=20to=20use=20in=20inp?= =?UTF-8?q?ut=20variables=20section=20=F0=9F=90=9B=20fix(utils):=20add=20n?= =?UTF-8?q?ewline=20character=20to=20INVALID=5FCHARACTERS=20array=20?= =?UTF-8?q?=F0=9F=90=9B=20fix(tailwind.config.js):=20set=20height=20proper?= =?UTF-8?q?ty=20to=20"8px"=20for=20scrollbar=20in=20custom-scroll=20class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/parameterComponent/index.tsx | 2 +- .../src/CustomNodes/GenericNode/index.tsx | 4 +- .../components/textAreaComponent/index.tsx | 42 ++++------- src/frontend/src/constants.tsx | 2 +- src/frontend/src/modals/ApiModal/index.tsx | 6 +- .../src/modals/genericModal/index.tsx | 75 ++++++++++--------- src/frontend/src/utils.ts | 1 + src/frontend/tailwind.config.js | 1 + 8 files changed, 68 insertions(+), 65 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index 56c65354d..8e22eafac 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -222,7 +222,7 @@ export default function ParameterComponent({ /> ) : data.node.template[name].multiline ? ( diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index c2226a126..56d574920 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -16,6 +16,7 @@ import { NodeToolbar } from "reactflow"; import NodeToolbarComponent from "../../pages/FlowPage/components/nodeToolbarComponent"; import ShadTooltip from "../../components/ShadTooltipComponent"; import { useSSE } from "../../contexts/SSEContext"; +import { Zap } from "lucide-react"; export default function GenericNode({ data, @@ -117,7 +118,8 @@ export default function GenericNode({ Build flow to validate status. + ) : (
{validationStatus.params diff --git a/src/frontend/src/components/textAreaComponent/index.tsx b/src/frontend/src/components/textAreaComponent/index.tsx index c62af4b30..dc6f92cd2 100644 --- a/src/frontend/src/components/textAreaComponent/index.tsx +++ b/src/frontend/src/components/textAreaComponent/index.tsx @@ -2,7 +2,7 @@ import { useContext, useEffect, useState } from "react"; import { PopUpContext } from "../../contexts/popUpContext"; import { TextAreaComponentType } from "../../types/components"; import GenericModal from "../../modals/genericModal"; -import { TypeModal } from "../../utils"; +import { TypeModal, classNames } from "../../utils"; import { ExternalLink } from "lucide-react"; @@ -30,34 +30,24 @@ export default function TextAreaComponent({
- { - openPopUp( - { - setMyValue(t); - onChange(t); - }} - /> - ); - }} - className={ - editNode - ? "input-edit-node input-dialog " - : "input-dialog input-primary " + - (disabled ? "input-disable" : "") - } - > - {myValue !== "" ? myValue : "Type something..."} - + + { + setMyValue(e.target.value); + onChange(e.target.value); + }} + />