From a655e31774e8008afd06f4125095a90480c9cccb Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Mon, 10 Jul 2023 19:20:53 +0000 Subject: [PATCH 1/2] refactor(site): adjust the proxy menu design --- site/src/components/Navbar/NavbarView.tsx | 56 ++++++++++--------- .../ProxyStatusLatency/ProxyStatusLatency.tsx | 3 +- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/site/src/components/Navbar/NavbarView.tsx b/site/src/components/Navbar/NavbarView.tsx index cb3d522a84e59..c3bfdc1131b04 100644 --- a/site/src/components/Navbar/NavbarView.tsx +++ b/site/src/components/Navbar/NavbarView.tsx @@ -29,6 +29,7 @@ import { HelpTooltipText, HelpTooltipTitle, } from "components/Tooltips/HelpTooltip" +import Typography from "@mui/material/Typography" export const USERS_LINK = `/users?filter=${encodeURIComponent("status:active")}` @@ -191,7 +192,6 @@ export const NavbarView: FC = ({ const ProxyMenu: FC<{ proxyContextValue: ProxyContextValue }> = ({ proxyContextValue, }) => { - const styles = useStyles() const buttonRef = useRef(null) const [isOpen, setIsOpen] = useState(false) const [refetchDate, setRefetchDate] = useState() @@ -275,33 +275,39 @@ const ProxyMenu: FC<{ proxyContextValue: ProxyContextValue }> = ({ onClose={closeMenu} sx={{ "& .MuiMenu-paper": { py: 1 } }} > - { - // Stop the menu from closing - e.stopPropagation() + -
+ Reduce workspace latency by selecting the region nearest you. - {/* This was always on a newline below the text. This puts it on the same line. - It still doesn't look great, but it is marginally better. */} - - Workspace Proxy Selection - - Only applies to web connections. Local ssh connections will - automatically select the nearest region based on latency. - - -
-
+ + theme.palette.text.secondary, + lineHeight: "inherit", + marginTop: 0.5, + }} + > + * Only applies to web connections. Local ssh connections will + automatically select the nearest region based on latency. + + theme.palette.divider }} /> {proxyContextValue.proxies?.map((proxy) => ( From 72a4caf994bb2634ab620264cab394368d36bfd0 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Mon, 10 Jul 2023 19:47:13 +0000 Subject: [PATCH 2/2] Remove unused imports --- site/src/components/Navbar/NavbarView.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/site/src/components/Navbar/NavbarView.tsx b/site/src/components/Navbar/NavbarView.tsx index c3bfdc1131b04..a2ae924fbb039 100644 --- a/site/src/components/Navbar/NavbarView.tsx +++ b/site/src/components/Navbar/NavbarView.tsx @@ -24,11 +24,6 @@ import Skeleton from "@mui/material/Skeleton" import { BUTTON_SM_HEIGHT } from "theme/theme" import { ProxyStatusLatency } from "components/ProxyStatusLatency/ProxyStatusLatency" import { usePermissions } from "hooks/usePermissions" -import { - HelpTooltip, - HelpTooltipText, - HelpTooltipTitle, -} from "components/Tooltips/HelpTooltip" import Typography from "@mui/material/Typography" export const USERS_LINK = `/users?filter=${encodeURIComponent("status:active")}`