diff --git a/.github/workflows/cypress_e2e.yml b/.github/workflows/cypress_e2e.yml
index 8b810459e0..2f0bce171a 100644
--- a/.github/workflows/cypress_e2e.yml
+++ b/.github/workflows/cypress_e2e.yml
@@ -1,9 +1,6 @@
name: Cypress E2E Tests
on:
- pull_request:
- paths-ignore:
- - "**.md"
push:
branches:
- "main"
diff --git a/.github/workflows/frontend_checks.yml b/.github/workflows/frontend_checks.yml
index 9b55bf3eae..bb12881bda 100644
--- a/.github/workflows/frontend_checks.yml
+++ b/.github/workflows/frontend_checks.yml
@@ -93,32 +93,3 @@ jobs:
with:
name: cypress-videos-${{ matrix.clients }}
path: /home/runner/work/fides/fides/clients/${{ matrix.clients }}/cypress/videos/*.mp4
-
- Clients-Cypress-Component:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [20.x]
- clients:
- - "admin-ui"
- defaults:
- run:
- working-directory: clients
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v4
- with:
- node-version: ${{ matrix.node-version }}
-
- - name: Install dependencies
- run: npm install
-
- - name: Cypress Component Tests (${{ matrix.clients }})
- uses: cypress-io/github-action@v6
- with:
- working-directory: clients/${{ matrix.clients }}
- install: false
- component: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b13055a662..5fd5d1cdea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,7 +19,11 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
- https://github.com/ethyca/fides/labels/high-risk: to indicate that a change is a "high-risk" change that could potentially lead to unanticipated regressions or degradations
- https://github.com/ethyca/fides/labels/db-migration: to indicate that a given change includes a DB migration
-## [Unreleased](https://github.com/ethyca/fides/compare/2.54.0...main)
+## [Unreleased](https://github.com/ethyca/fides/compare/2.55.0...main)
+
+
+
+## [2.55.0](https://github.com/ethyca/fides/compare/2.54.0...2.55.0)
### Added
- Added editing support for categories of consent on discovered assets [#5739](https://github.com/ethyca/fides/pull/5739)
@@ -27,6 +31,7 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
- Added detail trays to items in data catalog view [#5729](https://github.com/ethyca/fides/pull/5729)
- Support rendering and saving consent from custom notices in TCF Overlay [#5742](https://github.com/ethyca/fides/pull/5742)
- Added worker stats endpoint to monitor worker status and task queue length [#5725](https://github.com/ethyca/fides/pull/5725)
+- New "Headless" experience type to support custom UI implementations [#5751](https://github.com/ethyca/fides/pull/5751)
### Changed
- Added frequency field to DataHubSchema integration config [#5716](https://github.com/ethyca/fides/pull/5716)
@@ -41,7 +46,9 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
- Fixed Bigquery flakey tests. [#5713](https://github.com/ethyca/fides/pull/5713)
- Fixed breadcrumb navigation issues in data catalog view [#5717](https://github.com/ethyca/fides/pull/5717)
- Fixed `window.Fides.experience` of FidesJS to be a merged version of the minimal and full experience. [#5726](https://github.com/ethyca/fides/pull/5726)
-- Fixed vendor count template string on FidesJS embedded layer 2 descriptions (#5736)[https://github.com/ethyca/fides/pull/5736]
+- Fixed vendor count template string on FidesJS embedded layer 2 descriptions [#5736](https://github.com/ethyca/fides/pull/5736)
+- Allowing a list with a single dataset in the YAML dataset editor [#5750](https://github.com/ethyca/fides/pull/5750)
+- Fixed edge case translation string issue on FidesJS embedded layer 2 (#5749)[https://github.com/ethyca/fides/pull/5749]
## [2.54.0](https://github.com/ethyca/fides/compare/2.53.0...2.54.0)
diff --git a/clients/admin-ui/cypress/components/MainSideNav.cy.tsx b/clients/admin-ui/cypress/components/MainSideNav.cy.tsx
deleted file mode 100644
index b351f5c995..0000000000
--- a/clients/admin-ui/cypress/components/MainSideNav.cy.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import * as React from "react";
-
-import { UnconnectedMainSideNav } from "~/features/common/nav/v2/MainSideNav";
-import {
- configureNavGroups,
- findActiveNav,
- NavConfigGroup,
-} from "~/features/common/nav/v2/nav-config";
-
-const ACTIVE_BACKGROUND_COLOR = "rgb(206, 202, 194)";
-const INACTIVE_BACKGROUND_COLOR = "rgba(0, 0, 0, 0)";
-
-const selectLinkColor = (title: string) =>
- cy.contains("a", title).should("have.css", "background-color");
-
-const verifyActiveState = ({
- active,
- inactive,
-}: {
- active: string[];
- inactive: string[];
-}) => {
- active.forEach((title) => {
- selectLinkColor(title).should("eql", ACTIVE_BACKGROUND_COLOR);
- });
- inactive.forEach((title) => {
- selectLinkColor(title).should("eql", INACTIVE_BACKGROUND_COLOR);
- });
-};
-
-describe("UnconnectedMainSideNav", () => {
- it("renders children nav links", () => {
- const config: NavConfigGroup[] = [
- {
- title: "Consent",
- routes: [
- {
- title: "Privacy notices",
- path: "/consent/privacy-notices",
- scopes: [],
- },
- {
- title: "Privacy experiences",
- path: "/consent/privacy-experiences",
- scopes: [],
- },
- ],
- },
- {
- title: "Settings",
- routes: [
- {
- title: "Users",
- path: "/users",
- scopes: [],
- },
- ],
- },
- ];
- const navGroups = configureNavGroups({
- config,
- userScopes: [],
- });
- const path = "/consent/privacy-notices";
- const activeNav = findActiveNav({ navGroups, path });
-
- // First check if the active path is /consent/privacy-notices
- cy.mount();
-
- // Renders groups as buttons (for accordion)
- cy.contains("nav button", "Consent");
-
- // Renders links as links
- cy.contains("nav a", "Privacy notices");
- cy.contains("nav a", "Privacy experiences");
- cy.contains("nav a", "Users");
-
- verifyActiveState({
- active: ["Privacy notices"],
- inactive: ["Privacy experiences", "Users"],
- });
- });
-});
diff --git a/clients/admin-ui/cypress/e2e/action-center.cy.ts b/clients/admin-ui/cypress/e2e/action-center.cy.ts
index de92a17f34..f9d02785bd 100644
--- a/clients/admin-ui/cypress/e2e/action-center.cy.ts
+++ b/clients/admin-ui/cypress/e2e/action-center.cy.ts
@@ -9,7 +9,7 @@ import {
import {
ACTION_CENTER_ROUTE,
INTEGRATION_MANAGEMENT_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
describe("Action center", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/auth.cy.ts b/clients/admin-ui/cypress/e2e/auth.cy.ts
index a444798b2c..2038f97b94 100644
--- a/clients/admin-ui/cypress/e2e/auth.cy.ts
+++ b/clients/admin-ui/cypress/e2e/auth.cy.ts
@@ -1,6 +1,6 @@
import { stubOpenIdProviders, stubUserManagement } from "cypress/support/stubs";
-import { SYSTEM_ROUTE } from "~/features/common/nav/v2/routes";
+import { SYSTEM_ROUTE } from "~/features/common/nav/routes";
describe("User Authentication", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/config-wizard-plus.cy.ts b/clients/admin-ui/cypress/e2e/config-wizard-plus.cy.ts
index c58f18aa9a..8152ac79fc 100644
--- a/clients/admin-ui/cypress/e2e/config-wizard-plus.cy.ts
+++ b/clients/admin-ui/cypress/e2e/config-wizard-plus.cy.ts
@@ -1,6 +1,6 @@
import { stubPlus } from "cypress/support/stubs";
-import { ADD_SYSTEMS_ROUTE } from "~/features/common/nav/v2/routes";
+import { ADD_SYSTEMS_ROUTE } from "~/features/common/nav/routes";
import { ClusterHealth } from "~/types/api";
/**
diff --git a/clients/admin-ui/cypress/e2e/config-wizard.cy.ts b/clients/admin-ui/cypress/e2e/config-wizard.cy.ts
index 430aace75a..0e1653406d 100644
--- a/clients/admin-ui/cypress/e2e/config-wizard.cy.ts
+++ b/clients/admin-ui/cypress/e2e/config-wizard.cy.ts
@@ -1,6 +1,6 @@
import { stubSystemCrud, stubTaxonomyEntities } from "cypress/support/stubs";
-import { ADD_SYSTEMS_ROUTE } from "~/features/common/nav/v2/routes";
+import { ADD_SYSTEMS_ROUTE } from "~/features/common/nav/routes";
describe("Config Wizard", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/consent-configuration.cy.ts b/clients/admin-ui/cypress/e2e/consent-configuration.cy.ts
index ae3f9d72fa..07d3821da0 100644
--- a/clients/admin-ui/cypress/e2e/consent-configuration.cy.ts
+++ b/clients/admin-ui/cypress/e2e/consent-configuration.cy.ts
@@ -9,7 +9,7 @@ import {
import {
ADD_MULTIPLE_VENDORS_ROUTE,
CONFIGURE_CONSENT_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
import { RoleRegistryEnum } from "~/types/api";
describe("Consent configuration", () => {
diff --git a/clients/admin-ui/cypress/e2e/consent-reporting.cy.ts b/clients/admin-ui/cypress/e2e/consent-reporting.cy.ts
index fc3160ab22..c31460e863 100644
--- a/clients/admin-ui/cypress/e2e/consent-reporting.cy.ts
+++ b/clients/admin-ui/cypress/e2e/consent-reporting.cy.ts
@@ -1,6 +1,6 @@
import { stubPlus } from "cypress/support/stubs";
-import { CONSENT_REPORTING_ROUTE } from "~/features/common/nav/v2/routes";
+import { CONSENT_REPORTING_ROUTE } from "~/features/common/nav/routes";
describe("Consent reporting", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/consent-settings.cy.ts b/clients/admin-ui/cypress/e2e/consent-settings.cy.ts
index 7ba17a4914..7b2d692876 100644
--- a/clients/admin-ui/cypress/e2e/consent-settings.cy.ts
+++ b/clients/admin-ui/cypress/e2e/consent-settings.cy.ts
@@ -1,6 +1,6 @@
import { stubPlus } from "cypress/support/stubs";
-import { GLOBAL_CONSENT_CONFIG_ROUTE } from "~/features/common/nav/v2/routes";
+import { GLOBAL_CONSENT_CONFIG_ROUTE } from "~/features/common/nav/routes";
describe("Consent settings", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/custom-fields.cy.ts b/clients/admin-ui/cypress/e2e/custom-fields.cy.ts
index 137ddd178c..2fc69b7c4a 100644
--- a/clients/admin-ui/cypress/e2e/custom-fields.cy.ts
+++ b/clients/admin-ui/cypress/e2e/custom-fields.cy.ts
@@ -1,6 +1,6 @@
import { stubPlus, stubTaxonomyEntities } from "cypress/support/stubs";
-import { CUSTOM_FIELDS_ROUTE } from "~/features/common/nav/v2/routes";
+import { CUSTOM_FIELDS_ROUTE } from "~/features/common/nav/routes";
import { RoleRegistryEnum } from "~/types/api";
const TAXONOMY_SINGLE_SELECT_ID = "plu_1850be9e-fabc-424d-8224-2fc44c84605a";
diff --git a/clients/admin-ui/cypress/e2e/data-catalog.cy.ts b/clients/admin-ui/cypress/e2e/data-catalog.cy.ts
index fc5e30c740..5a37d67ae2 100644
--- a/clients/admin-ui/cypress/e2e/data-catalog.cy.ts
+++ b/clients/admin-ui/cypress/e2e/data-catalog.cy.ts
@@ -6,7 +6,7 @@ import {
stubTaxonomyEntities,
} from "cypress/support/stubs";
-import { DATA_CATALOG_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATA_CATALOG_ROUTE } from "~/features/common/nav/routes";
describe("data catalog", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/datamap-report.cy.ts b/clients/admin-ui/cypress/e2e/datamap-report.cy.ts
index 40c96cbe54..faf5b5da68 100644
--- a/clients/admin-ui/cypress/e2e/datamap-report.cy.ts
+++ b/clients/admin-ui/cypress/e2e/datamap-report.cy.ts
@@ -4,7 +4,7 @@ import {
stubTaxonomyEntities,
} from "cypress/support/stubs";
-import { REPORTING_DATAMAP_ROUTE } from "~/features/common/nav/v2/routes";
+import { REPORTING_DATAMAP_ROUTE } from "~/features/common/nav/routes";
import {
AllowedTypes,
CustomFieldDefinition,
diff --git a/clients/admin-ui/cypress/e2e/datasets.cy.ts b/clients/admin-ui/cypress/e2e/datasets.cy.ts
index ffb80860b6..df84472aa1 100644
--- a/clients/admin-ui/cypress/e2e/datasets.cy.ts
+++ b/clients/admin-ui/cypress/e2e/datasets.cy.ts
@@ -20,6 +20,7 @@ describe("Dataset", () => {
it("Can navigate to the datasets list view", () => {
cy.visit("/");
+ cy.getByTestId("Data inventory-nav-group").click();
cy.getByTestId("Manage datasets-nav-link").click();
cy.wait("@getFilteredDatasets");
cy.getByTestId("dataset-table");
diff --git a/clients/admin-ui/cypress/e2e/discovery-detection.cy.ts b/clients/admin-ui/cypress/e2e/discovery-detection.cy.ts
index cb7a3dff5c..87d0b9ae7d 100644
--- a/clients/admin-ui/cypress/e2e/discovery-detection.cy.ts
+++ b/clients/admin-ui/cypress/e2e/discovery-detection.cy.ts
@@ -8,7 +8,7 @@ import {
DATA_DETECTION_ROUTE,
DATA_DISCOVERY_ROUTE,
DETECTION_DISCOVERY_ACTIVITY_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
describe("discovery and detection", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/domains.cy.ts b/clients/admin-ui/cypress/e2e/domains.cy.ts
index 9d58223880..4132ae0885 100644
--- a/clients/admin-ui/cypress/e2e/domains.cy.ts
+++ b/clients/admin-ui/cypress/e2e/domains.cy.ts
@@ -1,6 +1,6 @@
import { stubPlus } from "cypress/support/stubs";
-import { DOMAIN_MANAGEMENT_ROUTE } from "~/features/common/nav/v2/routes";
+import { DOMAIN_MANAGEMENT_ROUTE } from "~/features/common/nav/routes";
// Mock response for GET /api/v1/config?api_set=true
const API_SET_CONFIG = {
@@ -25,6 +25,7 @@ describe("Domains page", () => {
it("can navigate to the Domains page", () => {
cy.visit("/");
+ cy.getByTestId("Settings-nav-group").click();
cy.getByTestId("Domains-nav-link").click();
cy.getByTestId("management-domains");
});
diff --git a/clients/admin-ui/cypress/e2e/integration-management.cy.ts b/clients/admin-ui/cypress/e2e/integration-management.cy.ts
index 37ab892075..d7577f2d89 100644
--- a/clients/admin-ui/cypress/e2e/integration-management.cy.ts
+++ b/clients/admin-ui/cypress/e2e/integration-management.cy.ts
@@ -1,6 +1,6 @@
import { stubPlus, stubSystemCrud } from "cypress/support/stubs";
-import { INTEGRATION_MANAGEMENT_ROUTE } from "~/features/common/nav/v2/routes";
+import { INTEGRATION_MANAGEMENT_ROUTE } from "~/features/common/nav/routes";
describe("Integration management for data detection & discovery", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/locations-regulations.cy.ts b/clients/admin-ui/cypress/e2e/locations-regulations.cy.ts
index 1c4628debb..6cc138cf3d 100644
--- a/clients/admin-ui/cypress/e2e/locations-regulations.cy.ts
+++ b/clients/admin-ui/cypress/e2e/locations-regulations.cy.ts
@@ -3,7 +3,7 @@ import { stubLocations, stubPlus } from "cypress/support/stubs";
import {
LOCATIONS_ROUTE,
REGULATIONS_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
const assertIsChecked = (
name: string,
diff --git a/clients/admin-ui/cypress/e2e/nav-bar.cy.ts b/clients/admin-ui/cypress/e2e/nav-bar.cy.ts
index fe58e40274..02c7a26f6d 100644
--- a/clients/admin-ui/cypress/e2e/nav-bar.cy.ts
+++ b/clients/admin-ui/cypress/e2e/nav-bar.cy.ts
@@ -8,50 +8,69 @@ describe("Nav Bar", () => {
it("renders all navigation groups with links inside", () => {
cy.visit("/");
- cy.get("[id^='accordion-button']").should("have.length", 4);
- cy.getByTestId("Overview-nav-group").within(() => {
- cy.getByTestId("Home-nav-link");
- });
- cy.getByTestId("Data inventory-nav-group").within(() => {
- cy.getByTestId("System inventory-nav-link");
- cy.getByTestId("Add systems-nav-link");
- cy.getByTestId("Manage datasets-nav-link");
- });
- cy.getByTestId("Privacy requests-nav-group").within(() => {
- cy.getByTestId("Request manager-nav-link");
- cy.getByTestId("Connection manager-nav-link");
- });
- cy.getByTestId("Settings-nav-group").within(() => {
- cy.getByTestId("Users-nav-link");
- cy.getByTestId("Organization-nav-link");
- cy.getByTestId("Taxonomy-nav-link");
- cy.getByTestId("About Fides-nav-link");
- });
+ cy.get(".ant-menu-submenu-title").should("have.length", 4);
+ cy.getByTestId("Overview-nav-group")
+ .click()
+ .parents(".ant-menu-submenu")
+ .within(() => {
+ cy.getByTestId("Home-nav-link");
+ });
+ cy.getByTestId("Data inventory-nav-group")
+ .click()
+ .parents(".ant-menu-submenu")
+ .within(() => {
+ cy.getByTestId("System inventory-nav-link");
+ cy.getByTestId("Add systems-nav-link");
+ cy.getByTestId("Manage datasets-nav-link");
+ });
+ cy.getByTestId("Privacy requests-nav-group")
+ .click()
+ .parents(".ant-menu-submenu")
+ .within(() => {
+ cy.getByTestId("Request manager-nav-link");
+ cy.getByTestId("Connection manager-nav-link");
+ });
+ cy.getByTestId("Settings-nav-group")
+ .click()
+ .parents(".ant-menu-submenu")
+ .within(() => {
+ cy.getByTestId("Users-nav-link");
+ cy.getByTestId("Organization-nav-link");
+ cy.getByTestId("Taxonomy-nav-link");
+ cy.getByTestId("About Fides-nav-link");
+ });
});
it("renders the Consent and Detection & Discovery navs with Plus", () => {
stubPlus(true);
cy.visit("/");
- cy.get("[id^='accordion-button']").should("have.length", 6);
- cy.getByTestId("Detection & Discovery-nav-group").within(() => {
- cy.getByTestId("Activity-nav-link").should("exist");
- cy.getByTestId("Data detection-nav-link").should("exist");
- cy.getByTestId("Data discovery-nav-link").should("exist");
- });
+ cy.get(".ant-menu-submenu-title").should("have.length", 6);
+ cy.getByTestId("Detection & Discovery-nav-group")
+ .click()
+ .parents(".ant-menu-submenu")
+ .within(() => {
+ cy.getByTestId("Activity-nav-link").should("exist");
+ cy.getByTestId("Data detection-nav-link").should("exist");
+ cy.getByTestId("Data discovery-nav-link").should("exist");
+ });
});
it("styles the active navigation link based on the current route", () => {
- const ACTIVE_COLOR = "rgb(206, 202, 194)";
+ const ACTIVE_COLOR = "rgb(43, 46, 53)";
// Start on the Home page
cy.visit("/");
// The nav should reflect the active page.
+ cy.getByTestId("Overview-nav-group").click();
+
cy.getByTestId("Home-nav-link")
- .should("have.css", "background-color")
+ .should("have.css", "color")
.should("eql", ACTIVE_COLOR);
+
+ cy.getByTestId("Data inventory-nav-group").click();
cy.getByTestId("System inventory-nav-link")
- .should("have.css", "background-color")
+ .should("have.css", "color")
.should("not.eql", ACTIVE_COLOR);
// Navigate by clicking a nav link.
@@ -59,22 +78,22 @@ describe("Nav Bar", () => {
// The nav should update which page is active.
cy.getByTestId("Home-nav-link")
- .should("have.css", "background-color")
+ .should("have.css", "color")
.should("not.eql", ACTIVE_COLOR);
cy.getByTestId("System inventory-nav-link")
- .should("have.css", "background-color")
+ .should("have.css", "color")
.should("eql", ACTIVE_COLOR);
});
it("can collapse nav groups and persist across page views", () => {
cy.visit("/");
+ cy.getByTestId("Privacy requests-nav-group").click();
cy.getByTestId("Request manager-nav-link").should("be.visible");
- cy.getByTestId("Privacy requests-nav-group").within(() => {
- cy.get("button").click();
- });
+ cy.getByTestId("Privacy requests-nav-group").click();
cy.getByTestId("Request manager-nav-link").should("not.be.visible");
// Move to another page
+ cy.getByTestId("Data inventory-nav-group").click();
cy.getByTestId("System inventory-nav-link").click();
cy.getByTestId("Request manager-nav-link").should("not.be.visible");
});
diff --git a/clients/admin-ui/cypress/e2e/organization.cy.ts b/clients/admin-ui/cypress/e2e/organization.cy.ts
index 8992fa66fd..6e0d90f387 100644
--- a/clients/admin-ui/cypress/e2e/organization.cy.ts
+++ b/clients/admin-ui/cypress/e2e/organization.cy.ts
@@ -1,6 +1,6 @@
import { stubOrganizationCrud } from "cypress/support/stubs";
-import { ORGANIZATION_MANAGEMENT_ROUTE } from "~/features/common/nav/v2/routes";
+import { ORGANIZATION_MANAGEMENT_ROUTE } from "~/features/common/nav/routes";
describe("Organization page", () => {
beforeEach(() => {
@@ -12,6 +12,8 @@ describe("Organization page", () => {
it("can navigate to the Organization page", () => {
cy.visit("/");
+ cy.getByTestId("Settings-nav-group").click();
+ cy.getByTestId("Organization-nav-link").click();
cy.getByTestId("Organization-nav-link").click();
cy.getByTestId("organization-management");
});
diff --git a/clients/admin-ui/cypress/e2e/privacy-experiences.cy.ts b/clients/admin-ui/cypress/e2e/privacy-experiences.cy.ts
index c393078343..1c2a3046f4 100644
--- a/clients/admin-ui/cypress/e2e/privacy-experiences.cy.ts
+++ b/clients/admin-ui/cypress/e2e/privacy-experiences.cy.ts
@@ -9,7 +9,7 @@ import {
} from "cypress/support/stubs";
import { PREVIEW_CONTAINER_ID } from "~/constants";
-import { PRIVACY_EXPERIENCE_ROUTE } from "~/features/common/nav/v2/routes";
+import { PRIVACY_EXPERIENCE_ROUTE } from "~/features/common/nav/routes";
import { RoleRegistryEnum } from "~/types/api";
const EXPERIENCE_ID = "pri_0338d055-f91b-4a17-ad4e-600c61551199";
@@ -231,17 +231,6 @@ describe("Privacy experiences", () => {
cy.getByTestId("toast-success-msg").should("exist");
});
- it("doesn't allow component type to be changed after selection", () => {
- cy.getByTestId("controlled-select-component").antSelect(
- "Banner and modal",
- );
- cy.getByTestId("controlled-select-component").should(
- "have.class",
- "ant-select-disabled",
- );
- cy.getByTestId("input-dismissable").should("be.visible");
- });
-
it("doesn't show a preview for a privacy center", () => {
cy.getByTestId("controlled-select-component").antSelect(
"Privacy center",
@@ -309,6 +298,14 @@ describe("Privacy experiences", () => {
cy.visit(`${PRIVACY_EXPERIENCE_ROUTE}/pri_001`);
});
+ it("doesn't allow component type to be changed", () => {
+ cy.getByTestId("controlled-select-component").should(
+ "have.class",
+ "ant-select-disabled",
+ );
+ cy.getByTestId("input-dismissable").should("be.visible");
+ });
+
it("populates the form and shows the preview with the existing values", () => {
cy.wait("@getExperienceDetail");
cy.getByTestId("controlled-select-component").should(
@@ -334,7 +331,7 @@ describe("Privacy experiences", () => {
cy.wait("@getTCFExperience");
cy.getByTestId("input-dismissable").should("be.visible");
cy.getByTestId("no-preview-notice").contains(
- "TCF preview not available",
+ "TCF overlay preview not available",
);
});
});
diff --git a/clients/admin-ui/cypress/e2e/privacy-notices.cy.ts b/clients/admin-ui/cypress/e2e/privacy-notices.cy.ts
index 49eaaa27a4..e61eed37b4 100644
--- a/clients/admin-ui/cypress/e2e/privacy-notices.cy.ts
+++ b/clients/admin-ui/cypress/e2e/privacy-notices.cy.ts
@@ -6,7 +6,7 @@ import {
stubTranslationConfig,
} from "cypress/support/stubs";
-import { PRIVACY_NOTICES_ROUTE } from "~/features/common/nav/v2/routes";
+import { PRIVACY_NOTICES_ROUTE } from "~/features/common/nav/routes";
import { RoleRegistryEnum } from "~/types/api";
const ESSENTIAL_NOTICE_ID = "pri_a518b4d0-9cbc-48b1-94dc-2fe911537b8e";
diff --git a/clients/admin-ui/cypress/e2e/properties.cy.ts b/clients/admin-ui/cypress/e2e/properties.cy.ts
index 128938f297..761c1b9a22 100644
--- a/clients/admin-ui/cypress/e2e/properties.cy.ts
+++ b/clients/admin-ui/cypress/e2e/properties.cy.ts
@@ -6,7 +6,7 @@ import {
stubProperties,
} from "cypress/support/stubs";
-import { PROPERTIES_ROUTE } from "~/features/common/nav/v2/routes";
+import { PROPERTIES_ROUTE } from "~/features/common/nav/routes";
import { RoleRegistryEnum } from "~/types/api";
describe("Properties page", () => {
diff --git a/clients/admin-ui/cypress/e2e/routes.cy.ts b/clients/admin-ui/cypress/e2e/routes.cy.ts
index 6a5c0aae47..7a0f972856 100644
--- a/clients/admin-ui/cypress/e2e/routes.cy.ts
+++ b/clients/admin-ui/cypress/e2e/routes.cy.ts
@@ -14,7 +14,7 @@ import {
DATAMAP_ROUTE,
LOCATIONS_ROUTE,
PRIVACY_NOTICES_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
import { RoleRegistryEnum } from "~/types/api";
describe("Routes", () => {
diff --git a/clients/admin-ui/cypress/e2e/system-integrations-plus.cy.ts b/clients/admin-ui/cypress/e2e/system-integrations-plus.cy.ts
index 0de1c76610..ede2e17fd1 100644
--- a/clients/admin-ui/cypress/e2e/system-integrations-plus.cy.ts
+++ b/clients/admin-ui/cypress/e2e/system-integrations-plus.cy.ts
@@ -6,7 +6,7 @@ import {
stubTaxonomyEntities,
} from "cypress/support/stubs";
-import { SYSTEM_ROUTE } from "~/features/common/nav/v2/routes";
+import { SYSTEM_ROUTE } from "~/features/common/nav/routes";
describe("System integrations", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/system-integrations.cy.ts b/clients/admin-ui/cypress/e2e/system-integrations.cy.ts
index 2183b50097..9c9f8cc62c 100644
--- a/clients/admin-ui/cypress/e2e/system-integrations.cy.ts
+++ b/clients/admin-ui/cypress/e2e/system-integrations.cy.ts
@@ -8,10 +8,7 @@ import {
stubTaxonomyEntities,
} from "cypress/support/stubs";
-import {
- EDIT_SYSTEM_ROUTE,
- SYSTEM_ROUTE,
-} from "~/features/common/nav/v2/routes";
+import { EDIT_SYSTEM_ROUTE, SYSTEM_ROUTE } from "~/features/common/nav/routes";
describe("System integrations", () => {
beforeEach(() => {
diff --git a/clients/admin-ui/cypress/e2e/systems-plus.cy.ts b/clients/admin-ui/cypress/e2e/systems-plus.cy.ts
index d6ac2b6057..a2d9027767 100644
--- a/clients/admin-ui/cypress/e2e/systems-plus.cy.ts
+++ b/clients/admin-ui/cypress/e2e/systems-plus.cy.ts
@@ -15,7 +15,7 @@ import {
DATAMAP_ROUTE,
INDEX_ROUTE,
SYSTEM_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
import { RoleRegistryEnum } from "~/types/api";
describe("System management with Plus features", () => {
diff --git a/clients/admin-ui/cypress/e2e/systems.cy.ts b/clients/admin-ui/cypress/e2e/systems.cy.ts
index 240de26461..ebcc93fa07 100644
--- a/clients/admin-ui/cypress/e2e/systems.cy.ts
+++ b/clients/admin-ui/cypress/e2e/systems.cy.ts
@@ -11,7 +11,7 @@ import {
ADD_SYSTEMS_ROUTE,
INTEGRATION_MANAGEMENT_ROUTE,
SYSTEM_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
import { RoleRegistryEnum } from "~/types/api";
describe("System management page", () => {
@@ -36,6 +36,7 @@ describe("System management page", () => {
it("Can navigate to the system management page", () => {
cy.visit("/");
+ cy.getByTestId("Data inventory-nav-group").click();
cy.getByTestId("System inventory-nav-link").click();
cy.wait("@getSystemsPaginated");
cy.getByTestId("system-management");
diff --git a/clients/admin-ui/cypress/e2e/taxonomies.cy.ts b/clients/admin-ui/cypress/e2e/taxonomies.cy.ts
index 343493f64d..21d3705560 100644
--- a/clients/admin-ui/cypress/e2e/taxonomies.cy.ts
+++ b/clients/admin-ui/cypress/e2e/taxonomies.cy.ts
@@ -10,6 +10,7 @@ describe("Taxonomy management page", () => {
it("Can navigate to the taxonomy page", () => {
cy.visit("/");
+ cy.getByTestId("Settings-nav-group").click();
cy.getByTestId("Taxonomy-nav-link").click();
cy.getByTestId("taxonomy-type-selector");
});
diff --git a/clients/admin-ui/cypress/support/stubs.ts b/clients/admin-ui/cypress/support/stubs.ts
index f4e291add9..9d86a7f250 100644
--- a/clients/admin-ui/cypress/support/stubs.ts
+++ b/clients/admin-ui/cypress/support/stubs.ts
@@ -504,6 +504,9 @@ export const stubExperienceConfig = () => {
cy.intercept("GET", "/api/v1/experience-config/*/available_translations", {
fixture: "privacy-notices/available-translations.json",
}).as("getAvailableTranslations");
+ cy.intercept("GET", "/api/v1/experience-config/available_translations", {
+ fixture: "privacy-notices/available-translations.json",
+ }).as("getAvailableTranslations");
stubPlus(true);
};
diff --git a/clients/admin-ui/src/features/auth/ProtectedRoute.tsx b/clients/admin-ui/src/features/auth/ProtectedRoute.tsx
index 845d52cbf4..5f58977f36 100644
--- a/clients/admin-ui/src/features/auth/ProtectedRoute.tsx
+++ b/clients/admin-ui/src/features/auth/ProtectedRoute.tsx
@@ -3,7 +3,7 @@ import { ReactNode, useState } from "react";
import { useAppDispatch, useAppSelector } from "~/app/hooks";
import { LOGIN_ROUTE, VERIFY_AUTH_INTERVAL } from "~/constants";
-import { useNav } from "~/features/common/nav/v2/hooks";
+import { useNav } from "~/features/common/nav/hooks";
import { useGetHealthQuery } from "~/features/plus/plus.slice";
import { useGetUserPermissionsQuery } from "~/features/user-management";
diff --git a/clients/admin-ui/src/features/common/FixedLayout.tsx b/clients/admin-ui/src/features/common/FixedLayout.tsx
index bb01159ba3..9fd0aeeebe 100644
--- a/clients/admin-ui/src/features/common/FixedLayout.tsx
+++ b/clients/admin-ui/src/features/common/FixedLayout.tsx
@@ -24,7 +24,7 @@ const FixedLayout = ({
data-testid={title}
direction="column"
height="calc(100vh - 48px)"
- width="calc(100vw - 200px)"
+ width="calc(100vw - 240px)"
>
Fides Admin UI - {title}
diff --git a/clients/admin-ui/src/features/common/PageHeader.tsx b/clients/admin-ui/src/features/common/PageHeader.tsx
index be8496c4f3..f7b7ffb81a 100644
--- a/clients/admin-ui/src/features/common/PageHeader.tsx
+++ b/clients/admin-ui/src/features/common/PageHeader.tsx
@@ -1,7 +1,7 @@
import { AntFlex as Flex, Heading } from "fidesui";
import { ComponentProps, ReactNode } from "react";
-import { NextBreadcrumb, NextBreadcrumbProps } from "./nav/v2/NextBreadcrumb";
+import { NextBreadcrumb, NextBreadcrumbProps } from "./nav/NextBreadcrumb";
interface PageHeaderProps extends ComponentProps<"div"> {
heading?: ReactNode;
diff --git a/clients/admin-ui/src/features/common/hooks/useSystemOrDatamapRoute.ts b/clients/admin-ui/src/features/common/hooks/useSystemOrDatamapRoute.ts
index a1c4e04aad..374ad08ee6 100644
--- a/clients/admin-ui/src/features/common/hooks/useSystemOrDatamapRoute.ts
+++ b/clients/admin-ui/src/features/common/hooks/useSystemOrDatamapRoute.ts
@@ -1,5 +1,5 @@
import { useFeatures } from "~/features/common/features";
-import { DATAMAP_ROUTE, SYSTEM_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATAMAP_ROUTE, SYSTEM_ROUTE } from "~/features/common/nav/routes";
/**
* Often we need to either go to the systems page or the datamap page
diff --git a/clients/admin-ui/src/features/common/nav/AccountDropdownMenu.tsx b/clients/admin-ui/src/features/common/nav/AccountDropdownMenu.tsx
new file mode 100644
index 0000000000..a19bf45738
--- /dev/null
+++ b/clients/admin-ui/src/features/common/nav/AccountDropdownMenu.tsx
@@ -0,0 +1,41 @@
+import { AntButton as Button, AntDropdown as Dropdown, Icons } from "fidesui";
+
+interface AccountDropdownMenuProps {
+ username: string;
+ onLogout: () => void;
+}
+
+const AccountDropdownMenu = ({
+ username,
+ onLogout,
+}: AccountDropdownMenuProps) => {
+ return (
+ {username},
+ type: "group",
+ },
+ { type: "divider" },
+ {
+ key: "2",
+ label: Sign out,
+ onClick: onLogout,
+ },
+ ],
+ }}
+ overlayStyle={{ width: "200px" }}
+ trigger={["click", "hover"]}
+ >
+ }
+ data-testid="header-menu-button"
+ />
+
+ );
+};
+export default AccountDropdownMenu;
diff --git a/clients/admin-ui/src/features/common/nav/v2/BackButton.tsx b/clients/admin-ui/src/features/common/nav/BackButton.tsx
similarity index 100%
rename from clients/admin-ui/src/features/common/nav/v2/BackButton.tsx
rename to clients/admin-ui/src/features/common/nav/BackButton.tsx
diff --git a/clients/admin-ui/src/features/common/nav/MainSideNav.tsx b/clients/admin-ui/src/features/common/nav/MainSideNav.tsx
new file mode 100644
index 0000000000..ed00f2e9a9
--- /dev/null
+++ b/clients/admin-ui/src/features/common/nav/MainSideNav.tsx
@@ -0,0 +1,210 @@
+import {
+ AntButton,
+ AntMenuProps as MenuProps,
+ Box,
+ Icons,
+ Link,
+ VStack,
+} from "fidesui";
+import palette from "fidesui/src/palette/palette.module.scss";
+import NextLink from "next/link";
+import { useRouter } from "next/router";
+
+import logoImage from "~/../public/logo-white.svg";
+import { useAppDispatch, useAppSelector } from "~/app/hooks";
+import { LOGIN_ROUTE } from "~/constants";
+import { logout, selectUser, useLogoutMutation } from "~/features/auth";
+import Image from "~/features/common/Image";
+import { useGetHealthQuery } from "~/features/plus/plus.slice";
+
+import AccountDropdownMenu from "./AccountDropdownMenu";
+import { useNav } from "./hooks";
+import { ActiveNav, NavGroup } from "./nav-config";
+import { NavMenu } from "./NavMenu";
+import { INDEX_ROUTE } from "./routes";
+
+const NAV_BACKGROUND_COLOR = palette.FIDESUI_MINOS;
+const NAV_WIDTH = "240px";
+const OPENED_TOGGLES_LOCAL_STORAGE_KEY = "mainSideNavOpenKeys";
+
+/** Inner component which we export for component testing */
+export const UnconnectedMainSideNav = ({
+ groups,
+ active,
+ handleLogout,
+ username,
+}: {
+ groups: NavGroup[];
+ active: ActiveNav | undefined;
+ handleLogout: any;
+ username: string;
+}) => {
+ const router = useRouter();
+
+ const navMenuItems = groups.map((group) => ({
+ key: group.title,
+ icon: group.icon,
+ label: {group.title},
+ children: group.children.map((child) => ({
+ key: child.path,
+ // child label needs left margin/padding to align with group title
+ label: (
+
+ {child.title}
+
+ ),
+ })),
+ }));
+
+ const getActiveKeyFromUrl = () => {
+ if (!active) {
+ return null;
+ }
+
+ const activeItem = groups
+ .flatMap((group) => group.children)
+ .find((child) => {
+ if (child.exact) {
+ return active?.path === child.path;
+ }
+ return active?.path ? active?.path.startsWith(child.path) : false;
+ });
+
+ return activeItem?.path || null;
+ };
+
+ const activeKey = getActiveKeyFromUrl();
+
+ const handleMenuItemClick: MenuProps["onClick"] = ({ key: path }) => {
+ router.push(path);
+ };
+
+ // When the nav is first loaded, we want to open the toggles that were open when the user last visited
+ // the page. This is stored in local storage so that it persists across refreshes.
+ const getStartupOpenKeys = () => {
+ const openedKeysString = localStorage.getItem(
+ OPENED_TOGGLES_LOCAL_STORAGE_KEY,
+ );
+ let openedKeys = [];
+ if (openedKeysString) {
+ try {
+ openedKeys = JSON.parse(openedKeysString);
+ } catch (e) {
+ // eslint-disable-next-line no-console
+ console.error("Error parsing local storage key", e);
+ }
+ }
+
+ // If the active key is not in the opened keys, add it
+ const activeParentKey = active?.title;
+ if (activeParentKey && !openedKeys.includes(activeParentKey)) {
+ openedKeys.push(activeParentKey);
+ }
+
+ return openedKeys;
+ };
+
+ const handleOpenChange = (keys: string[]) => {
+ localStorage.setItem(
+ OPENED_TOGGLES_LOCAL_STORAGE_KEY,
+ JSON.stringify(keys),
+ );
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+ {username && (
+
+ )}
+
+
+
+ );
+};
+
+const MainSideNav = () => {
+ const router = useRouter();
+ const nav = useNav({ path: router.pathname });
+ const [logoutMutation] = useLogoutMutation();
+ const dispatch = useAppDispatch();
+ const user = useAppSelector(selectUser);
+ const plusQuery = useGetHealthQuery();
+ const username = user ? user.username : "";
+
+ const handleLogout = async () => {
+ await logoutMutation({});
+ // Go to Login page first, then dispatch logout so that ProtectedRoute does not
+ // tack on a redirect URL. We don't need a redirect URL if we are just logging out!
+ router.push(LOGIN_ROUTE).then(() => {
+ dispatch(logout());
+ });
+ };
+
+ // While we are loading if we have plus, the nav isn't ready to display yet
+ // since otherwise new items can suddenly pop in. So instead, we render an empty
+ // version of the nav during load, so that when the nav does load, it is fully featured.
+ if (plusQuery.isLoading) {
+ return (
+
+ );
+ }
+
+ return (
+
+ );
+};
+
+export default MainSideNav;
diff --git a/clients/admin-ui/src/features/common/nav/NavMenu.module.scss b/clients/admin-ui/src/features/common/nav/NavMenu.module.scss
new file mode 100644
index 0000000000..d66f391e1c
--- /dev/null
+++ b/clients/admin-ui/src/features/common/nav/NavMenu.module.scss
@@ -0,0 +1,6 @@
+.menu {
+ --ant-menu-item-margin-block: 0 !important;
+ --ant-menu-item-margin-inline: 0 !important;
+ --ant-menu-item-width: 100% !important;
+ --ant-margin: 8px;
+}
diff --git a/clients/admin-ui/src/features/common/nav/NavMenu.tsx b/clients/admin-ui/src/features/common/nav/NavMenu.tsx
new file mode 100644
index 0000000000..566168439c
--- /dev/null
+++ b/clients/admin-ui/src/features/common/nav/NavMenu.tsx
@@ -0,0 +1,16 @@
+import { AntMenu as Menu } from "fidesui";
+import { ComponentProps } from "react";
+
+import styles from "./NavMenu.module.scss";
+
+type MenuProps = ComponentProps;
+
+export const NavMenu = ({ className, ...props }: MenuProps) => (
+
+);
diff --git a/clients/admin-ui/src/features/common/nav/v2/NextBreadcrumb.tsx b/clients/admin-ui/src/features/common/nav/NextBreadcrumb.tsx
similarity index 100%
rename from clients/admin-ui/src/features/common/nav/v2/NextBreadcrumb.tsx
rename to clients/admin-ui/src/features/common/nav/NextBreadcrumb.tsx
diff --git a/clients/admin-ui/src/features/common/nav/v2/hooks.ts b/clients/admin-ui/src/features/common/nav/hooks.ts
similarity index 95%
rename from clients/admin-ui/src/features/common/nav/v2/hooks.ts
rename to clients/admin-ui/src/features/common/nav/hooks.ts
index a3185686a5..72ff2a467e 100644
--- a/clients/admin-ui/src/features/common/nav/v2/hooks.ts
+++ b/clients/admin-ui/src/features/common/nav/hooks.ts
@@ -6,7 +6,7 @@ import {
configureNavGroups,
findActiveNav,
NAV_CONFIG,
-} from "~/features/common/nav/v2/nav-config";
+} from "~/features/common/nav/nav-config";
import { selectThisUsersScopes } from "~/features/user-management";
export const useNav = ({ path }: { path: string }) => {
diff --git a/clients/admin-ui/src/features/common/nav/v2/nav-config.test.ts b/clients/admin-ui/src/features/common/nav/nav-config.test.ts
similarity index 100%
rename from clients/admin-ui/src/features/common/nav/v2/nav-config.test.ts
rename to clients/admin-ui/src/features/common/nav/nav-config.test.ts
diff --git a/clients/admin-ui/src/features/common/nav/v2/nav-config.ts b/clients/admin-ui/src/features/common/nav/nav-config.tsx
similarity index 97%
rename from clients/admin-ui/src/features/common/nav/v2/nav-config.ts
rename to clients/admin-ui/src/features/common/nav/nav-config.tsx
index 13d4b0808b..be4059e82b 100644
--- a/clients/admin-ui/src/features/common/nav/v2/nav-config.ts
+++ b/clients/admin-ui/src/features/common/nav/nav-config.tsx
@@ -1,3 +1,6 @@
+import { Icons } from "fidesui";
+import { ReactNode } from "react";
+
import { FlagNames } from "~/features/common/features";
import { ScopeRegistryEnum } from "~/types/api";
@@ -19,12 +22,13 @@ export type NavConfigRoute = {
export type NavConfigGroup = {
title: string;
+ icon: ReactNode;
routes: NavConfigRoute[];
};
export const NAV_CONFIG: NavConfigGroup[] = [
- // Goes last because its root path will match everything.
{
+ icon: ,
title: "Overview",
routes: [
{
@@ -37,6 +41,7 @@ export const NAV_CONFIG: NavConfigGroup[] = [
},
{
title: "Detection & Discovery",
+ icon: ,
routes: [
{
title: "Action center",
@@ -77,6 +82,7 @@ export const NAV_CONFIG: NavConfigGroup[] = [
},
{
title: "Data inventory",
+ icon: ,
routes: [
{
title: "Data lineage",
@@ -112,6 +118,7 @@ export const NAV_CONFIG: NavConfigGroup[] = [
},
{
title: "Privacy requests",
+ icon: ,
routes: [
{
title: "Request manager",
@@ -136,6 +143,7 @@ export const NAV_CONFIG: NavConfigGroup[] = [
},
{
title: "Consent",
+ icon: ,
routes: [
{
title: "Vendors",
@@ -166,6 +174,7 @@ export const NAV_CONFIG: NavConfigGroup[] = [
},
{
title: "Settings",
+ icon: ,
routes: [
{
title: "Properties",
@@ -293,6 +302,7 @@ export const NAV_CONFIG: NavConfigGroup[] = [
if (process.env.NEXT_PUBLIC_APP_ENV === "development") {
NAV_CONFIG.push({
title: "Developer",
+ icon: ,
routes: [
{
title: "Ant Design POC",
@@ -319,6 +329,11 @@ export type NavGroup = {
* The routes that are nested under this group. These are displayed inside of each group's accordion.
*/
children: Array;
+
+ /**
+ * Icon to display in the accordion header
+ */
+ icon: React.ReactNode;
};
/** If all routes in the group require plus and plus is not running then return true */
@@ -465,6 +480,7 @@ export const configureNavGroups = ({
const navGroup: NavGroup = {
title: group.title,
+ icon: group.icon,
children: [],
};
diff --git a/clients/admin-ui/src/features/common/nav/v2/routes.ts b/clients/admin-ui/src/features/common/nav/routes.ts
similarity index 100%
rename from clients/admin-ui/src/features/common/nav/v2/routes.ts
rename to clients/admin-ui/src/features/common/nav/routes.ts
diff --git a/clients/admin-ui/src/features/common/nav/v2/MainSideNav.tsx b/clients/admin-ui/src/features/common/nav/v2/MainSideNav.tsx
deleted file mode 100644
index 2c2d49c8f8..0000000000
--- a/clients/admin-ui/src/features/common/nav/v2/MainSideNav.tsx
+++ /dev/null
@@ -1,255 +0,0 @@
-import {
- Accordion,
- AccordionButton,
- AccordionIcon,
- AccordionItem,
- AccordionPanel,
- AntButton,
- Box,
- Button,
- Link,
- ListItem,
- Menu,
- MenuButton,
- MenuDivider,
- MenuItem,
- MenuList,
- QuestionIcon,
- Stack,
- Text,
- UnorderedList,
- UserIcon,
- VStack,
-} from "fidesui";
-import palette from "fidesui/src/palette/palette.module.scss";
-import NextLink from "next/link";
-import { useRouter } from "next/router";
-
-import logoImage from "~/../public/logo-white.svg";
-import { useAppDispatch, useAppSelector } from "~/app/hooks";
-import { LOGIN_ROUTE } from "~/constants";
-import { logout, selectUser, useLogoutMutation } from "~/features/auth";
-import Image from "~/features/common/Image";
-import { useGetHealthQuery } from "~/features/plus/plus.slice";
-
-import { useNav } from "./hooks";
-import { ActiveNav, NavGroup, NavGroupChild } from "./nav-config";
-import { INDEX_ROUTE } from "./routes";
-
-const NAV_BACKGROUND_COLOR = palette.FIDESUI_MINOS;
-const NAV_WIDTH = "200px";
-
-const FidesLogoHomeLink = () => (
-
-
-
-
-
-);
-
-export const NavSideBarLink = ({
- childGroup,
- isActive,
-}: {
- childGroup: NavGroupChild;
- isActive: boolean;
-}) => {
- const { title, path } = childGroup;
- return (
-
- {/* TODO PROD-2563 */}
-
-
- );
-};
-
-const NavGroupMenu = ({
- group,
- active,
-}: {
- group: NavGroup;
- active: ActiveNav | undefined;
-}) => (
-
-
-
-
- {group.title}
-
-
-
-
-
-
- {group.children.map((child) => {
- const isActive = child.exact
- ? active?.path === child.path
- : !!active?.path?.startsWith(child.path);
- return (
-
- );
- })}
-
-
-
-);
-
-/** Inner component which we export for component testing */
-export const UnconnectedMainSideNav = ({
- groups,
- active,
- handleLogout,
- username,
-}: {
- groups: NavGroup[];
- active: ActiveNav | undefined;
- handleLogout: any;
- username: string;
-}) => (
-
-
-
-
-
-
-
- {groups.map((group) => (
-
- ))}
-
-
-
- }
- />
- {username && (
-
- )}
-
-
-
-);
-
-const MainSideNav = () => {
- const router = useRouter();
- const nav = useNav({ path: router.pathname });
- const [logoutMutation] = useLogoutMutation();
- const dispatch = useAppDispatch();
- const user = useAppSelector(selectUser);
- const plusQuery = useGetHealthQuery();
- const username = user ? user.username : "";
-
- const handleLogout = async () => {
- await logoutMutation({});
- // Go to Login page first, then dispatch logout so that ProtectedRoute does not
- // tack on a redirect URL. We don't need a redirect URL if we are just logging out!
- router.push(LOGIN_ROUTE).then(() => {
- dispatch(logout());
- });
- };
-
- // While we are loading if we have plus, the nav isn't ready to display yet
- // since otherwise new items can suddenly pop in. So instead, we render an empty
- // version of the nav during load, so that when the nav does load, it is fully featured.
- if (plusQuery.isLoading) {
- return (
-
- );
- }
-
- return (
-
- );
-};
-
-export default MainSideNav;
diff --git a/clients/admin-ui/src/features/config-wizard/AddSystem.tsx b/clients/admin-ui/src/features/config-wizard/AddSystem.tsx
index 580bc5b0ef..dd541546ac 100644
--- a/clients/admin-ui/src/features/config-wizard/AddSystem.tsx
+++ b/clients/admin-ui/src/features/config-wizard/AddSystem.tsx
@@ -13,7 +13,7 @@ import { UpgradeModal } from "~/features/common/modals/UpgradeModal";
import {
ADD_SYSTEMS_MANUAL_ROUTE,
ADD_SYSTEMS_MULTIPLE_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
import { ValidTargets } from "~/types/api";
import CalloutNavCard from "../common/CalloutNavCard";
diff --git a/clients/admin-ui/src/features/config-wizard/AuthenticateAwsForm.tsx b/clients/admin-ui/src/features/config-wizard/AuthenticateAwsForm.tsx
index 4f4ca44d80..9a56c36a62 100644
--- a/clients/admin-ui/src/features/config-wizard/AuthenticateAwsForm.tsx
+++ b/clients/admin-ui/src/features/config-wizard/AuthenticateAwsForm.tsx
@@ -20,7 +20,7 @@ import {
import { RTKErrorResult } from "~/types/errors";
import { ControlledSelect } from "../common/form/ControlledSelect";
-import { NextBreadcrumb } from "../common/nav/v2/NextBreadcrumb";
+import { NextBreadcrumb } from "../common/nav/NextBreadcrumb";
import {
changeStep,
selectOrganizationFidesKey,
diff --git a/clients/admin-ui/src/features/config-wizard/AuthenticateOktaForm.tsx b/clients/admin-ui/src/features/config-wizard/AuthenticateOktaForm.tsx
index 1e8f12b704..6eef54da86 100644
--- a/clients/admin-ui/src/features/config-wizard/AuthenticateOktaForm.tsx
+++ b/clients/admin-ui/src/features/config-wizard/AuthenticateOktaForm.tsx
@@ -19,7 +19,7 @@ import {
} from "~/types/api";
import { RTKErrorResult } from "~/types/errors";
-import { NextBreadcrumb } from "../common/nav/v2/NextBreadcrumb";
+import { NextBreadcrumb } from "../common/nav/NextBreadcrumb";
import {
changeStep,
selectOrganizationFidesKey,
diff --git a/clients/admin-ui/src/features/config-wizard/ScanResults.tsx b/clients/admin-ui/src/features/config-wizard/ScanResults.tsx
index 687401188e..f424b864c8 100644
--- a/clients/admin-ui/src/features/config-wizard/ScanResults.tsx
+++ b/clients/admin-ui/src/features/config-wizard/ScanResults.tsx
@@ -21,7 +21,7 @@ import { SystemsCheckboxTable } from "~/features/common/SystemsCheckboxTable";
import { useUpsertSystemsMutation } from "~/features/system";
import { System } from "~/types/api";
-import { NextBreadcrumb } from "../common/nav/v2/NextBreadcrumb";
+import { NextBreadcrumb } from "../common/nav/NextBreadcrumb";
import {
changeStep,
reset,
diff --git a/clients/admin-ui/src/features/configure-consent/ConsentManagementTable.tsx b/clients/admin-ui/src/features/configure-consent/ConsentManagementTable.tsx
index 4b28fbd648..c1a8b8a75a 100644
--- a/clients/admin-ui/src/features/configure-consent/ConsentManagementTable.tsx
+++ b/clients/admin-ui/src/features/configure-consent/ConsentManagementTable.tsx
@@ -21,7 +21,7 @@ import { useRouter } from "next/router";
import { useCallback, useEffect, useMemo, useState } from "react";
import { getQueryParamsFromList } from "~/features/common/modals/FilterModal";
-import { ADD_MULTIPLE_VENDORS_ROUTE } from "~/features/common/nav/v2/routes";
+import { ADD_MULTIPLE_VENDORS_ROUTE } from "~/features/common/nav/routes";
import AddVendor from "~/features/configure-consent/AddVendor";
import {
ConsentManagementFilterModal,
diff --git a/clients/admin-ui/src/features/data-catalog/projects/CatalogProjectsTable.tsx b/clients/admin-ui/src/features/data-catalog/projects/CatalogProjectsTable.tsx
index 350f50061d..b824b7ff37 100644
--- a/clients/admin-ui/src/features/data-catalog/projects/CatalogProjectsTable.tsx
+++ b/clients/admin-ui/src/features/data-catalog/projects/CatalogProjectsTable.tsx
@@ -12,7 +12,7 @@ import { Text, VStack } from "fidesui";
import { useRouter } from "next/router";
import { useEffect, useMemo, useState } from "react";
-import { DATA_CATALOG_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATA_CATALOG_ROUTE } from "~/features/common/nav/routes";
import {
DefaultCell,
FidesTableV2,
diff --git a/clients/admin-ui/src/features/data-catalog/staged-resources/parseUrnToBreadcrumbs.ts b/clients/admin-ui/src/features/data-catalog/staged-resources/parseUrnToBreadcrumbs.ts
index 17974af525..1ea9671326 100644
--- a/clients/admin-ui/src/features/data-catalog/staged-resources/parseUrnToBreadcrumbs.ts
+++ b/clients/admin-ui/src/features/data-catalog/staged-resources/parseUrnToBreadcrumbs.ts
@@ -1,4 +1,4 @@
-import { NextBreadcrumbProps } from "~/features/common/nav/v2/NextBreadcrumb";
+import { NextBreadcrumbProps } from "~/features/common/nav/NextBreadcrumb";
const parseUrnToBreadcrumbs = (
urn: string,
diff --git a/clients/admin-ui/src/features/data-catalog/systems/CatalogSystemsTable.tsx b/clients/admin-ui/src/features/data-catalog/systems/CatalogSystemsTable.tsx
index 6a0392c28c..cc3ab3c986 100644
--- a/clients/admin-ui/src/features/data-catalog/systems/CatalogSystemsTable.tsx
+++ b/clients/admin-ui/src/features/data-catalog/systems/CatalogSystemsTable.tsx
@@ -15,7 +15,7 @@ import { useEffect, useMemo, useState } from "react";
import {
DATA_CATALOG_ROUTE,
EDIT_SYSTEM_ROUTE,
-} from "~/features/common/nav/v2/routes";
+} from "~/features/common/nav/routes";
import {
DefaultCell,
DefaultHeaderCell,
diff --git a/clients/admin-ui/src/features/data-catalog/utils/urnParsing.tsx b/clients/admin-ui/src/features/data-catalog/utils/urnParsing.tsx
index 4f8eb5a33e..fed903b2d5 100644
--- a/clients/admin-ui/src/features/data-catalog/utils/urnParsing.tsx
+++ b/clients/admin-ui/src/features/data-catalog/utils/urnParsing.tsx
@@ -1,6 +1,6 @@
import { Icons } from "fidesui";
-import { NextBreadcrumbProps } from "~/features/common/nav/v2/NextBreadcrumb";
+import { NextBreadcrumbProps } from "~/features/common/nav/NextBreadcrumb";
const URN_SEPARATOR = ".";
diff --git a/clients/admin-ui/src/features/data-discovery-and-detection/DiscoveryMonitorBreadcrumbs.tsx b/clients/admin-ui/src/features/data-discovery-and-detection/DiscoveryMonitorBreadcrumbs.tsx
index 79fdde7fac..a8c39e8b67 100644
--- a/clients/admin-ui/src/features/data-discovery-and-detection/DiscoveryMonitorBreadcrumbs.tsx
+++ b/clients/admin-ui/src/features/data-discovery-and-detection/DiscoveryMonitorBreadcrumbs.tsx
@@ -3,7 +3,7 @@ import { Icons } from "fidesui";
import {
NextBreadcrumb,
NextBreadcrumbProps,
-} from "../common/nav/v2/NextBreadcrumb";
+} from "../common/nav/NextBreadcrumb";
interface DiscoveryMonitorBreadcrumbsProps {
resourceUrn?: string;
diff --git a/clients/admin-ui/src/features/data-discovery-and-detection/action-center/EmptyMonitorsResult.tsx b/clients/admin-ui/src/features/data-discovery-and-detection/action-center/EmptyMonitorsResult.tsx
index dfd82237fb..84d761d3ce 100644
--- a/clients/admin-ui/src/features/data-discovery-and-detection/action-center/EmptyMonitorsResult.tsx
+++ b/clients/admin-ui/src/features/data-discovery-and-detection/action-center/EmptyMonitorsResult.tsx
@@ -1,7 +1,7 @@
import { AntButton as Button, AntEmpty as Empty } from "fidesui";
import NextLink from "next/link";
-import { INTEGRATION_MANAGEMENT_ROUTE } from "~/features/common/nav/v2/routes";
+import { INTEGRATION_MANAGEMENT_ROUTE } from "~/features/common/nav/routes";
export const EmptyMonitorsResult = () => (
{
const router = useRouter();
diff --git a/clients/admin-ui/src/features/datamap/GetStarted.tsx b/clients/admin-ui/src/features/datamap/GetStarted.tsx
index dcde8f813a..e1753a1d71 100644
--- a/clients/admin-ui/src/features/datamap/GetStarted.tsx
+++ b/clients/admin-ui/src/features/datamap/GetStarted.tsx
@@ -1,6 +1,6 @@
import { AntButton as Button, Box, Center, Stack, Text } from "fidesui";
-import { ADD_SYSTEMS_ROUTE } from "../common/nav/v2/routes";
+import { ADD_SYSTEMS_ROUTE } from "../common/nav/routes";
const GetStarted = () => {
return (
diff --git a/clients/admin-ui/src/features/dataset/DatabaseConnectForm.tsx b/clients/admin-ui/src/features/dataset/DatabaseConnectForm.tsx
index 6a159dc920..da974d493d 100644
--- a/clients/admin-ui/src/features/dataset/DatabaseConnectForm.tsx
+++ b/clients/admin-ui/src/features/dataset/DatabaseConnectForm.tsx
@@ -8,7 +8,7 @@ import { useFeatures } from "~/features/common/features";
import { CustomSwitch, CustomTextInput } from "~/features/common/form/inputs";
import { getErrorMessage } from "~/features/common/helpers";
import ConfirmationModal from "~/features/common/modals/ConfirmationModal";
-import { DATASET_DETAIL_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASET_DETAIL_ROUTE } from "~/features/common/nav/routes";
import { errorToastParams, successToastParams } from "~/features/common/toast";
import { DEFAULT_ORGANIZATION_FIDES_KEY } from "~/features/organization";
import { useCreateClassifyInstanceMutation } from "~/features/plus/plus.slice";
diff --git a/clients/admin-ui/src/features/dataset/DatasetYamlForm.tsx b/clients/admin-ui/src/features/dataset/DatasetYamlForm.tsx
index 058c4fa071..d79d381653 100644
--- a/clients/admin-ui/src/features/dataset/DatasetYamlForm.tsx
+++ b/clients/admin-ui/src/features/dataset/DatasetYamlForm.tsx
@@ -12,7 +12,7 @@ import { useRef, useState } from "react";
import { getErrorMessage, isErrorResult } from "~/features/common/helpers";
import { useAlert } from "~/features/common/hooks";
-import { DATASET_DETAIL_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASET_DETAIL_ROUTE } from "~/features/common/nav/routes";
import { errorToastParams, successToastParams } from "~/features/common/toast";
import { Editor, isYamlException } from "~/features/common/yaml/helpers";
import YamlError from "~/features/common/yaml/YamlError";
@@ -72,6 +72,8 @@ const DatasetYamlForm = () => {
let dataset;
if (isDatasetArray(value)) {
[dataset] = value.dataset;
+ } else if (Array.isArray(value)) {
+ [dataset] = value;
} else {
dataset = value;
}
diff --git a/clients/admin-ui/src/features/datastore-connections/ConnectionMenu.tsx b/clients/admin-ui/src/features/datastore-connections/ConnectionMenu.tsx
index b60319fc0e..75c9c54d05 100644
--- a/clients/admin-ui/src/features/datastore-connections/ConnectionMenu.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/ConnectionMenu.tsx
@@ -10,7 +10,7 @@ import {
import NextLink from "next/link";
import React from "react";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import { ConnectionType } from "~/types/api";
import { AccessLevel } from "./constants";
diff --git a/clients/admin-ui/src/features/datastore-connections/ConnectionsHeader.tsx b/clients/admin-ui/src/features/datastore-connections/ConnectionsHeader.tsx
index d2920ae23c..e1da471bc6 100644
--- a/clients/admin-ui/src/features/datastore-connections/ConnectionsHeader.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/ConnectionsHeader.tsx
@@ -3,7 +3,7 @@ import React from "react";
import { useFeatures } from "~/features/common/features";
-import { ADD_SYSTEMS_ROUTE } from "../common/nav/v2/routes";
+import { ADD_SYSTEMS_ROUTE } from "../common/nav/routes";
import PageHeader from "../common/PageHeader";
import AddConnectionButton from "./add-connection/AddConnectionButton";
diff --git a/clients/admin-ui/src/features/datastore-connections/DeleteConnectionModal.tsx b/clients/admin-ui/src/features/datastore-connections/DeleteConnectionModal.tsx
index 0573f0514e..d71faf6e06 100644
--- a/clients/admin-ui/src/features/datastore-connections/DeleteConnectionModal.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/DeleteConnectionModal.tsx
@@ -15,7 +15,7 @@ import {
import { useRouter } from "next/router";
import React from "react";
-import { INTEGRATION_MANAGEMENT_ROUTE } from "~/features/common/nav/v2/routes";
+import { INTEGRATION_MANAGEMENT_ROUTE } from "~/features/common/nav/routes";
import { useDeleteDatastoreConnectionMutation } from "./datastore-connection.slice";
diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnection.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnection.tsx
index 066efcd6dc..f1108cbfda 100644
--- a/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnection.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnection.tsx
@@ -10,7 +10,7 @@ import React, { useCallback, useEffect } from "react";
import { useDispatch } from "react-redux";
import { useAppSelector } from "~/app/hooks";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import PageHeader from "~/features/common/PageHeader";
import ChooseConnection from "./ChooseConnection";
diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectorParameters.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectorParameters.tsx
index 0ed23c7c11..6cc92ffdb0 100644
--- a/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectorParameters.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectorParameters.tsx
@@ -7,7 +7,7 @@ import { useRouter } from "next/router";
import React, { useCallback, useState } from "react";
import { useAppSelector } from "~/app/hooks";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import { SystemType } from "~/types/api";
import { ConnectorParameters as DatabaseConnectorParameters } from "./database/ConnectorParameters";
diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/DatasetConfiguration.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/DatasetConfiguration.tsx
index 8ca453811f..00467d531e 100644
--- a/clients/admin-ui/src/features/datastore-connections/add-connection/DatasetConfiguration.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/add-connection/DatasetConfiguration.tsx
@@ -22,7 +22,7 @@ import { useEffect, useState } from "react";
import { useAppSelector } from "~/app/hooks";
import { getErrorMessage } from "~/features/common/helpers";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import {
useGetAllDatasetsQuery,
useUpsertDatasetsMutation,
diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/constants.ts b/clients/admin-ui/src/features/datastore-connections/add-connection/constants.ts
index fc145f85f7..4004b769b6 100644
--- a/clients/admin-ui/src/features/datastore-connections/add-connection/constants.ts
+++ b/clients/admin-ui/src/features/datastore-connections/add-connection/constants.ts
@@ -1,6 +1,6 @@
import { ItemOption } from "common/dropdown/types";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import { SystemType } from "~/types/api";
import { AddConnectionStep, ConnectorParameterOption } from "./types";
diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/manual/ConnectorParametersForm.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/manual/ConnectorParametersForm.tsx
index 4902964d09..48684f84c3 100644
--- a/clients/admin-ui/src/features/datastore-connections/add-connection/manual/ConnectorParametersForm.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/add-connection/manual/ConnectorParametersForm.tsx
@@ -6,7 +6,7 @@ import { useRouter } from "next/router";
import * as Yup from "yup";
import { useAppSelector } from "~/app/hooks";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import CustomInput from "../forms/CustomInput";
import { BaseConnectorParametersFields } from "../types";
diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/manual/DSRCustomization.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/manual/DSRCustomization.tsx
index 123771d685..9b672f0bc4 100644
--- a/clients/admin-ui/src/features/datastore-connections/add-connection/manual/DSRCustomization.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/add-connection/manual/DSRCustomization.tsx
@@ -14,7 +14,7 @@ import { useRouter } from "next/router";
import React, { useEffect, useRef, useState } from "react";
import { useAppSelector } from "~/app/hooks";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import DSRCustomizationForm from "./DSRCustomizationForm";
import { Field } from "./types";
diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/manual/DSRCustomizationForm.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/manual/DSRCustomizationForm.tsx
index ce3207e736..b802037be4 100644
--- a/clients/admin-ui/src/features/datastore-connections/add-connection/manual/DSRCustomizationForm.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/add-connection/manual/DSRCustomizationForm.tsx
@@ -7,7 +7,7 @@ import * as Yup from "yup";
import { useAppSelector } from "~/app/hooks";
import { ControlledSelect } from "~/features/common/form/ControlledSelect";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import { useGetAllDataCategoriesQuery } from "~/features/taxonomy";
import { selectDataCategories } from "~/features/taxonomy/taxonomy.slice";
diff --git a/clients/admin-ui/src/features/datastore-connections/edit-connection/EditConnection.tsx b/clients/admin-ui/src/features/datastore-connections/edit-connection/EditConnection.tsx
index e2e1577280..88ed3055c9 100644
--- a/clients/admin-ui/src/features/datastore-connections/edit-connection/EditConnection.tsx
+++ b/clients/admin-ui/src/features/datastore-connections/edit-connection/EditConnection.tsx
@@ -3,7 +3,7 @@ import React, { useEffect, useMemo, useState } from "react";
import { useAppDispatch, useAppSelector } from "~/app/hooks";
import DataTabs, { TabData } from "~/features/common/DataTabs";
-import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/v2/routes";
+import { DATASTORE_CONNECTION_ROUTE } from "~/features/common/nav/routes";
import PageHeader from "~/features/common/PageHeader";
import {
reset,
diff --git a/clients/admin-ui/src/features/integrations/IntegrationList.tsx b/clients/admin-ui/src/features/integrations/IntegrationList.tsx
index 49671101a6..134e43f81c 100644
--- a/clients/admin-ui/src/features/integrations/IntegrationList.tsx
+++ b/clients/admin-ui/src/features/integrations/IntegrationList.tsx
@@ -1,7 +1,7 @@
import { Box } from "fidesui";
import { useRouter } from "next/router";
-import { INTEGRATION_MANAGEMENT_ROUTE } from "~/features/common/nav/v2/routes";
+import { INTEGRATION_MANAGEMENT_ROUTE } from "~/features/common/nav/routes";
import IntegrationBox from "~/features/integrations/IntegrationBox";
import NoIntegrations from "~/features/integrations/NoIntegrations";
import { ConnectionConfigurationResponse } from "~/types/api";
diff --git a/clients/admin-ui/src/features/locations/LocationManagement.tsx b/clients/admin-ui/src/features/locations/LocationManagement.tsx
index ac244ebf8e..ee7eebd36c 100644
--- a/clients/admin-ui/src/features/locations/LocationManagement.tsx
+++ b/clients/admin-ui/src/features/locations/LocationManagement.tsx
@@ -19,7 +19,7 @@ import { errorToastParams, successToastParams } from "~/features/common/toast";
import { LocationRegulationResponse, Selection } from "~/types/api";
import { isErrorResult } from "~/types/errors";
-import { REGULATIONS_ROUTE } from "../common/nav/v2/routes";
+import { REGULATIONS_ROUTE } from "../common/nav/routes";
import ToastLink from "../common/ToastLink";
import LocationPickerCard from "./LocationPickerCard";
import { usePatchLocationsRegulationsMutation } from "./locations.slice";
diff --git a/clients/admin-ui/src/features/locations/RegulationManagement.tsx b/clients/admin-ui/src/features/locations/RegulationManagement.tsx
index 980801e3fc..4a57c283ed 100644
--- a/clients/admin-ui/src/features/locations/RegulationManagement.tsx
+++ b/clients/admin-ui/src/features/locations/RegulationManagement.tsx
@@ -14,7 +14,7 @@ import { useMemo, useState } from "react";
import { getErrorMessage } from "~/features/common/helpers";
import ConfirmationModal from "~/features/common/modals/ConfirmationModal";
-import { LOCATIONS_ROUTE } from "~/features/common/nav/v2/routes";
+import { LOCATIONS_ROUTE } from "~/features/common/nav/routes";
import SearchBar from "~/features/common/SearchBar";
import { errorToastParams, successToastParams } from "~/features/common/toast";
import ToastLink from "~/features/common/ToastLink";
diff --git a/clients/admin-ui/src/features/messaging-templates/PropertySpecificMessagingTemplateForm.tsx b/clients/admin-ui/src/features/messaging-templates/PropertySpecificMessagingTemplateForm.tsx
index 9d0dcc1aa5..deef1b57a4 100644
--- a/clients/admin-ui/src/features/messaging-templates/PropertySpecificMessagingTemplateForm.tsx
+++ b/clients/admin-ui/src/features/messaging-templates/PropertySpecificMessagingTemplateForm.tsx
@@ -1,4 +1,4 @@
-import { MESSAGING_ROUTE } from "common/nav/v2/routes";
+import { MESSAGING_ROUTE } from "common/nav/routes";
import { AntButton as Button, Box, Flex } from "fidesui";
import { Form, Formik, useFormikContext } from "formik";
import { useRouter } from "next/router";
diff --git a/clients/admin-ui/src/features/privacy-experience/ConfigurePrivacyExperience.tsx b/clients/admin-ui/src/features/privacy-experience/ConfigurePrivacyExperience.tsx
index ac8971c235..e7c64c8709 100644
--- a/clients/admin-ui/src/features/privacy-experience/ConfigurePrivacyExperience.tsx
+++ b/clients/admin-ui/src/features/privacy-experience/ConfigurePrivacyExperience.tsx
@@ -8,7 +8,7 @@ import { useAppSelector } from "~/app/hooks";
import { getErrorMessage } from "~/features/common/helpers";
import { DesktopIcon } from "~/features/common/Icon/DesktopIcon";
import { MobileIcon } from "~/features/common/Icon/MobileIcon";
-import { PRIVACY_EXPERIENCE_ROUTE } from "~/features/common/nav/v2/routes";
+import { PRIVACY_EXPERIENCE_ROUTE } from "~/features/common/nav/routes";
import { errorToastParams, successToastParams } from "~/features/common/toast";
import {
defaultInitialValues,
diff --git a/clients/admin-ui/src/features/privacy-experience/Preview.tsx b/clients/admin-ui/src/features/privacy-experience/Preview.tsx
index 146df47373..c52057c04b 100644
--- a/clients/admin-ui/src/features/privacy-experience/Preview.tsx
+++ b/clients/admin-ui/src/features/privacy-experience/Preview.tsx
@@ -20,6 +20,8 @@ import {
PrivacyNoticeResponse,
} from "~/types/api";
+import { COMPONENT_MAP } from "./constants";
+
declare global {
interface Window {
Fides: FidesGlobal;
@@ -70,6 +72,10 @@ const Preview = ({
const [noticesOnConfig, setNoticesOnConfig] = useState<
PrivacyNoticeResponse[]
>([]);
+ const isPreviewAvailable = [
+ ComponentType.BANNER_AND_MODAL,
+ ComponentType.MODAL,
+ ].includes(values.component);
const toast = useToast();
@@ -152,34 +158,23 @@ const Preview = ({
if (
window.Fides &&
values.privacy_notice_ids?.length &&
- values.component !== ComponentType.PRIVACY_CENTER &&
- values.component !== ComponentType.TCF_OVERLAY
+ isPreviewAvailable
) {
window.Fides.init(baseConfig as any);
}
- }, [values, translation, baseConfig, allPrivacyNotices]);
+ }, [values, translation, baseConfig, allPrivacyNotices, isPreviewAvailable]);
const modal = document.getElementById("fides-modal");
if (modal) {
modal.removeAttribute("tabindex");
}
- if (values.component === ComponentType.TCF_OVERLAY) {
- return (
-
- );
- }
-
- if (values.component === ComponentType.PRIVACY_CENTER) {
+ if (!isPreviewAvailable) {
return (
);
}
@@ -234,8 +229,7 @@ const Preview = ({
width: unset;
}
`}
- {values.component === ComponentType.BANNER_AND_MODAL ||
- values.component === ComponentType.MODAL ? (
+ {isPreviewAvailable ? (