From efe4cb1f66b5b772be8873de74d8ca90f058b410 Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Wed, 4 Feb 2026 00:28:38 +1100 Subject: [PATCH] feat: refactor `Admin Settings` (#21781) This pull-request ensures that we're using `` in the `Admin Settings` button as things weren't uniform before. This is inline with the Figma design with the darker ("black") background. This has an added side-benefit of removing some MUI-specific code. --- .../dashboard/Navbar/DeploymentDropdown.tsx | 111 +++++------------- .../UserDropdown/UserDropdownContent.tsx | 2 +- 2 files changed, 32 insertions(+), 81 deletions(-) diff --git a/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx b/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx index 1ab9bc5f2a..11b4854f62 100644 --- a/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx +++ b/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx @@ -1,16 +1,14 @@ -import { css, type Interpolation, type Theme } from "@emotion/react"; -import MenuItem from "@mui/material/MenuItem"; import { Button } from "components/Button/Button"; import { - Popover, - PopoverClose, - PopoverContent, - PopoverTrigger, -} from "components/Popover/Popover"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "components/DropdownMenu/DropdownMenu"; import { ChevronDownIcon } from "lucide-react"; import { linkToAuditing } from "modules/navigation"; import type { FC } from "react"; -import { NavLink } from "react-router"; +import { Link } from "react-router"; interface DeploymentDropdownProps { canViewDeployment: boolean; @@ -41,18 +39,15 @@ export const DeploymentDropdown: FC = ({ } return ( - - + + - + - + = ({ canViewHealth={canViewHealth} canViewAIBridge={canViewAIBridge} /> - - + + ); }; @@ -77,79 +72,35 @@ const DeploymentDropdownContent: FC = ({ return ( ); }; - -const styles = { - menuItem: (theme) => css` - text-decoration: none; - color: inherit; - gap: 8px; - padding: 8px 20px; - font-size: 14px; - - &:hover { - background-color: ${theme.palette.action.hover}; - transition: background-color 0.3s ease; - } - `, - menuItemIcon: (theme) => ({ - color: theme.palette.text.secondary, - width: 20, - height: 20, - }), -} satisfies Record>; diff --git a/site/src/modules/dashboard/Navbar/UserDropdown/UserDropdownContent.tsx b/site/src/modules/dashboard/Navbar/UserDropdown/UserDropdownContent.tsx index 4fea4acf19..44529260c8 100644 --- a/site/src/modules/dashboard/Navbar/UserDropdown/UserDropdownContent.tsx +++ b/site/src/modules/dashboard/Navbar/UserDropdown/UserDropdownContent.tsx @@ -6,9 +6,9 @@ import { } from "@emotion/react"; import Divider from "@mui/material/Divider"; import MenuItem from "@mui/material/MenuItem"; -import { PopoverClose } from "@radix-ui/react-popover"; import type * as TypesGen from "api/typesGenerated"; import { CopyButton } from "components/CopyButton/CopyButton"; +import { PopoverClose } from "components/Popover/Popover"; import { Stack } from "components/Stack/Stack"; import { Tooltip,