From 7ec327cb56691425262d7a32d5f0b152ef4b567f Mon Sep 17 00:00:00 2001 From: Jimmy Domagala-Tang Date: Thu, 22 Feb 2024 11:48:43 -0800 Subject: [PATCH] Merge pull request #17277 from overleaf/jpa-hide-old-writefull-banner [web] hide old Writefull banner when the extension is already installed GitOrigin-RevId: 35a1a3f6e8dd5860d81ea61ea01c40419454d40c --- .../components/notifications/user-notifications.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx b/services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx index 58b64cb199..39995ab7b1 100644 --- a/services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx +++ b/services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx @@ -58,9 +58,13 @@ function UserNotifications() { return false } + const hasWritefullExtensionAlreadyInstalled = + window.writefull?.type === 'extension' + const show = user?.writefull?.enabled === true || // show to any users who have writefull enabled regardless of split test (!writefullIntegrationSplitTestEnabled && // show old banner to users who are not in the split test, who are on chrome and havent dismissed + !hasWritefullExtensionAlreadyInstalled && isChromium() && getMeta('ol-showWritefullPromoBanner'))