From b2d256048058446511ca97f891f3d16f34d98174 Mon Sep 17 00:00:00 2001 From: nartc Date: Tue, 24 Sep 2024 15:41:17 -0500 Subject: [PATCH] feat(graph): update graph package; use node.parent as label --- .../client/src/app/feature-projects/project-list.tsx | 11 +++-------- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/graph/client/src/app/feature-projects/project-list.tsx b/graph/client/src/app/feature-projects/project-list.tsx index 4e825b6d0f9de..2ba6ef72d832f 100644 --- a/graph/client/src/app/feature-projects/project-list.tsx +++ b/graph/client/src/app/feature-projects/project-list.tsx @@ -250,14 +250,9 @@ function CompositeNodeListItem({ const routeConstructor = useRouteConstructor(); const navigate = useNavigate(); - const label = useMemo(() => { - if (compositeNode.parent) { - return `${compositeNode.parent.replace('composite-', '')}/${ - compositeNode.label - }`; - } - return compositeNode.label; - }, [compositeNode]); + const label = compositeNode.parent + ? `${compositeNode.parent}/${compositeNode.label}` + : compositeNode.label; function toggleProject() { if (compositeNode.state !== 'hidden') { diff --git a/package.json b/package.json index d0a8fe3505510..226ed0ada58a0 100644 --- a/package.json +++ b/package.json @@ -325,7 +325,7 @@ "@markdoc/markdoc": "0.2.2", "@monaco-editor/react": "^4.4.6", "@napi-rs/canvas": "^0.1.52", - "@nx/graph": "0.0.1-alpha.22", + "@nx/graph": "0.0.1-alpha.23", "@react-spring/three": "^9.7.3", "@react-three/drei": "^9.108.3", "@react-three/fiber": "^8.16.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8bc7944f9ca0c..19c1d83796a39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,8 +31,8 @@ importers: specifier: ^0.1.52 version: 0.1.55 '@nx/graph': - specifier: 0.0.1-alpha.22 - version: 0.0.1-alpha.22(@nx/devkit@19.8.0-beta.2(nx@19.8.0-beta.2(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.12)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))))(nx@19.8.0-beta.2(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.12)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.26.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + specifier: 0.0.1-alpha.23 + version: 0.0.1-alpha.23(@nx/devkit@19.8.0-beta.2(nx@19.8.0-beta.2(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.12)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))))(nx@19.8.0-beta.2(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.12)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.26.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) '@react-spring/three': specifier: ^9.7.3 version: 9.7.4(@react-three/fiber@8.17.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.166.1))(react@18.3.1)(three@0.166.1) @@ -4388,8 +4388,8 @@ packages: '@zkochan/js-yaml': optional: true - '@nx/graph@0.0.1-alpha.22': - resolution: {integrity: sha512-ZrdimwhjNocSqLdF4tfIWc4b1XR6JhSQwpsOZsc7sDcIyEG1ueQX+YcIYgJNOiV/EVVZdLA6VaMGwK48ip4gLA==} + '@nx/graph@0.0.1-alpha.23': + resolution: {integrity: sha512-vgP9CxcCLa551AWZkwfN6qkwLGdZazU+GL7KZusIH8L3enRo2GHqyPQaF93fnTenokYM0SphR85/X4QibF3mlA==} peerDependencies: '@nx/devkit': '>= 19 < 20' nx: '>= 19 < 20' @@ -20582,7 +20582,7 @@ snapshots: - supports-color - verdaccio - '@nx/graph@0.0.1-alpha.22(@nx/devkit@19.8.0-beta.2(nx@19.8.0-beta.2(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.12)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))))(nx@19.8.0-beta.2(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.12)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.26.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': + '@nx/graph@0.0.1-alpha.23(@nx/devkit@19.8.0-beta.2(nx@19.8.0-beta.2(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.12)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))))(nx@19.8.0-beta.2(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.12)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.26.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': dependencies: '@floating-ui/react': 0.26.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@headlessui/react': 1.7.19(react-dom@18.3.1(react@18.3.1))(react@18.3.1)