From 926df069b1b65e8b7af94496f54aa7537270b79f Mon Sep 17 00:00:00 2001 From: Anastasiia Stavitskaya Date: Wed, 23 Oct 2024 13:57:49 -0700 Subject: [PATCH 1/2] refactor: update SuiteSelectorSuiteLink with a and href to handle right-click --- .../GlobalNavigation/SuiteSelector/SuiteSelectorSuiteLink.tsx | 4 ++-- .../GlobalNavigation/SuiteSelector/suite-selector.css | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/navigation/GlobalNavigation/SuiteSelector/SuiteSelectorSuiteLink.tsx b/src/components/navigation/GlobalNavigation/SuiteSelector/SuiteSelectorSuiteLink.tsx index 539cb246f..d7bdb25e7 100644 --- a/src/components/navigation/GlobalNavigation/SuiteSelector/SuiteSelectorSuiteLink.tsx +++ b/src/components/navigation/GlobalNavigation/SuiteSelector/SuiteSelectorSuiteLink.tsx @@ -45,12 +45,12 @@ export function SuiteSelectorSuiteLink(props: ISuiteSelectorSuiteLinkProps) { return ( <> -
+ {elementNameMap[props.link.linkId]} -
+ ) diff --git a/src/components/navigation/GlobalNavigation/SuiteSelector/suite-selector.css b/src/components/navigation/GlobalNavigation/SuiteSelector/suite-selector.css index eb34a7659..167db0e84 100644 --- a/src/components/navigation/GlobalNavigation/SuiteSelector/suite-selector.css +++ b/src/components/navigation/GlobalNavigation/SuiteSelector/suite-selector.css @@ -4,6 +4,7 @@ } .suiteSelector__link { + display: block; padding: var(--padding-sm) 0; border-radius: var(--border-radius-lg); color: var(--color-text-base); @@ -15,6 +16,7 @@ .suiteSelector__link:not(.suiteSelector__link--active, .suiteSelector__link--disabled):hover { background-color: var(--color-primary-bg-hover); border-color: var(--color-primary-bg-hover); + color: var(--color-text-base); } .suiteSelector__link:not(.suiteSelector__link--active, .suiteSelector__link--disabled):hover .suiteSelector__suiteLogo { @@ -23,6 +25,7 @@ .suiteSelector__link.suiteSelector__link--active { border-color: var(--color-border); + color: var(--color-text-base); } .suiteSelector__link.suiteSelector__link--disabled { From 028311164b350fa77079a8c5efc963153ab01b0a Mon Sep 17 00:00:00 2001 From: Anastasiia Stavitskaya Date: Thu, 24 Oct 2024 10:36:36 -0700 Subject: [PATCH 2/2] chore: disable click on disabled link --- .../navigation/GlobalNavigation/SuiteSelector/suite-selector.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/navigation/GlobalNavigation/SuiteSelector/suite-selector.css b/src/components/navigation/GlobalNavigation/SuiteSelector/suite-selector.css index 167db0e84..f84fdfefa 100644 --- a/src/components/navigation/GlobalNavigation/SuiteSelector/suite-selector.css +++ b/src/components/navigation/GlobalNavigation/SuiteSelector/suite-selector.css @@ -29,6 +29,7 @@ } .suiteSelector__link.suiteSelector__link--disabled { + pointer-events: none; cursor: default; color: var(--color-text-disabled); }