From 49f5bf2aef367cd735573d86de50a10a31f91e14 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Tue, 25 Nov 2025 14:01:33 -0800 Subject: [PATCH 1/3] improvement: refactor and update nav bar styling --- frontend/src/components/v2/Tabs/Tabs.tsx | 4 +- frontend/src/helpers/appConnections.ts | 2 +- .../hooks/api/appConnections/types/index.ts | 2 +- frontend/src/layouts/KmsLayout/KmsLayout.tsx | 4 +- .../components/NavBar/Navbar.tsx | 117 ++++++++---------- .../components/OrgNavBar/OrgNavBar.tsx | 6 +- frontend/src/layouts/PamLayout/PamLayout.tsx | 4 +- .../PkiManagerLayout/PkiManagerLayout.tsx | 4 +- .../ProjectSelect/ProjectSelect.tsx | 22 ++-- .../SecretManagerLayout.tsx | 4 +- .../SecretScanningLayout.tsx | 4 +- frontend/src/layouts/SshLayout/SshLayout.tsx | 4 +- .../DNSMadeEasyConnectionForm.tsx | 4 +- 13 files changed, 87 insertions(+), 94 deletions(-) diff --git a/frontend/src/components/v2/Tabs/Tabs.tsx b/frontend/src/components/v2/Tabs/Tabs.tsx index ebe8eb2ed..47b3d08cd 100644 --- a/frontend/src/components/v2/Tabs/Tabs.tsx +++ b/frontend/src/components/v2/Tabs/Tabs.tsx @@ -47,8 +47,8 @@ export const Tab = ({ }) => ( { const location = useLocation(); return ( -
-
+
+
{ } }, [subscription, isBillingPage, isModalIntrusive]); - const matches = useRouterState({ select: (s) => s.matches.at(-1)?.context }); - const breadcrumbs = matches && "breadcrumbs" in matches ? matches.breadcrumbs : undefined; - const handleOrgChange = async (orgId: string) => { queryClient.removeQueries({ queryKey: authKeys.getAuthToken }); queryClient.removeQueries({ queryKey: projectKeys.getAllUserProjects() }); @@ -249,7 +245,9 @@ export const Navbar = () => { const isServerAdminPanel = location.pathname.startsWith("/admin"); - const isProjectScope = location.pathname.startsWith(`/organizations/${currentOrg.id}/projects`); + const isProjectScope = + location.pathname.startsWith(`/organizations/${currentOrg.id}/projects`) && + location.pathname !== `/organizations/${currentOrg.id}/projects`; const handleOrgNav = async (org: Organization) => { if (currentOrg?.id === org.id) return; @@ -279,64 +277,59 @@ export const Navbar = () => { }; return ( -
-
+
+
infisical logo
-

/

+

/

{isServerAdminPanel ? ( - <> - - -
Server Console
- -

/

- {breadcrumbs ? ( - // scott: remove /admin as we show server console above - - ) : null} - + + +
Server Console
+ ) : ( <> -
+
+ {/* scott: the below is used to hide the top border from the org nav bar */} + {!isProjectScope && !isSubOrganization && ( +
+
+
+ )} -
- svg]:!text-org" - )} +
+ + + {currentOrg?.name} + + + Organization -
- {getPlan(subscription)} -
{subscription.cardDeclined && ( { )} {isProjectScope && ( <> -

/

- {breadcrumbs ? ( - - ) : null} +

/

+ )} )}
- {subscription && subscription.slug === "starter" && !subscription.has_used_trial && ( + + {subscription && subscription.slug === "starter" && !subscription.has_used_trial ? ( + ) : ( +
+ {getPlan(subscription)} +
)} {/* eslint-disable-next-line no-nested-ternary */} {!location.pathname.startsWith("/admin") ? ( diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/OrgNavBar.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/OrgNavBar.tsx index 24f4acafe..e56c02cee 100644 --- a/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/OrgNavBar.tsx +++ b/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/OrgNavBar.tsx @@ -19,9 +19,9 @@ export const OrgNavBar = ({ isHidden }: Props) => { const variant = isRootOrganization ? "org" : "namespace"; return ( - <> +
{!isHidden && ( -
+
{ isOpen={popUp?.createOrg?.isOpen} onClose={() => handlePopUpToggle("createOrg", false)} /> - +
); }; diff --git a/frontend/src/layouts/PamLayout/PamLayout.tsx b/frontend/src/layouts/PamLayout/PamLayout.tsx index f04357a88..365d3c3eb 100644 --- a/frontend/src/layouts/PamLayout/PamLayout.tsx +++ b/frontend/src/layouts/PamLayout/PamLayout.tsx @@ -29,8 +29,8 @@ export const PamLayout = () => { return ( <> -
-
+
+
{ const location = useLocation(); return ( -
-
+
+
{ }, [projects, projectFavorites, currentWorkspace]); return ( -
+
+ {/* scott: the below is used to hide the top border from the org nav bar */} +
+
+
{ projectId: currentWorkspace.id, orgId: currentWorkspace.orgId }} - className="group flex cursor-pointer items-center gap-x-1.5 overflow-hidden hover:text-white" + className="group flex cursor-pointer items-center gap-x-2 overflow-hidden pt-0.5 text-sm text-white" > -

- {currentWorkspace?.name} -

- - - - {currentWorkspace.type ? PROJECT_TYPE_NAME[currentWorkspace.type] : "Project"} - + + {currentWorkspace?.name} + + {currentWorkspace.type ? PROJECT_TYPE_NAME[currentWorkspace.type] : "Project"} @@ -118,7 +118,7 @@ export const ProjectSelect = () => { variant="plain" colorSchema="secondary" ariaLabel="switch-project" - className="px-2 py-1" + className="top-px px-2 py-1" > diff --git a/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx b/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx index 162260959..0a8d3adbc 100644 --- a/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx +++ b/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx @@ -39,8 +39,8 @@ export const SecretManagerLayout = () => { (secretApprovalReqCount?.open || 0) + (accessApprovalRequestCount?.pendingCount || 0); return ( -
-
+
+
{ ); return ( -
-
+
+
{ const location = useLocation(); return ( -
-
+
+
Date: Tue, 25 Nov 2025 16:25:59 -0800 Subject: [PATCH 2/3] style: adjust nav bar badge breakpoints --- .../src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx | 2 +- .../ProjectLayout/components/ProjectSelect/ProjectSelect.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx index e28111efc..e55bdfc09 100644 --- a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx +++ b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx @@ -327,7 +327,7 @@ export const Navbar = () => { {currentOrg?.name} - + Organization {subscription.cardDeclined && ( diff --git a/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx b/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx index 609610264..45325d22d 100644 --- a/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx +++ b/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx @@ -108,7 +108,7 @@ export const ProjectSelect = () => { > {currentWorkspace?.name} - + {currentWorkspace.type ? PROJECT_TYPE_NAME[currentWorkspace.type] : "Project"} From b607545c2f9d0cbc03946859eaedfdfa1fcceda0 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Tue, 25 Nov 2025 17:48:08 -0800 Subject: [PATCH 3/3] style: switch to chevrons and move org badge inside button --- .../components/NavBar/Navbar.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx index e55bdfc09..e4b475551 100644 --- a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx +++ b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx @@ -23,7 +23,7 @@ import { import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { Link, useLocation, useNavigate, useRouter } from "@tanstack/react-router"; -import { UserPlusIcon } from "lucide-react"; +import { ChevronRight, UserPlusIcon } from "lucide-react"; import { twMerge } from "tailwind-merge"; import { Mfa } from "@app/components/auth/Mfa"; @@ -279,12 +279,12 @@ export const Navbar = () => { return (
-
+
infisical logo
-

/

+ {isServerAdminPanel ? ( { > {currentOrg?.name} + + Organization + - - Organization - {subscription.cardDeclined && ( { )} {isProjectScope && ( <> -

/

+ )}