From 64cafb401fa203ea4def6af948d71198fac7b2cd Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 15 Dec 2021 10:59:41 -0500 Subject: [PATCH] added cleaner names + tooltip --- webapp/src/components/DAGSvgs/DAGBoard.tsx | 3 ++- webapp/src/components/DAGSvgs/DAGNode.tsx | 2 +- webapp/src/components/DAGSvgs/styles.ts | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/DAGSvgs/DAGBoard.tsx b/webapp/src/components/DAGSvgs/DAGBoard.tsx index e9ab43b..60213f5 100644 --- a/webapp/src/components/DAGSvgs/DAGBoard.tsx +++ b/webapp/src/components/DAGSvgs/DAGBoard.tsx @@ -7,6 +7,7 @@ import { DAGEdge } from "./DAGEdge"; import { AddButton } from "./AddButton"; import { IteratorWrap } from "utils/iter"; import { DAGCircle } from "./DAGCircle"; +import { getDescriptionFromAutomationNode } from "utils/formatting"; export interface DAGCircleElm { @@ -87,7 +88,7 @@ export function* mapDataToElements({ height={st.nodeHeight} width={st.nodeWidth} loc={nodeLoc} - text={elm.node?.alias ?? elm.node.$smType} + text={getDescriptionFromAutomationNode(elm.node)} color={elm.node.$smType === 'action' ? 'green' : 'blue'} onXClick={elm.onRemove} /> diff --git a/webapp/src/components/DAGSvgs/DAGNode.tsx b/webapp/src/components/DAGSvgs/DAGNode.tsx index 9cd704c..7c221ba 100644 --- a/webapp/src/components/DAGSvgs/DAGNode.tsx +++ b/webapp/src/components/DAGSvgs/DAGNode.tsx @@ -42,7 +42,7 @@ export const DAGNode = ({
- + {text}
diff --git a/webapp/src/components/DAGSvgs/styles.ts b/webapp/src/components/DAGSvgs/styles.ts index 93b9c16..6972c42 100644 --- a/webapp/src/components/DAGSvgs/styles.ts +++ b/webapp/src/components/DAGSvgs/styles.ts @@ -120,6 +120,7 @@ export const useNodeStyles = createAppUseStyles<{ textOverflow: 'ellipsis', overflow: "hidden", whiteSpace: "nowrap", + cursor: 'default', }, buttonDelete: { ...buttonStyle,