From 35c194e5752b007255e7225620e3dcd23cf7c0f8 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:34:58 -0300 Subject: [PATCH] fix: json dark mode colors and dict component button view (#3802) * Fix dark mode colors on jsonView * Fix dict component button view * Changed style of dict component button * Changed parameter render to remove space on the bottom of the inputs that are only handles * Fixed space below nodes --- src/frontend/src/App.css | 19 ++--------- .../components/NodeInputField/index.tsx | 32 +++++++++---------- .../components/NodeOutputfield/index.tsx | 6 ++-- .../src/components/dictComponent/index.tsx | 25 ++++++++------- .../refreshParameterComponent/index.tsx | 32 ++++++++++--------- .../src/modals/dictAreaModal/index.tsx | 7 ++-- src/frontend/src/style/classes.css | 14 ++++++-- 7 files changed, 67 insertions(+), 68 deletions(-) diff --git a/src/frontend/src/App.css b/src/frontend/src/App.css index 06eacb63b..419fdfeef 100644 --- a/src/frontend/src/App.css +++ b/src/frontend/src/App.css @@ -65,13 +65,6 @@ body { src: url("assets/text-security-disc.woff") format("woff"); } -.json-view { - height: 370px !important; - background-color: #2c2c2c !important; - border-radius: 10px !important; - padding: 10px !important; -} - .jv-indent { overflow-y: auto !important; max-height: 310px !important; @@ -130,14 +123,6 @@ body { ); /* Medium indigo color with 20% opacity */ } -.json-view-playground .json-view { - background-color: #fff !important; -} - -.json-view-flow .json-view { - background-color: #bbb !important; -} - /* This CSS is to not apply the border for the column having 'no-border' class */ .no-border.ag-cell:focus { border: none !important; @@ -165,10 +150,10 @@ body { height: 100%; } .react-flow__resize-control.handle { - width: 0.75rem!important; + width: 0.75rem !important; height: 0.75rem !important; background-color: white !important; border-color: var(--border) !important; z-index: 1000 !important; border-radius: 20% !important; -} \ No newline at end of file +} diff --git a/src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx index 8175cc62c..e44ea2147 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx @@ -94,14 +94,15 @@ export default function NodeInputField({
- <> + {displayHandle && Handle} +
{proxy ? ( {proxy.id}}> @@ -140,23 +141,20 @@ export default function NodeInputField({
- {displayHandle && Handle} {data.node?.template[name] !== undefined && ( -
- -
+ )} - +
); } diff --git a/src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx index 064803a07..96a7dabb1 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx @@ -127,7 +127,7 @@ export default function NodeOutputField({ > <>
-
+
)} -
+
-
+
- + > + + Edit Dictionary +
} diff --git a/src/frontend/src/components/parameterRenderComponent/component/refreshParameterComponent/index.tsx b/src/frontend/src/components/parameterRenderComponent/component/refreshParameterComponent/index.tsx index 796f9b768..bcb6568b0 100644 --- a/src/frontend/src/components/parameterRenderComponent/component/refreshParameterComponent/index.tsx +++ b/src/frontend/src/components/parameterRenderComponent/component/refreshParameterComponent/index.tsx @@ -29,20 +29,22 @@ export function RefreshParameterComponent({ setErrorData, ); return ( -
- {children} - {templateData.refresh_button && ( -
- -
- )} -
+ (children || templateData.refresh_button) && ( +
+ {children} + {templateData.refresh_button && ( +
+ +
+ )} +
+ ) ); } diff --git a/src/frontend/src/modals/dictAreaModal/index.tsx b/src/frontend/src/modals/dictAreaModal/index.tsx index 3fd098ba0..41a2e2a70 100644 --- a/src/frontend/src/modals/dictAreaModal/index.tsx +++ b/src/frontend/src/modals/dictAreaModal/index.tsx @@ -65,13 +65,12 @@ export default function DictAreaModal({
@@ -85,7 +84,9 @@ export default function DictAreaModal({ setOpen={setOpen} onSubmit={onChange ? handleSubmit : undefined} > - {children} + + {children} + {renderHeader()} {renderContent()} diff --git a/src/frontend/src/style/classes.css b/src/frontend/src/style/classes.css index f8c3d9d0a..e12bee424 100644 --- a/src/frontend/src/style/classes.css +++ b/src/frontend/src/style/classes.css @@ -151,8 +151,18 @@ textarea[class^="ag-"]:focus { height: fit-content !important; } -.json-view.dark { - background-color: #161c28 !important; +.json-view { + height: 370px !important; + border-radius: 10px !important; + padding: 10px !important; +} + +.json-view { + background-color: #f8fafc !important; +} + +.dark .json-view { + background-color: #141924 !important; } .react-flow__node.dragging * {