From eb76a5126608ec6789a20bcd0839cf0e72fe7cfc Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Mon, 17 Jul 2023 19:32:37 -0300 Subject: [PATCH 1/3] formatting --- src/frontend/src/components/ui/accordion.tsx | 2 +- .../modals/formModal/chatMessage/index.tsx | 2 +- .../src/modals/genericModal/index.tsx | 22 +++++++++++++------ src/frontend/tailwind.config.js | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/frontend/src/components/ui/accordion.tsx b/src/frontend/src/components/ui/accordion.tsx index 4b5a12384..4ee52db10 100644 --- a/src/frontend/src/components/ui/accordion.tsx +++ b/src/frontend/src/components/ui/accordion.tsx @@ -46,7 +46,7 @@ const AccordionContent = React.forwardRef< { - sumOfCaracteres = sumOfCaracteres + element.replace(/[{}]/g, "").length + wordsHighlight.forEach((element) => { + sumOfCaracteres = sumOfCaracteres + element.replace(/[{}]/g, "").length; }); - return sumOfCaracteres > MAX_WORDS_HIGHLIGHT ? "code-highlight" : "code-nohighlight" + return sumOfCaracteres > MAX_WORDS_HIGHLIGHT + ? "code-highlight" + : "code-nohighlight"; } - function validatePrompt(closeModal: boolean) { postValidatePrompt(field_name, inputValue, nodeClass) .then((apiReturn) => { @@ -234,7 +239,10 @@ export default function GenericModal({
{type === TypeModal.PROMPT && (
-
+
diff --git a/src/frontend/tailwind.config.js b/src/frontend/tailwind.config.js index b1ac8f14d..bc80dac5b 100644 --- a/src/frontend/tailwind.config.js +++ b/src/frontend/tailwind.config.js @@ -114,7 +114,7 @@ module.exports = { }, fontFamily: { sans: ["var(--font-sans)", ...fontFamily.sans], - } + }, }, }, From f9fdc6786c93ddfeaa96fbd69fcf63535e21d334 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Mon, 17 Jul 2023 19:40:23 -0300 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B=20fix(AccordionComponent/index?= =?UTF-8?q?.tsx):=20remove=20border=20from=20AccordionItem=20to=20improve?= =?UTF-8?q?=20visual=20consistency=20=E2=9C=A8=20feat(AccordionComponent/i?= =?UTF-8?q?ndex.tsx):=20add=20className=20"AccordionContent"=20to=20Accord?= =?UTF-8?q?ionContent=20component=20for=20styling=20purposes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/components/AccordionComponent/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/AccordionComponent/index.tsx b/src/frontend/src/components/AccordionComponent/index.tsx index 68f31aed6..83d423db5 100644 --- a/src/frontend/src/components/AccordionComponent/index.tsx +++ b/src/frontend/src/components/AccordionComponent/index.tsx @@ -34,7 +34,7 @@ export default function AccordionComponent({ return ( <> - + { handleClick(); @@ -43,7 +43,7 @@ export default function AccordionComponent({ > {trigger} - {children} + {children} From 662d4e81aedfc5cd9919eb2985dbfe47135699af Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Mon, 17 Jul 2023 19:41:04 -0300 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=94=A7=20chore(AccordionComponent):?= =?UTF-8?q?=20reformat=20code=20to=20improve=20readability=20and=20maintai?= =?UTF-8?q?n=20consistent=20code=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/components/AccordionComponent/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/components/AccordionComponent/index.tsx b/src/frontend/src/components/AccordionComponent/index.tsx index 83d423db5..39943a93c 100644 --- a/src/frontend/src/components/AccordionComponent/index.tsx +++ b/src/frontend/src/components/AccordionComponent/index.tsx @@ -43,7 +43,9 @@ export default function AccordionComponent({ > {trigger} - {children} + + {children} +