Răsfoiți Sursa

Merge pull request #17432 from overleaf/jpa-wf-switch-split-test

[web] fully adopt writefull-oauth-promotion split-test

GitOrigin-RevId: b37491bc18e7cc65ec2fc8e8ced140df9f8a6048
Jakob Ackermann 2 ani în urmă
părinte
comite
1a6ac06bed

+ 1 - 1
services/web/app/src/Features/Project/ProjectListController.js

@@ -360,7 +360,7 @@ async function projectListPage(req, res, next) {
   await SplitTestHandler.promises.getAssignment(
   await SplitTestHandler.promises.getAssignment(
     req,
     req,
     res,
     res,
-    'writefull-integration'
+    'writefull-oauth-promotion'
   )
   )
 
 
   let showInrGeoBanner = false
   let showInrGeoBanner = false

+ 1 - 1
services/web/app/src/Features/User/UserPagesController.js

@@ -86,7 +86,7 @@ async function settingsPage(req, res) {
   await SplitTestHandler.promises.getAssignment(
   await SplitTestHandler.promises.getAssignment(
     req,
     req,
     res,
     res,
-    'writefull-integration'
+    'writefull-oauth-promotion'
   )
   )
 
 
   let personalAccessTokens
   let personalAccessTokens

+ 5 - 5
services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx

@@ -45,8 +45,8 @@ function UserNotifications() {
   )
   )
   const showInrGeoBanner = getMeta('ol-showInrGeoBanner', false)
   const showInrGeoBanner = getMeta('ol-showInrGeoBanner', false)
   const showBrlGeoBanner = getMeta('ol-showBrlGeoBanner', false)
   const showBrlGeoBanner = getMeta('ol-showBrlGeoBanner', false)
-  const writefullIntegrationSplitTestEnabled = isSplitTestEnabled(
-    'writefull-integration'
+  const writefullOauthPromotionSplitTestEnabled = isSplitTestEnabled(
+    'writefull-oauth-promotion'
   )
   )
   const user = getMeta('ol-user')
   const user = getMeta('ol-user')
 
 
@@ -61,7 +61,7 @@ function UserNotifications() {
 
 
     const show =
     const show =
       user?.writefull?.enabled === true || // show to any users who have writefull enabled regardless of split test
       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
+      (!writefullOauthPromotionSplitTestEnabled && // show old banner to users who are not in the split test, who are on chrome and havent dismissed
         isChromium() &&
         isChromium() &&
         getMeta('ol-showWritefullPromoBanner'))
         getMeta('ol-showWritefullPromoBanner'))
 
 
@@ -71,7 +71,7 @@ function UserNotifications() {
         page: '/project',
         page: '/project',
         name:
         name:
           user?.writefull?.enabled === true ||
           user?.writefull?.enabled === true ||
-          writefullIntegrationSplitTestEnabled
+          writefullOauthPromotionSplitTestEnabled
             ? 'writefull-premium'
             ? 'writefull-premium'
             : 'writefull',
             : 'writefull',
       })
       })
@@ -84,7 +84,7 @@ function UserNotifications() {
   const hasWritefullExtensionAlreadyInstalled =
   const hasWritefullExtensionAlreadyInstalled =
     window.writefull?.type === 'extension'
     window.writefull?.type === 'extension'
   const usesWritefullIntegration =
   const usesWritefullIntegration =
-    writefullIntegrationSplitTestEnabled || user?.writefull?.enabled
+    writefullOauthPromotionSplitTestEnabled || user?.writefull?.enabled
   const writefullBannerVariant =
   const writefullBannerVariant =
     hasWritefullExtensionAlreadyInstalled || usesWritefullIntegration
     hasWritefullExtensionAlreadyInstalled || usesWritefullIntegration
       ? 'plans-page'
       ? 'plans-page'

+ 1 - 1
services/web/frontend/js/features/settings/components/linking-section.tsx

@@ -59,7 +59,7 @@ function LinkingSection() {
   // even if they arent in the split test, if they have it enabled let them toggle it off
   // even if they arent in the split test, if they have it enabled let them toggle it off
   const user = getMeta('ol-user')
   const user = getMeta('ol-user')
   const shouldLoadWritefull =
   const shouldLoadWritefull =
-    (splitTestVariants['writefull-integration'] === 'enabled' ||
+    (splitTestVariants['writefull-oauth-promotion'] === 'enabled' ||
       user.writefull?.enabled === true) &&
       user.writefull?.enabled === true) &&
     !window.writefull // check if the writefull extension is installed, in which case we dont handle the integration
     !window.writefull // check if the writefull extension is installed, in which case we dont handle the integration
 
 

+ 4 - 4
services/web/test/frontend/features/project-list/components/notifications.test.tsx

@@ -977,10 +977,10 @@ describe('<UserNotifications />', function () {
       window.metaAttributesCache = window.metaAttributesCache || new Map()
       window.metaAttributesCache = window.metaAttributesCache || new Map()
     })
     })
 
 
-    describe('when writefull-integration split test is not enabled', function () {
+    describe('when writefull-oauth-promotion split test is not enabled', function () {
       beforeEach(function () {
       beforeEach(function () {
         window.metaAttributesCache.set('ol-splitTestVariants', {
         window.metaAttributesCache.set('ol-splitTestVariants', {
-          'writefull-integration': 'default',
+          'writefull-oauth-promotion': 'default',
         })
         })
         window.metaAttributesCache.set('ol-user', {
         window.metaAttributesCache.set('ol-user', {
           writefull: { enabled: false },
           writefull: { enabled: false },
@@ -1017,10 +1017,10 @@ describe('<UserNotifications />', function () {
       })
       })
     })
     })
 
 
-    describe('when writefull-integration split test is enabled', function () {
+    describe('when writefull-oauth-promotion split test is enabled', function () {
       beforeEach(function () {
       beforeEach(function () {
         window.metaAttributesCache.set('ol-splitTestVariants', {
         window.metaAttributesCache.set('ol-splitTestVariants', {
-          'writefull-integration': 'enabled',
+          'writefull-oauth-promotion': 'enabled',
         })
         })
       })
       })