From b16f04d543a4377eaee4ea733c178c1dd14ccb63 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 14 Jun 2023 15:47:05 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20style(modals):=20add=20'ID:'=20p?= =?UTF-8?q?refix=20to=20the=20node=20id=20badge=20in=20EditNodeModal=20?= =?UTF-8?q?=F0=9F=8E=A8=20style(PageComponent):=20add=20lowercase=20type?= =?UTF-8?q?=20prefix=20to=20the=20generated=20node=20id=20The=20'ID:'=20pr?= =?UTF-8?q?efix=20was=20added=20to=20the=20node=20id=20badge=20in=20EditNo?= =?UTF-8?q?deModal=20to=20improve=20readability=20and=20semantics.=20In=20?= =?UTF-8?q?PageComponent,=20a=20lowercase=20prefix=20was=20added=20to=20th?= =?UTF-8?q?e=20generated=20node=20id=20to=20improve=20consistency=20with?= =?UTF-8?q?=20the=20naming=20conventions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/modals/EditNodeModal/index.tsx | 2 +- .../src/pages/FlowPage/components/PageComponent/index.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index 27032a613..0b0f2df5f 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -88,7 +88,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) { {data.type} - {data.id} + ID: {data.id} {EDIT_DIALOG_SUBTITLE} diff --git a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx index 1e85d2eb3..f496f6db1 100644 --- a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx @@ -215,7 +215,8 @@ export default function Page({ flow }: { flow: FlowType }) { // Generate a unique node ID let { type } = data; let newId = getNodeId(); - newId = `${type}_${newId}`; + // add lowercase to the type + newId = `${type.toLowerCase()}-${newId}`; let newNode: NodeType; if (data.type !== "groupNode") {