fix(graph): focus via --focus command should work (#30576)

This commit is contained in:
Chau Tran 2025-04-02 04:13:29 -05:00 committed by GitHub
parent b3c6d2d417
commit 68c9653f25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 219 additions and 219 deletions

View File

@ -5,6 +5,7 @@ import {
EyeIcon,
FlagIcon,
MapPinIcon,
ViewfinderCircleIcon,
} from '@heroicons/react/24/outline';
/* eslint-disable @nx/enforce-module-boundaries */
// nx-ignore-next-line
@ -113,7 +114,7 @@ function ProjectListItem({
true
)}
>
<DocumentMagnifyingGlassIcon className="h-5 w-5" />
<ViewfinderCircleIcon className="h-5 w-5" />
</Link>
<ExperimentalFeature>

View File

@ -325,7 +325,7 @@ export function ProjectsSidebar(): JSX.Element {
type: 'enableCompositeGraph',
context: compositeParam === 'true' ? null : compositeParam,
});
} else if (!searchParams.has('composite')) {
} else if (!searchParams.has('composite') && compositeEnabled) {
projectGraphService.send({ type: 'disableCompositeGraph' });
navigate(routeConstructor('/projects', true));
}

View File

@ -24,7 +24,7 @@ import { Tooltip } from '@nx/graph/legacy/tooltips';
import { getSystemTheme, Theme, ThemePanel } from '@nx/graph-internal/ui-theme';
import classNames from 'classnames';
import { useEffect, useLayoutEffect, useState } from 'react';
import { useLayoutEffect, useState } from 'react';
import {
Outlet,
useNavigate,
@ -32,7 +32,6 @@ import {
useParams,
useRouteLoaderData,
} from 'react-router-dom';
import { useSyncExternalStore } from 'use-sync-external-store/shim';
import { RankdirPanel } from './feature-projects/panels/rankdir-panel';
import { useCurrentPath } from './hooks/use-current-path';
import { getProjectGraphService } from './machines/get-services';
@ -50,7 +49,7 @@ export function Shell(): JSX.Element {
graphService.lastPerformanceReport
);
useEffect(() => {
useLayoutEffect(() => {
graphService.listen(() => {
setLastPerfReport(graphService.lastPerformanceReport);
});

View File

@ -339,7 +339,7 @@
"@markdoc/markdoc": "0.2.2",
"@monaco-editor/react": "^4.4.6",
"@napi-rs/canvas": "^0.1.52",
"@nx/graph": "0.4.1",
"@nx/graph": "0.4.2",
"@react-spring/three": "^9.7.3",
"@react-three/drei": "^9.108.3",
"@react-three/fiber": "^8.16.8",

426
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff