Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

chore(ui): remove orphaned v2 breadcrumb source (#8468)

Andrew Huang1cc88780d9a9
diff --git a/frontend/src/components/COMPONENT_LIFECYCLE.md b/frontend/src/components/COMPONENT_LIFECYCLE.md
index f9b6ef5dda..406d61cdbe 100644
--- a/frontend/src/components/COMPONENT_LIFECYCLE.md
+++ b/frontend/src/components/COMPONENT_LIFECYCLE.md
@@ -10,7 +10,7 @@ The [V3 migration ledger](V3_MIGRATION.md) tracks source removal, coverage, and
| -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `FilterableSelect` | Deprecated | Use V3 `Combobox` where its contract fits. |
| `Button`, `Card`, `Checkbox`, `EmptyState`, `IconButton`, `Input`, `Pagination`, `Select`, `Switch`, `TextArea`, `Tooltip` | Ready for focused deprecation | Supported V3 replacements exist. Check representative consumers before adding component-specific guidance. |
-| `Accordion`, `Alert`, `Breadcrumb`, `CopyButton`, `Dropdown`, `HoverCardv2`, `Skeleton`, `Spinner`, `Table`, `Tabs` | Blocked | Composition, interaction, or state parity still needs verification. |
+| `Accordion`, `Alert`, `CopyButton`, `Dropdown`, `HoverCardv2`, `Skeleton`, `Spinner`, `Table`, `Tabs` | Blocked | Composition, interaction, or state parity still needs verification. |
| `ConfirmActionModal`, `DeleteActionModal`, `Modal` | Blocked | Verify confirmation, menu-item, nested-overlay, and close behavior before directing consumers to V3 overlays. |
| `ContentLoader`, `FormControl`, `GenericFieldLabel`, `PageHeader`, `Tag` | Blocked | The V3 replacements require consumer-specific composition or accessibility changes. |
| `SecretInput`, `SecretPathInput` | Blocked | Security-sensitive or specialist behavior needs workflow-level parity validation. |
diff --git a/frontend/src/components/v2/Breadcrumb/Breadcrumb.tsx b/frontend/src/components/v2/Breadcrumb/Breadcrumb.tsx
deleted file mode 100644
index c0ad1edb94..0000000000
--- a/frontend/src/components/v2/Breadcrumb/Breadcrumb.tsx
+++ /dev/null
@@ -1,222 +0,0 @@
-import React from "react";
-import { faCaretDown, faEllipsis } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link, ReactNode } from "@tanstack/react-router";
-import { LinkComponentProps } from "node_modules/@tanstack/react-router/dist/esm/link";
-import { twMerge } from "tailwind-merge";
-
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuTrigger
-} from "../Dropdown";
-
-const Breadcrumb = React.forwardRef<
- HTMLElement,
- React.ComponentPropsWithoutRef<"nav"> & {
- separator?: React.ReactNode;
- }
->(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
-Breadcrumb.displayName = "Breadcrumb";
-
-const BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentPropsWithoutRef<"ol">>(
- ({ className, ...props }, ref) => (
- <ol
- ref={ref}
- className={twMerge(
- "flex flex-wrap items-center text-sm break-words text-foreground-default",
- className
- )}
- {...props}
- />
- )
-);
-BreadcrumbList.displayName = "BreadcrumbList";
-
-const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.ComponentPropsWithoutRef<"li">>(
- ({ className, ...props }, ref) => (
- <li
- ref={ref}
- className={twMerge("inline-flex items-center gap-1.5 text-sm", className)}
- {...props}
- />
- )
-);
-BreadcrumbItem.displayName = "BreadcrumbItem";
-
-const BreadcrumbLink = React.forwardRef<
- HTMLDivElement,
- React.ComponentPropsWithoutRef<"div"> & {
- asChild?: boolean;
- }
->(({ asChild, className, ...props }, ref) => {
- return (
- <div
- ref={ref}
- className={twMerge("transition-colors hover:text-project", className)}
- {...props}
- />
- );
-});
-BreadcrumbLink.displayName = "BreadcrumbLink";
-
-const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentPropsWithoutRef<"span">>(
- ({ className, ...props }, ref) => (
- <span
- ref={ref}
- role="link"
- aria-disabled="true"
- aria-current="page"
- className={twMerge("font-normal text-foreground-soft last:text-label-secondary", className)}
- {...props}
- />
- )
-);
-BreadcrumbPage.displayName = "BreadcrumbPage";
-
-const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentProps<"li">) => (
- <li role="presentation" aria-hidden="true" className={twMerge("", className)} {...props}>
- {children ?? <p className="px-3 text-lg text-muted/70">/</p>}
- </li>
-);
-BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
-
-const BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
- <span
- role="presentation"
- aria-hidden="true"
- className={twMerge("flex h-9 w-9 items-center justify-center", className)}
- {...props}
- >
- <FontAwesomeIcon icon={faEllipsis} className="h-4 w-4" />
- <span className="sr-only">More</span>
- </span>
-);
-BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
-
-enum BreadcrumbTypes {
- Dropdown = "dropdown",
- Component = "component"
-}
-
-export type TBreadcrumbFormat =
- | {
- type: BreadcrumbTypes.Dropdown;
- label: string;
- dropdownTitle?: string;
- links: { label: string; link: LinkComponentProps }[];
- }
- | {
- type: BreadcrumbTypes.Component;
- component: ReactNode;
- }
- | {
- type: undefined;
- link?: LinkComponentProps;
- label: string;
- icon?: ReactNode;
- };
-
-const BreadcrumbContainer = ({
- breadcrumbs,
- className
-}: {
- breadcrumbs: TBreadcrumbFormat[];
- className?: string;
-}) => (
- <div className={twMerge("mx-auto max-w-8xl overflow-hidden text-foreground-inverse", className)}>
- <Breadcrumb className="overflow-hidden">
- <BreadcrumbList className="overflow-hidden">
- {(breadcrumbs as TBreadcrumbFormat[]).map((el, index) => {
- const isNotLastCrumb = index + 1 !== breadcrumbs.length;
- const BreadcrumbSegment = isNotLastCrumb ? BreadcrumbLink : BreadcrumbPage;
-
- if (el.type === BreadcrumbTypes.Dropdown) {
- return (
- <React.Fragment key={`breadcrumb-group-${index + 1}`}>
- <DropdownMenu>
- <DropdownMenuTrigger>
- <BreadcrumbItem>
- <BreadcrumbSegment className="rounded-md py-1 py-2">
- {el.label}{" "}
- <FontAwesomeIcon
- icon={faCaretDown}
- size="sm"
- className="ml-2 text-label-secondary"
- />
- </BreadcrumbSegment>
- </BreadcrumbItem>
- </DropdownMenuTrigger>
- <DropdownMenuContent side="bottom" sideOffset={8} align="start">
- {el?.dropdownTitle && <DropdownMenuLabel>{el.dropdownTitle}</DropdownMenuLabel>}
- {el.links.map((i, dropIndex) => (
- <Link
- {...i.link}
- key={`breadcrumb-group-${index + 1}-dropdown-${dropIndex + 1}`}
- >
- <DropdownMenuItem>{i.label}</DropdownMenuItem>
- </Link>
- ))}
- </DropdownMenuContent>
- </DropdownMenu>
- {isNotLastCrumb && <BreadcrumbSeparator />}
- </React.Fragment>
- );
- }
-
- if (el.type === BreadcrumbTypes.Component) {
- const Component = el.component;
- return (
- <React.Fragment key={`breadcrumb-group-${index + 1}`}>
- <BreadcrumbItem className="overflow-hidden">
- <BreadcrumbSegment className="overflow-hidden">
- <Component />
- </BreadcrumbSegment>
- </BreadcrumbItem>
- {isNotLastCrumb && <BreadcrumbSeparator />}
- </React.Fragment>
- );
- }
-
- const Icon = el?.icon;
- return (
- <React.Fragment key={`breadcrumb-group-${index + 1}`}>
- {"link" in el && isNotLastCrumb ? (
- <Link {...el.link}>
- <BreadcrumbItem>
- <BreadcrumbLink className="inline-flex items-center gap-1.5">
- {Icon && <Icon />}
- {el.label}
- </BreadcrumbLink>
- </BreadcrumbItem>
- </Link>
- ) : (
- <BreadcrumbItem>
- <BreadcrumbPage className="inline-flex items-center gap-1.5">
- {Icon && <Icon />}
- {el.label}
- </BreadcrumbPage>
- </BreadcrumbItem>
- )}
- {isNotLastCrumb && <BreadcrumbSeparator />}
- </React.Fragment>
- );
- })}
- </BreadcrumbList>
- </Breadcrumb>
- </div>
-);
-
-export {
- Breadcrumb,
- BreadcrumbContainer,
- BreadcrumbEllipsis,
- BreadcrumbItem,
- BreadcrumbLink,
- BreadcrumbList,
- BreadcrumbPage,
- BreadcrumbSeparator,
- BreadcrumbTypes
-};
diff --git a/frontend/src/components/v2/Breadcrumb/index.tsx b/frontend/src/components/v2/Breadcrumb/index.tsx
deleted file mode 100644
index 3bc34d185a..0000000000
--- a/frontend/src/components/v2/Breadcrumb/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./Breadcrumb";
diff --git a/frontend/src/components/v2/index.tsx b/frontend/src/components/v2/index.tsx
index d67f5d6146..8b536044bb 100644
--- a/frontend/src/components/v2/index.tsx
+++ b/frontend/src/components/v2/index.tsx
@@ -1,7 +1,6 @@
/* eslint-disable react-refresh/only-export-components */
export * from "./Accordion";
export * from "./Alert";
-export * from "./Breadcrumb";
export * from "./Button";
export * from "./Card";
export * from "./Checkbox";
diff --git a/frontend/src/pages/agent-vault/layout.tsx b/frontend/src/pages/agent-vault/layout.tsx
index 158fe5fd37..0476985f05 100644
--- a/frontend/src/pages/agent-vault/layout.tsx
+++ b/frontend/src/pages/agent-vault/layout.tsx
@@ -3,7 +3,6 @@ import { unpackRules } from "@casl/ability/extra";
import { createFileRoute, redirect } from "@tanstack/react-router";
import axios from "axios";
-import { BreadcrumbTypes } from "@app/components/v2";
import {
OrgPermissionAdminConsoleAction,
OrgPermissionSet,
@@ -23,7 +22,6 @@ import {
roleQueryKeys
} from "@app/hooks/api/roles/queries";
import { AgentVaultLayout } from "@app/layouts/AgentVaultLayout";
-import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
export const Route = createFileRoute(
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/agent-vault/_agent-vault-layout"
@@ -92,7 +90,7 @@ export const Route = createFileRoute(
return {
implicitProjectId: agentVaultProjectId,
implicitProductType: ProjectType.AgentVault,
- breadcrumbs: [{ type: BreadcrumbTypes.Component, component: ProjectSelect }]
+ breadcrumbs: []
};
}
});
diff --git a/frontend/src/pages/cert-manager/layout.tsx b/frontend/src/pages/cert-manager/layout.tsx
index 463fc5c30e..4cc6c69b95 100644
--- a/frontend/src/pages/cert-manager/layout.tsx
+++ b/frontend/src/pages/cert-manager/layout.tsx
@@ -1,11 +1,9 @@
import { createFileRoute } from "@tanstack/react-router";
-import { BreadcrumbTypes } from "@app/components/v2";
import { projectKeys } from "@app/hooks/api";
import { fetchProjectById } from "@app/hooks/api/projects/queries";
import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
import { PkiManagerLayout } from "@app/layouts/PkiManagerLayout";
-import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
export const Route = createFileRoute(
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/cert-manager/$projectId/_cert-manager-layout"
@@ -26,12 +24,7 @@ export const Route = createFileRoute(
return {
project,
- breadcrumbs: [
- {
- type: BreadcrumbTypes.Component,
- component: ProjectSelect
- }
- ]
+ breadcrumbs: []
};
}
});
diff --git a/frontend/src/pages/kms/layout.tsx b/frontend/src/pages/kms/layout.tsx
index 9e835d4794..2d32fc4bda 100644
--- a/frontend/src/pages/kms/layout.tsx
+++ b/frontend/src/pages/kms/layout.tsx
@@ -1,11 +1,9 @@
import { createFileRoute } from "@tanstack/react-router";
-import { BreadcrumbTypes } from "@app/components/v2";
import { projectKeys } from "@app/hooks/api";
import { fetchProjectById } from "@app/hooks/api/projects/queries";
import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
import { KmsLayout } from "@app/layouts/KmsLayout";
-import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
export const Route = createFileRoute(
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/$projectId/_kms-layout"
@@ -26,12 +24,7 @@ export const Route = createFileRoute(
return {
project,
- breadcrumbs: [
- {
- type: BreadcrumbTypes.Component,
- component: ProjectSelect
- }
- ]
+ breadcrumbs: []
};
}
});
diff --git a/frontend/src/pages/pam/layout.tsx b/frontend/src/pages/pam/layout.tsx
index 13b155fb5e..420eb83dbf 100644
--- a/frontend/src/pages/pam/layout.tsx
+++ b/frontend/src/pages/pam/layout.tsx
@@ -1,6 +1,5 @@
import { createFileRoute, redirect } from "@tanstack/react-router";
-import { BreadcrumbTypes } from "@app/components/v2";
import { projectKeys } from "@app/hooks/api";
import { organizationKeys } from "@app/hooks/api/organization/queries";
import { Organization } from "@app/hooks/api/organization/types";
@@ -9,7 +8,6 @@ import { fetchProjectById } from "@app/hooks/api/projects/queries";
import { ProjectType } from "@app/hooks/api/projects/types";
import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
import { PamLayout } from "@app/layouts/PamLayout";
-import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
export const Route = createFileRoute(
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout"
@@ -55,12 +53,7 @@ export const Route = createFileRoute(
return {
implicitProjectId: pamProjectId,
implicitProductType: ProjectType.PAM,
- breadcrumbs: [
- {
- type: BreadcrumbTypes.Component,
- component: ProjectSelect
- }
- ]
+ breadcrumbs: []
};
}
});
diff --git a/frontend/src/pages/secret-manager/layout.tsx b/frontend/src/pages/secret-manager/layout.tsx
index 2c49ab9804..e7919f188e 100644
--- a/frontend/src/pages/secret-manager/layout.tsx
+++ b/frontend/src/pages/secret-manager/layout.tsx
@@ -1,10 +1,8 @@
import { createFileRoute } from "@tanstack/react-router";
-import { BreadcrumbTypes } from "@app/components/v2";
import { projectKeys } from "@app/hooks/api";
import { fetchProjectById } from "@app/hooks/api/projects/queries";
import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
-import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
import { SecretManagerLayout } from "@app/layouts/SecretManagerLayout";
export const Route = createFileRoute(
@@ -28,12 +26,7 @@ export const Route = createFileRoute(
return {
project,
- breadcrumbs: [
- {
- type: BreadcrumbTypes.Component,
- component: ProjectSelect
- }
- ]
+ breadcrumbs: []
};
}
});
diff --git a/frontend/src/pages/secret-scanning/layout.tsx b/frontend/src/pages/secret-scanning/layout.tsx
index 794df5bf78..769cc5b6ad 100644
--- a/frontend/src/pages/secret-scanning/layout.tsx
+++ b/frontend/src/pages/secret-scanning/layout.tsx
@@ -1,10 +1,8 @@
import { createFileRoute } from "@tanstack/react-router";
-import { BreadcrumbTypes } from "@app/components/v2";
import { projectKeys } from "@app/hooks/api";
import { fetchProjectById } from "@app/hooks/api/projects/queries";
import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
-import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
import { SecretScanningLayout } from "@app/layouts/SecretScanningLayout";
export const Route = createFileRoute(
@@ -26,12 +24,7 @@ export const Route = createFileRoute(
return {
project,
- breadcrumbs: [
- {
- type: BreadcrumbTypes.Component,
- component: ProjectSelect
- }
- ]
+ breadcrumbs: []
};
}
});