From 461bc0eeb1beda7859c1105fd9a3086ce4cf566b Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Wed, 22 Jul 2026 10:02:35 -0700 Subject: [PATCH] Revert "Add persistent mobile home link (#258)" This reverts commit 3abe875d510aec9c0cf432b584f1c28107e4fbcc. --- .../src/components/app-layout/NavBar.test.tsx | 32 +++++++----- frontend/src/components/app-layout/NavBar.tsx | 49 +++---------------- frontend/src/components/app-layout/styles.tsx | 5 +- 3 files changed, 28 insertions(+), 58 deletions(-) diff --git a/frontend/src/components/app-layout/NavBar.test.tsx b/frontend/src/components/app-layout/NavBar.test.tsx index cce0e6cc..a390d4bc 100644 --- a/frontend/src/components/app-layout/NavBar.test.tsx +++ b/frontend/src/components/app-layout/NavBar.test.tsx @@ -1,31 +1,37 @@ -import { screen } from "@testing-library/react"; +import { render, screen } from "@testing-library/react"; import { describe, it, expect } from "vitest"; import NavBar from "./NavBar"; -import { renderWithProviders } from "../../tests/test-utils"; describe("NavBar", () => { - it("renders an explicit homepage link", () => { - renderWithProviders(); + it("renders Working Groups link with correct URL", () => { + render(); - const homeLink = screen.getByRole("link", { - name: /gpu mode home/i, + const workingGroupsLink = screen.getByRole("link", { + name: /working groups/i, }); - expect(homeLink).toHaveAttribute("href", "/home"); - expect(homeLink).toHaveTextContent("Home"); + expect(workingGroupsLink).toBeInTheDocument(); + expect(workingGroupsLink).toHaveAttribute("href", "/working-groups"); + // Internal link should not have target="_blank" or rel="noopener" + expect(workingGroupsLink).not.toHaveAttribute("target", "_blank"); + expect(workingGroupsLink).not.toHaveAttribute("rel", "noopener"); }); it("renders all expected navigation links in correct order", () => { - renderWithProviders(); + render(); const links = screen.getAllByRole("link"); const navigationLinks = links.filter((link) => - ["News", "Events", "Projects"].includes(link.textContent || ""), + ["News", "Working Groups", "Events", "Resources", "Docs"].includes( + link.textContent || "", + ), ); - expect(navigationLinks).toHaveLength(3); + expect(navigationLinks).toHaveLength(5); expect(navigationLinks[0]).toHaveTextContent("News"); - expect(navigationLinks[1]).toHaveTextContent("Events"); - expect(navigationLinks[2]).toHaveTextContent("Projects"); + expect(navigationLinks[1]).toHaveTextContent("Working Groups"); + expect(navigationLinks[2]).toHaveTextContent("Events"); + expect(navigationLinks[3]).toHaveTextContent("Resources"); + expect(navigationLinks[4]).toHaveTextContent("Docs"); }); }); diff --git a/frontend/src/components/app-layout/NavBar.tsx b/frontend/src/components/app-layout/NavBar.tsx index 541503ca..8f10edbf 100644 --- a/frontend/src/components/app-layout/NavBar.tsx +++ b/frontend/src/components/app-layout/NavBar.tsx @@ -4,7 +4,6 @@ import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward"; import LightModeIcon from "@mui/icons-material/LightMode"; import DarkModeIcon from "@mui/icons-material/DarkMode"; import SettingsBrightnessIcon from "@mui/icons-material/SettingsBrightness"; -import HomeRoundedIcon from "@mui/icons-material/HomeRounded"; import { useTheme } from "@mui/material/styles"; import { flexRowCenter, @@ -61,42 +60,15 @@ export default function NavBar() { ]; const Brand = () => ( - - - - - Home - - + + + @@ -108,19 +80,12 @@ export default function NavBar() { return ( - + {/* Left: Brand */} {/* Middle: Links */} - + {links.map(({ label, href, external }) => ( = { ...flexRowCenter, ...mediumText, fontWeight: "bold", - flexShrink: 0, - ml: { xs: 0, sm: -2 }, // Keep the mobile home control fully visible + ml: -2, // Negative left margin to reduce space from left edge mr: { - xs: 1, // margin on extra-small screens + xs: 2, // margin on extra-small screens sm: 4, // margin on small screens md: 8, // margin on medium screens lg: 16, // margin on large screens