Skip to content

Commit c56a998

Browse files
nartcjaysoo
authored andcommitted
fix(graph): focus via --focus command should work (#30576)
1 parent 598262b commit c56a998

File tree

5 files changed

+219
-219
lines changed

5 files changed

+219
-219
lines changed

graph/client/src/app/feature-projects/project-list.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
EyeIcon,
66
FlagIcon,
77
MapPinIcon,
8+
ViewfinderCircleIcon,
89
} from '@heroicons/react/24/outline';
910
/* eslint-disable @nx/enforce-module-boundaries */
1011
// nx-ignore-next-line
@@ -113,7 +114,7 @@ function ProjectListItem({
113114
true
114115
)}
115116
>
116-
<DocumentMagnifyingGlassIcon className="h-5 w-5" />
117+
<ViewfinderCircleIcon className="h-5 w-5" />
117118
</Link>
118119

119120
<ExperimentalFeature>

graph/client/src/app/feature-projects/projects-sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export function ProjectsSidebar(): JSX.Element {
325325
type: 'enableCompositeGraph',
326326
context: compositeParam === 'true' ? null : compositeParam,
327327
});
328-
} else if (!searchParams.has('composite')) {
328+
} else if (!searchParams.has('composite') && compositeEnabled) {
329329
projectGraphService.send({ type: 'disableCompositeGraph' });
330330
navigate(routeConstructor('/projects', true));
331331
}

graph/client/src/app/shell.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ import { Tooltip } from '@nx/graph/legacy/tooltips';
2424

2525
import { getSystemTheme, Theme, ThemePanel } from '@nx/graph-internal/ui-theme';
2626
import classNames from 'classnames';
27-
import { useEffect, useLayoutEffect, useState } from 'react';
27+
import { useLayoutEffect, useState } from 'react';
2828
import {
2929
Outlet,
3030
useNavigate,
3131
useNavigation,
3232
useParams,
3333
useRouteLoaderData,
3434
} from 'react-router-dom';
35-
import { useSyncExternalStore } from 'use-sync-external-store/shim';
3635
import { RankdirPanel } from './feature-projects/panels/rankdir-panel';
3736
import { useCurrentPath } from './hooks/use-current-path';
3837
import { getProjectGraphService } from './machines/get-services';
@@ -50,7 +49,7 @@ export function Shell(): JSX.Element {
5049
graphService.lastPerformanceReport
5150
);
5251

53-
useEffect(() => {
52+
useLayoutEffect(() => {
5453
graphService.listen(() => {
5554
setLastPerfReport(graphService.lastPerformanceReport);
5655
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@
339339
"@markdoc/markdoc": "0.2.2",
340340
"@monaco-editor/react": "^4.4.6",
341341
"@napi-rs/canvas": "^0.1.52",
342-
"@nx/graph": "0.4.1",
342+
"@nx/graph": "0.4.2",
343343
"@react-spring/three": "^9.7.3",
344344
"@react-three/drei": "^9.108.3",
345345
"@react-three/fiber": "^8.16.8",

0 commit comments

Comments
 (0)