From d66575758749cc38666da7581da53705e8244a87 Mon Sep 17 00:00:00 2001 From: Florian Zia Date: Fri, 20 Dec 2024 15:08:25 +0100 Subject: [PATCH] chore: Remove mobile menu carets --- .../(redesign)/(public)/TopNavBar.tsx | 24 ++---------- .../(redesign)/MobileShell.module.scss | 8 ++-- .../(proper_react)/(redesign)/MobileShell.tsx | 37 +++++-------------- src/app/components/server/Icons.tsx | 22 ----------- 4 files changed, 17 insertions(+), 74 deletions(-) diff --git a/src/app/(proper_react)/(redesign)/(public)/TopNavBar.tsx b/src/app/(proper_react)/(redesign)/(public)/TopNavBar.tsx index ac664e64c08..e44143439c0 100644 --- a/src/app/(proper_react)/(redesign)/(public)/TopNavBar.tsx +++ b/src/app/(proper_react)/(redesign)/(public)/TopNavBar.tsx @@ -5,14 +5,12 @@ "use client"; import { TelemetryLink } from "../../../components/client/TelemetryLink"; -import { CaretRight } from "../../../components/server/Icons"; import { useL10n } from "../../../hooks/l10n"; export const TopNavBar = (props: { styles: { readonly [key: string]: string; }; - showCaret?: boolean; }) => { const l10n = useL10n(); return ( @@ -26,10 +24,7 @@ export const TopNavBar = (props: { link_id: "navbar_how_it_works", }} > - <> - {props.showCaret && } - {l10n.getString("landing-premium-hero-navbar-link-how-it-works")} - + {l10n.getString("landing-premium-hero-navbar-link-how-it-works")}
  • @@ -40,10 +35,7 @@ export const TopNavBar = (props: { link_id: "navbar_pricing", }} > - <> - {props.showCaret && } - {l10n.getString("landing-premium-hero-navbar-link-pricing")} - + {l10n.getString("landing-premium-hero-navbar-link-pricing")}
  • @@ -55,10 +47,7 @@ export const TopNavBar = (props: { link_id: "navbar_faqs", }} > - <> - {props.showCaret && } - {l10n.getString("landing-premium-hero-navbar-link-faqs")} - + {l10n.getString("landing-premium-hero-navbar-link-faqs")}
  • @@ -69,12 +58,7 @@ export const TopNavBar = (props: { link_id: "navbar_recent_breaches", }} > - <> - {props.showCaret && } - {l10n.getString( - "landing-premium-hero-navbar-link-recent-breaches", - )} - + {l10n.getString("landing-premium-hero-navbar-link-recent-breaches")}
  • diff --git a/src/app/(proper_react)/(redesign)/MobileShell.module.scss b/src/app/(proper_react)/(redesign)/MobileShell.module.scss index 84116234a1d..fa2c3c44551 100644 --- a/src/app/(proper_react)/(redesign)/MobileShell.module.scss +++ b/src/app/(proper_react)/(redesign)/MobileShell.module.scss @@ -90,7 +90,7 @@ top: 0; height: 0; // Overlap .content - z-index: 1; + z-index: 2; .mainMenu { align-items: center; @@ -108,10 +108,9 @@ a { align-items: center; display: flex; - padding: $spacing-md $spacing-xl; + padding: $spacing-sm $spacing-lg; gap: $spacing-sm; color: $color-black; - font-weight: 700; border-top: 1px solid $color-grey-10; text-decoration: none; @@ -142,7 +141,8 @@ border-bottom: none; a { - padding: $spacing-md $spacing-2xl; + font-weight: 400; + padding: $spacing-sm $spacing-2xl; border-top: none; } } diff --git a/src/app/(proper_react)/(redesign)/MobileShell.tsx b/src/app/(proper_react)/(redesign)/MobileShell.tsx index d23b891dfd8..b55b35ff528 100644 --- a/src/app/(proper_react)/(redesign)/MobileShell.tsx +++ b/src/app/(proper_react)/(redesign)/MobileShell.tsx @@ -11,11 +11,7 @@ import { Session } from "next-auth"; import styles from "./MobileShell.module.scss"; import monitorLogo from "../images/monitor-logo.webp"; import { UpsellBadge } from "../../components/client/toolbar/UpsellBadge"; -import { - CaretRight, - CloseBigIcon, - ListIcon, -} from "../../components/server/Icons"; +import { CloseBigIcon, ListIcon } from "../../components/server/Icons"; import { UserMenu } from "../../components/client/toolbar/UserMenu"; import { useL10n } from "../../hooks/l10n"; import { PageLink } from "./PageLink"; @@ -132,10 +128,7 @@ export const MobileShell = (props: Props) => { activeClassName={styles.isActive} hasTelemetry={{ link_id: "navigation_dashboard" }} > - <> - - {l10n.getString("main-nav-link-dashboard-label")} - + {l10n.getString("main-nav-link-dashboard-label")} {props.countryCode === "us" && ( @@ -146,10 +139,7 @@ export const MobileShell = (props: Props) => { target="_blank" hasTelemetry={{ link_id: "navigation_how_it_works" }} > - <> - - {l10n.getString("main-nav-link-how-it-works-label")} - + {l10n.getString("main-nav-link-how-it-works-label")} )} @@ -160,10 +150,7 @@ export const MobileShell = (props: Props) => { target="_blank" hasTelemetry={{ link_id: "navigation_faq" }} > - <> - - {l10n.getString("main-nav-link-faq-label")} - + {l10n.getString("main-nav-link-faq-label")}
  • @@ -172,10 +159,7 @@ export const MobileShell = (props: Props) => { activeClassName={styles.isActive} hasTelemetry={{ link_id: "navigation_settings" }} > - <> - - {l10n.getString("main-nav-link-settings-label")} - + {l10n.getString("main-nav-link-settings-label")} {props.enabledFeatureFlags.includes( "SettingsPageRedesign", @@ -191,12 +175,9 @@ export const MobileShell = (props: Props) => { link_id: `navigation_settings_${submenuKey}`, }} > - <> - - {l10n.getString( - `settings-tab-label-${submenuKey}`, - )} - + {l10n.getString( + `settings-tab-label-${submenuKey}`, + )}
  • ); @@ -216,7 +197,7 @@ export const MobileShell = (props: Props) => { ) : ( - + )} diff --git a/src/app/components/server/Icons.tsx b/src/app/components/server/Icons.tsx index 9c6ae73f821..1ba3a0954de 100644 --- a/src/app/components/server/Icons.tsx +++ b/src/app/components/server/Icons.tsx @@ -688,25 +688,3 @@ export const BackArrow = (props: SVGProps & { alt: string }) => { ); }; - -// Keywords: caret, right -export const CaretRight = ( - props: SVGProps & { alt: string }, -) => { - return ( - - {props.alt && {props.alt}} - - - ); -};