diff --git a/.gitignore b/.gitignore
index 4c15a2a836..7772e9a465 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,7 +15,8 @@ jest.debug.config.js
/.verdaccio/build/local-registry
/graph/client/src/assets/environment.js
/graph/client/src/assets/dev/environment.js
-/graph/client/src/assets/generated-graphs
+/graph/client/src/assets/generated-project-graphs
+/graph/client/src/assets/generated-task-graphs
/nx-dev/nx-dev/public/documentation
/nx-dev/nx-dev/public/images/open-graph
# Lerna creates this
diff --git a/graph/client-e2e/src/e2e/app.cy.ts b/graph/client-e2e/src/e2e/app.cy.ts
index f36588ccf6..6032d538f5 100644
--- a/graph/client-e2e/src/e2e/app.cy.ts
+++ b/graph/client-e2e/src/e2e/app.cy.ts
@@ -23,9 +23,9 @@ import * as nxExamplesJson from '../fixtures/nx-examples.json';
describe('graph-client', () => {
before(() => {
- cy.intercept('/assets/graphs/e2e.json', { fixture: 'nx-examples.json' }).as(
- 'getGraph'
- );
+ cy.intercept('/assets/project-graphs/e2e.json', {
+ fixture: 'nx-examples.json',
+ }).as('getGraph');
cy.visit('/');
// wait for initial graph to finish loading
@@ -140,7 +140,7 @@ describe('graph-client', () => {
});
it('should check all affected project items', () => {
- cy.intercept('/assets/graphs/affected.json', {
+ cy.intercept('/assets/project-graphs/affected.json', {
fixture: 'affected.json',
}).as('getAffectedGraph');
@@ -155,7 +155,7 @@ describe('graph-client', () => {
);
// switch back to Nx Examples graph before proceeding
- cy.intercept('/assets/graphs/e2e.json', {
+ cy.intercept('/assets/project-graphs/e2e.json', {
fixture: 'nx-examples.json',
}).as('getGraph');
cy.get('[data-cy=project-select]').select('e2e', { force: true });
@@ -308,9 +308,9 @@ describe('graph-client', () => {
describe('loading graph client with url params', () => {
beforeEach(() => {
- cy.intercept('/assets/graphs/*', { fixture: 'nx-examples.json' }).as(
- 'getGraph'
- );
+ cy.intercept('/assets/project-graphs/*', {
+ fixture: 'nx-examples.json',
+ }).as('getGraph');
});
// check that params work from old base url of /
diff --git a/graph/client-e2e/src/release-integration/release.cy.ts b/graph/client-e2e/src/release-integration/release.cy.ts
index ce16ef8d6e..db19b3b16a 100644
--- a/graph/client-e2e/src/release-integration/release.cy.ts
+++ b/graph/client-e2e/src/release-integration/release.cy.ts
@@ -1,6 +1,6 @@
describe('graph-client release', () => {
beforeEach(() => {
- cy.intercept('/assets/graphs/*').as('getGraph');
+ cy.intercept('/assets/project-graphs/*').as('getGraph');
cy.visit('/');
diff --git a/graph/client/project.json b/graph/client/project.json
index dfb366a256..f55afbe9cd 100644
--- a/graph/client/project.json
+++ b/graph/client/project.json
@@ -62,8 +62,9 @@
"dev": {
"assets": [
"graph/client/src/favicon.ico",
- "graph/client/src/assets/graphs/",
- "graph/client/src/assets/generated-graphs/",
+ "graph/client/src/assets/project-graphs/",
+ "graph/client/src/assets/generated-project-graphs/",
+ "graph/client/src/assets/generated-task-graphs/",
{
"input": "graph/client/src/assets/dev",
"output": "/",
@@ -74,7 +75,7 @@
"dev-e2e": {
"assets": [
"graph/client/src/favicon.ico",
- "graph/client/src/assets/graphs/",
+ "graph/client/src/assets/project-graphs/",
{
"input": "graph/client/src/assets/dev-e2e",
"output": "/",
@@ -86,8 +87,8 @@
"assets": [
"graph/client/src/favicon.ico",
{
- "input": "graph/client/src/assets/graphs",
- "output": "/assets/graphs",
+ "input": "graph/client/src/assets/project-graphs",
+ "output": "/assets/project-graphs",
"glob": "e2e.json"
},
{
@@ -101,8 +102,8 @@
"assets": [
"graph/client/src/favicon.ico",
{
- "input": "graph/client/src/assets/graphs",
- "output": "/assets/graphs",
+ "input": "graph/client/src/assets/project-graphs",
+ "output": "/assets/project-graphs",
"glob": "e2e.json"
},
{
@@ -129,7 +130,7 @@
"assets": [
"graph/client/src/favicon.ico",
{
- "input": "graph/client/src/assets/graphs",
+ "input": "graph/client/src/assets/project-graphs",
"output": "/assets/graphs",
"glob": "e2e.json"
},
diff --git a/graph/client/src/app/sidebar/collapse-edges-panel.stories.tsx b/graph/client/src/app/feature-projects/panels/collapse-edges-panel.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/collapse-edges-panel.stories.tsx
rename to graph/client/src/app/feature-projects/panels/collapse-edges-panel.stories.tsx
diff --git a/graph/client/src/app/sidebar/collapse-edges-panel.tsx b/graph/client/src/app/feature-projects/panels/collapse-edges-panel.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/collapse-edges-panel.tsx
rename to graph/client/src/app/feature-projects/panels/collapse-edges-panel.tsx
diff --git a/graph/client/src/app/sidebar/focused-project-panel.stories.tsx b/graph/client/src/app/feature-projects/panels/focused-project-panel.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/focused-project-panel.stories.tsx
rename to graph/client/src/app/feature-projects/panels/focused-project-panel.stories.tsx
diff --git a/graph/client/src/app/sidebar/focused-project-panel.tsx b/graph/client/src/app/feature-projects/panels/focused-project-panel.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/focused-project-panel.tsx
rename to graph/client/src/app/feature-projects/panels/focused-project-panel.tsx
diff --git a/graph/client/src/app/sidebar/group-by-folder-panel.stories.tsx b/graph/client/src/app/feature-projects/panels/group-by-folder-panel.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/group-by-folder-panel.stories.tsx
rename to graph/client/src/app/feature-projects/panels/group-by-folder-panel.stories.tsx
diff --git a/graph/client/src/app/sidebar/group-by-folder-panel.tsx b/graph/client/src/app/feature-projects/panels/group-by-folder-panel.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/group-by-folder-panel.tsx
rename to graph/client/src/app/feature-projects/panels/group-by-folder-panel.tsx
diff --git a/graph/client/src/app/sidebar/rankdir-panel.stories.tsx b/graph/client/src/app/feature-projects/panels/rankdir-panel.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/rankdir-panel.stories.tsx
rename to graph/client/src/app/feature-projects/panels/rankdir-panel.stories.tsx
diff --git a/graph/client/src/app/sidebar/rankdir-panel.tsx b/graph/client/src/app/feature-projects/panels/rankdir-panel.tsx
similarity index 97%
rename from graph/client/src/app/sidebar/rankdir-panel.tsx
rename to graph/client/src/app/feature-projects/panels/rankdir-panel.tsx
index 5fe0873f77..00c266db43 100644
--- a/graph/client/src/app/sidebar/rankdir-panel.tsx
+++ b/graph/client/src/app/feature-projects/panels/rankdir-panel.tsx
@@ -8,7 +8,7 @@ import {
localStorageRankDirKey,
RankDir,
rankDirResolver,
-} from '../rankdir-resolver';
+} from '../../rankdir-resolver';
export default function RankdirPanel(): JSX.Element {
const [rankDir, setRankDir] = useState(
diff --git a/graph/client/src/app/sidebar/search-depth.stories.tsx b/graph/client/src/app/feature-projects/panels/search-depth.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/search-depth.stories.tsx
rename to graph/client/src/app/feature-projects/panels/search-depth.stories.tsx
diff --git a/graph/client/src/app/sidebar/search-depth.tsx b/graph/client/src/app/feature-projects/panels/search-depth.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/search-depth.tsx
rename to graph/client/src/app/feature-projects/panels/search-depth.tsx
diff --git a/graph/client/src/app/sidebar/show-hide-projects.stories.tsx b/graph/client/src/app/feature-projects/panels/show-hide-projects.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/show-hide-projects.stories.tsx
rename to graph/client/src/app/feature-projects/panels/show-hide-projects.stories.tsx
diff --git a/graph/client/src/app/sidebar/show-hide-projects.tsx b/graph/client/src/app/feature-projects/panels/show-hide-projects.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/show-hide-projects.tsx
rename to graph/client/src/app/feature-projects/panels/show-hide-projects.tsx
diff --git a/graph/client/src/app/sidebar/text-filter-panel.stories.tsx b/graph/client/src/app/feature-projects/panels/text-filter-panel.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/text-filter-panel.stories.tsx
rename to graph/client/src/app/feature-projects/panels/text-filter-panel.stories.tsx
diff --git a/graph/client/src/app/sidebar/text-filter-panel.tsx b/graph/client/src/app/feature-projects/panels/text-filter-panel.tsx
similarity index 93%
rename from graph/client/src/app/sidebar/text-filter-panel.tsx
rename to graph/client/src/app/feature-projects/panels/text-filter-panel.tsx
index 9fae0c6312..d6e58dd4c0 100644
--- a/graph/client/src/app/sidebar/text-filter-panel.tsx
+++ b/graph/client/src/app/feature-projects/panels/text-filter-panel.tsx
@@ -1,8 +1,8 @@
import { useEffect, useState } from 'react';
import type { KeyboardEvent } from 'react';
-import { useDebounce } from '../hooks/use-debounce';
+import { useDebounce } from '../../hooks/use-debounce';
import { BackspaceIcon, FunnelIcon } from '@heroicons/react/24/outline';
-import DebouncedTextInput from '../ui-components/debounced-text-input';
+import DebouncedTextInput from '../../ui-components/debounced-text-input';
export interface TextFilterPanelProps {
textFilter: string;
diff --git a/graph/client/src/app/sidebar/theme-panel.stories.tsx b/graph/client/src/app/feature-projects/panels/theme-panel.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/theme-panel.stories.tsx
rename to graph/client/src/app/feature-projects/panels/theme-panel.stories.tsx
diff --git a/graph/client/src/app/sidebar/theme-panel.tsx b/graph/client/src/app/feature-projects/panels/theme-panel.tsx
similarity index 97%
rename from graph/client/src/app/sidebar/theme-panel.tsx
rename to graph/client/src/app/feature-projects/panels/theme-panel.tsx
index 461feb1a9c..4500d19d0a 100644
--- a/graph/client/src/app/sidebar/theme-panel.tsx
+++ b/graph/client/src/app/feature-projects/panels/theme-panel.tsx
@@ -6,7 +6,11 @@ import {
} from '@heroicons/react/24/outline';
import classNames from 'classnames';
import { Fragment, useEffect, useState } from 'react';
-import { localStorageThemeKey, Theme, themeResolver } from '../theme-resolver';
+import {
+ localStorageThemeKey,
+ Theme,
+ themeResolver,
+} from '../../theme-resolver';
export default function ThemePanel(): JSX.Element {
const [theme, setTheme] = useState(
diff --git a/graph/client/src/app/sidebar/tracing-panel.stories.tsx b/graph/client/src/app/feature-projects/panels/tracing-panel.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/tracing-panel.stories.tsx
rename to graph/client/src/app/feature-projects/panels/tracing-panel.stories.tsx
diff --git a/graph/client/src/app/sidebar/tracing-panel.tsx b/graph/client/src/app/feature-projects/panels/tracing-panel.tsx
similarity index 98%
rename from graph/client/src/app/sidebar/tracing-panel.tsx
rename to graph/client/src/app/feature-projects/panels/tracing-panel.tsx
index 88a13833dc..0610b973f8 100644
--- a/graph/client/src/app/sidebar/tracing-panel.tsx
+++ b/graph/client/src/app/feature-projects/panels/tracing-panel.tsx
@@ -5,7 +5,7 @@ import {
XCircleIcon,
} from '@heroicons/react/24/outline';
import { memo } from 'react';
-import { TracingAlgorithmType } from '../machines/interfaces';
+import { TracingAlgorithmType } from '../../machines/interfaces';
export interface TracingPanelProps {
start: string;
diff --git a/graph/client/src/app/sidebar/project-list.tsx b/graph/client/src/app/feature-projects/project-list.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/project-list.tsx
rename to graph/client/src/app/feature-projects/project-list.tsx
diff --git a/graph/client/src/app/feature-projects/projects-sidebar.tsx b/graph/client/src/app/feature-projects/projects-sidebar.tsx
index d91ce061b1..4b6fafbf11 100644
--- a/graph/client/src/app/feature-projects/projects-sidebar.tsx
+++ b/graph/client/src/app/feature-projects/projects-sidebar.tsx
@@ -13,14 +13,14 @@ import {
searchDepthSelector,
textFilterSelector,
} from '../machines/selectors';
-import CollapseEdgesPanel from '../sidebar/collapse-edges-panel';
-import FocusedProjectPanel from '../sidebar/focused-project-panel';
-import GroupByFolderPanel from '../sidebar/group-by-folder-panel';
-import ProjectList from '../sidebar/project-list';
-import SearchDepth from '../sidebar/search-depth';
-import ShowHideProjects from '../sidebar/show-hide-projects';
-import TextFilterPanel from '../sidebar/text-filter-panel';
-import TracingPanel from '../sidebar/tracing-panel';
+import CollapseEdgesPanel from './panels/collapse-edges-panel';
+import FocusedProjectPanel from './panels/focused-project-panel';
+import GroupByFolderPanel from './panels/group-by-folder-panel';
+import ProjectList from './project-list';
+import SearchDepth from './panels/search-depth';
+import ShowHideProjects from './panels/show-hide-projects';
+import TextFilterPanel from './panels/text-filter-panel';
+import TracingPanel from './panels/tracing-panel';
import { TracingAlgorithmType } from '../machines/interfaces';
import { useEnvironmentConfig } from '../hooks/use-environment-config';
diff --git a/graph/client/src/app/sidebar/task-list.stories.tsx b/graph/client/src/app/feature-tasks/task-list.stories.tsx
similarity index 100%
rename from graph/client/src/app/sidebar/task-list.stories.tsx
rename to graph/client/src/app/feature-tasks/task-list.stories.tsx
diff --git a/graph/client/src/app/sidebar/task-list.tsx b/graph/client/src/app/feature-tasks/task-list.tsx
similarity index 93%
rename from graph/client/src/app/sidebar/task-list.tsx
rename to graph/client/src/app/feature-tasks/task-list.tsx
index db2f02aaba..0bef024d8e 100644
--- a/graph/client/src/app/sidebar/task-list.tsx
+++ b/graph/client/src/app/feature-tasks/task-list.tsx
@@ -1,6 +1,6 @@
import { DocumentMagnifyingGlassIcon } from '@heroicons/react/24/solid';
// nx-ignore-next-line
-import type { ProjectGraphNode, Task } from '@nrwl/devkit';
+import type { ProjectGraphNode } from '@nrwl/devkit';
import { parseParentDirectoriesFromFilePath } from '../util';
import { WorkspaceLayout } from '../interfaces';
import Tag from '../ui-components/tag';
@@ -55,6 +55,7 @@ function groupProjectsByDirectory(
function ProjectListItem({
project,
selectTask,
+ selectedTaskId,
}: {
project: SidebarProjectWithTargets;
selectTask: (
@@ -62,6 +63,7 @@ function ProjectListItem({
targetName: string,
configurationName: string
) => void;
+ selectedTaskId: string;
}) {
return (
@@ -73,6 +75,10 @@ function ProjectListItem({
{target.configurations.map((configuration) => (
+ {selectedTaskId ===
+ `${project.projectGraphNode.name}:${target.targetName}:${configuration.name}` ? (
+
selected
+ ) : null}