diff --git a/CHANGELOG.md b/CHANGELOG.md index be870166fb..0a208815d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o - The privacy declarations for a system are now sorted alphabetically by name. [#5683](https://github.com/ethyca/fides/pull/5683) - Upgraded GPP library to `3.1.5` and added support for all available state sections (ustx, usde, usia, etc.) [#5696](https://github.com/ethyca/fides/pull/5696) - Updating DSR execution to allow collections to be unreachable when they don't contain policy-relevant data categories [#5689](https://github.com/ethyca/fides/pull/5689) +- Added "All activity" root breadcrumb to D&D results tables [#5694](https://github.com/ethyca/fides/pull/5694) ### Developer Experience - Migrated radio buttons and groups to Ant Design [#5681](https://github.com/ethyca/fides/pull/5681) diff --git a/clients/admin-ui/src/features/common/nav/v2/NextBreadcrumb.tsx b/clients/admin-ui/src/features/common/nav/v2/NextBreadcrumb.tsx index e1bb8974f6..ab3dee1b50 100644 --- a/clients/admin-ui/src/features/common/nav/v2/NextBreadcrumb.tsx +++ b/clients/admin-ui/src/features/common/nav/v2/NextBreadcrumb.tsx @@ -3,6 +3,7 @@ import { AntBreadcrumb as Breadcrumb, AntBreadcrumbItemType as BreadcrumbItemType, AntBreadcrumbProps as BreadcrumbProps, + AntButton as Button, AntTypography as Typography, } from "fidesui"; import { Url } from "next/dist/shared/lib/router/router"; @@ -36,6 +37,7 @@ export const NextBreadcrumb = ({ items, ...props }: NextBreadcrumbProps) => { items?.map((item, i) => { const isCurrentPage = i === items.length - 1; const modifiedItem = { ...item }; + const renderAsButton = modifiedItem.onClick && !modifiedItem.href; if (typeof modifiedItem.title === "string") { // for everything except the current page, truncate the title if it's too long modifiedItem.title = ( @@ -50,6 +52,20 @@ export const NextBreadcrumb = ({ items, ...props }: NextBreadcrumbProps) => { ); } + if (renderAsButton) { + modifiedItem.title = ( + + ); + return modifiedItem; + } if (modifiedItem.icon) { modifiedItem.title = ( <> 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 3b086ab5e1..79fdde7fac 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 @@ -32,24 +32,24 @@ const DiscoveryMonitorBreadcrumbs = ({ } if (resourceUrn) { + breadcrumbItems.push({ + title: "All activity", + href: parentLink, + }); const urnParts = resourceUrn.split("."); urnParts.forEach((urnPart, index) => { // don't render anything at the monitor level because there's no view for it if (index === 0) { return; } - const isDatabase = index === 1; breadcrumbItems.push({ title: urnPart, icon: DATA_BREADCRUMB_ICONS[index - 1], - href: isDatabase ? parentLink : "", - onClick: !isDatabase - ? (e) => { - e.preventDefault(); - onPathClick(urnParts.slice(0, index + 1).join(".")); - } - : undefined, + onClick: (e) => { + e.preventDefault(); + onPathClick(urnParts.slice(0, index + 1).join(".")); + }, }); }); }