Sfoglia il codice sorgente

Merge pull request #30641 from overleaf/ac-uniaccessphase1-teardown

[web] Tear down split-test `uniaccessphase1`

GitOrigin-RevId: ef1726034362c7a0e95fb881d398fe39156713a5
Antoine Clausse 6 mesi fa
parent
commit
e36b12ea1b

+ 0 - 5
services/web/.storybook/utils/with-split-tests.tsx

@@ -5,11 +5,6 @@ import { SplitTestContext } from '@/shared/context/split-test-context'
 export const defaultSplitTestsArgTypes = {
   // to be able to use this utility, you need to add the argTypes for each split test in this object
   // Check the original implementation for an example: https://github.com/overleaf/internal/pull/17809
-  uniaccessphase1: {
-    description: 'Enable CIAM designs',
-    control: { type: 'select' as const },
-    options: ['default', 'enabled'],
-  },
 }
 
 export const withSplitTests = <ArgTypes = typeof defaultSplitTestsArgTypes,>(

+ 3 - 21
services/web/app/src/Features/PasswordReset/PasswordResetController.mjs

@@ -9,7 +9,7 @@ import OError from '@overleaf/o-error'
 import EmailsHelper from '../Helpers/EmailHelper.mjs'
 import { expressify } from '@overleaf/promise-utils'
 import { z, parseReq } from '../../infrastructure/Validation.mjs'
-import SplitTestHandler from '../SplitTests/SplitTestHandler.mjs'
+import Features from '../../infrastructure/Features.mjs'
 
 const setNewUserPasswordSchema = z.object({
   body: z.object({
@@ -195,10 +195,6 @@ async function renderSetPasswordForm(req, res, next) {
           params.append('email', email)
         }
       }
-      if (req.query.uniaccessphase1) {
-        // Preserve uniaccessphase1 flag in the redirect so it can be tested
-        params.append('uniaccessphase1', req.query.uniaccessphase1)
-      }
       const queryString = params.toString() ? `?${params.toString()}` : ''
       return res.redirect('/user/password/set' + queryString)
     } catch (err) {
@@ -219,16 +215,8 @@ async function renderSetPasswordForm(req, res, next) {
   const passwordResetToken = req.session.resetToken
   delete req.session.resetToken
 
-  const ciamAssignment = await SplitTestHandler.promises.getAssignment(
-    req,
-    res,
-    'uniaccessphase1'
-  )
-
   res.render(
-    ciamAssignment.variant === 'enabled'
-      ? 'user/setPasswordCiam'
-      : 'user/setPassword',
+    Features.hasFeature('saas') ? 'user/setPasswordCiam' : 'user/setPassword',
     {
       title: 'set_password',
       email,
@@ -251,14 +239,8 @@ async function renderRequestResetForm(req, res) {
     error = 'password_reset_token_expired'
   }
 
-  const ciamAssignment = await SplitTestHandler.promises.getAssignment(
-    req,
-    res,
-    'uniaccessphase1'
-  )
-
   res.render(
-    ciamAssignment.variant === 'enabled'
+    Features.hasFeature('saas')
       ? 'user/passwordResetCiam'
       : 'user/passwordReset',
     {

+ 0 - 2
services/web/frontend/extracted-translations.json

@@ -545,8 +545,6 @@
   "email_address_is_invalid": "",
   "email_already_registered": "",
   "email_attribute": "",
-  "email_confirmed_onboarding": "",
-  "email_confirmed_onboarding_message": "",
   "email_does_not_belong_to_university": "",
   "email_limit_reached": "",
   "email_link_expired": "",

+ 0 - 16
services/web/frontend/js/shared/components/layouts/content-layout.tsx

@@ -1,16 +0,0 @@
-import React, { FC, ReactNode } from 'react'
-
-type Props = { children: ReactNode; isMain?: boolean; alt?: boolean }
-
-const ContentLayout: FC<Props> = ({ children, isMain, alt }: Props) => {
-  const className = alt ? 'content content-alt' : 'content'
-  return isMain ? (
-    <main className={className} id="main-content">
-      {children}
-    </main>
-  ) : (
-    <div className={className}>{children}</div>
-  )
-}
-
-export default ContentLayout

+ 0 - 27
services/web/frontend/js/shared/components/stepper.tsx

@@ -1,27 +0,0 @@
-import classNames from 'classnames'
-import { useTranslation } from 'react-i18next'
-
-export function Stepper({ steps, active }: { steps: number; active: number }) {
-  const { t } = useTranslation()
-  return (
-    <div
-      className="stepper"
-      role="progressbar"
-      aria-label={t('progress_bar_percentage')}
-      aria-valuenow={active + 1}
-      aria-valuemax={steps}
-      tabIndex={0}
-    >
-      {Array.from({ length: steps }).map((_, i) => (
-        <div
-          key={i}
-          className={classNames({
-            step: true,
-            active: i === active,
-            completed: i < active,
-          })}
-        />
-      ))}
-    </div>
-  )
-}

+ 0 - 6
services/web/frontend/js/shared/hooks/use-is-ciam.ts

@@ -1,6 +0,0 @@
-import { useSplitTestContext } from '@/shared/context/split-test-context'
-
-export default function useIsCiam() {
-  const { splitTestVariants } = useSplitTestContext()
-  return splitTestVariants.uniaccessphase1 === 'enabled'
-}

+ 0 - 1
services/web/frontend/stylesheets/components/all.scss

@@ -39,7 +39,6 @@
 @import 'dev-toolbar';
 @import 'tos';
 @import 'collapsible-file-header';
-@import 'stepper';
 @import 'radio-chip';
 @import 'panel-heading';
 @import 'menu-bar';

+ 0 - 20
services/web/frontend/stylesheets/components/stepper.scss

@@ -1,20 +0,0 @@
-.stepper {
-  display: flex;
-  gap: var(--spacing-05);
-  width: 100%;
-  height: 6px;
-
-  .step {
-    width: 100%;
-    border-radius: 6px;
-    background: var(--neutral-20);
-  }
-
-  .step.completed {
-    background: var(--green-50);
-  }
-
-  .step.active {
-    background: var(--green-20);
-  }
-}

+ 0 - 3
services/web/frontend/stylesheets/pages/all.scss

@@ -46,17 +46,14 @@
 @import 'homepage';
 @import 'auth';
 @import 'login-register';
-@import 'login';
 @import 'register';
 @import 'plans';
-@import 'onboarding-confirm-email';
 @import 'onboarding-confirm-email-ciam';
 @import 'secondary-confirm-email';
 @import 'onboarding';
 @import 'admin/admin';
 @import 'admin/project-url-lookup';
 @import 'add-secondary-email-prompt';
-@import 'try-premium';
 @import 'bonus';
 @import 'portals';
 @import 'wiki';

+ 0 - 31
services/web/frontend/stylesheets/pages/auth.scss

@@ -27,14 +27,6 @@
   margin-top: var(--spacing-04);
 }
 
-.login-overleaf-logo-container {
-  display: block;
-  padding: var(--spacing-06);
-  text-align: center;
-  padding-top: var(--spacing-13);
-  padding-bottom: var(--spacing-09);
-}
-
 .login-register-container {
   max-width: 400px;
   margin: 0 auto;
@@ -97,26 +89,3 @@
     padding-bottom: 0;
   }
 }
-
-.sso-auth-login-container {
-  max-width: 400px;
-  margin: 0 auto;
-  padding: 0 var(--spacing-06);
-
-  h1 {
-    font-size: var(--font-size-07);
-    line-height: var(--line-height-06);
-  }
-
-  .login-register-text {
-    font-size: var(--font-size-02);
-  }
-
-  .email-label {
-    padding-top: var(--spacing-06);
-  }
-
-  .login-register-other-links {
-    padding-top: var(--spacing-09);
-  }
-}

+ 0 - 48
services/web/frontend/stylesheets/pages/login.scss

@@ -1,48 +0,0 @@
-.login-container {
-  max-width: 320px;
-  margin: 0 auto;
-  padding-top: var(--spacing-11);
-  text-align: center;
-  padding-bottom: 125px; // to prevent cookie banner from covering the bottom text of the page on mobile
-
-  h1 {
-    margin-bottom: 0;
-
-    @include heading-sm;
-  }
-
-  .explanatory-ciam-notification .notification-content {
-    text-align: left;
-  }
-
-  form {
-    padding-top: var(--spacing-08);
-
-    input {
-      height: 35px;
-    }
-  }
-
-  .login-other-link {
-    padding: var(--spacing-08) 0;
-
-    p {
-      margin-bottom: 0;
-    }
-
-    .login-text {
-      padding-bottom: 0;
-    }
-  }
-
-  .login-text {
-    padding-bottom: var(--spacing-08);
-    margin-bottom: 0;
-
-    @include body-sm;
-  }
-
-  .recaptcha-branding {
-    @include body-xs;
-  }
-}

+ 0 - 27
services/web/frontend/stylesheets/pages/onboarding-confirm-email.scss

@@ -1,27 +0,0 @@
-#onboarding-confirm-email {
-  .confirm-email-form .confirm-email-form-inner {
-    margin: auto;
-    max-width: 480px;
-
-    .notification {
-      margin-bottom: var(--spacing-05);
-    }
-
-    .text-danger {
-      display: flex;
-      gap: var(--spacing-03);
-      padding: var(--spacing-02);
-    }
-
-    .form-label {
-      font-weight: normal;
-    }
-
-    .form-actions {
-      margin-top: var(--spacing-07);
-      display: flex;
-      flex-direction: column;
-      gap: var(--spacing-05);
-    }
-  }
-}

+ 0 - 124
services/web/frontend/stylesheets/pages/onboarding.scss

@@ -1,127 +1,3 @@
-.onboarding-data-collection-wrapper {
-  max-width: 730px;
-  margin: 0 auto;
-  display: flex;
-  flex-direction: column;
-  gap: 10px;
-
-  .d-block,
-  .select-wrapper {
-    label {
-      font-size: 14px; // override DownshiftInput and Select component label size
-    }
-
-    .select-items {
-      max-height: 150px;
-    }
-
-    .select-trigger {
-      border: 1px solid var(--neutral-60);
-      color: var(--neutral-60);
-    }
-  }
-
-  p {
-    font-size: 16px;
-    margin-bottom: var(--spacing-06);
-  }
-
-  .logo {
-    width: 130px;
-    margin: 0 auto;
-  }
-
-  form {
-    display: flex;
-    flex-direction: column;
-    gap: var(--spacing-08);
-
-    .group-horizontal {
-      display: flex;
-      justify-content: stretch;
-      gap: var(--spacing-08);
-
-      @include media-breakpoint-down(md) {
-        flex-direction: column;
-        gap: 0;
-      }
-
-      .form-group {
-        flex-grow: 1;
-      }
-    }
-
-    .form-actions {
-      display: flex;
-      justify-content: space-between;
-
-      > div {
-        display: flex;
-        align-items: center;
-        gap: var(--spacing-04);
-      }
-    }
-  }
-}
-
-.onboarding-data-collection-form {
-  background: var(--bg-light-primary);
-  padding: var(--spacing-08);
-  display: flex;
-  flex-direction: column;
-  gap: var(--spacing-08);
-}
-
-.onboarding-question-title {
-  font-size: 20px;
-  border-bottom: none;
-  margin-bottom: var(--spacing-08);
-}
-
-.onboarding-step-2 {
-  .radio-group {
-    height: 240px;
-  }
-
-  .form-check {
-    margin: 0;
-
-    p {
-      margin-bottom: 0;
-    }
-
-    label {
-      display: flex;
-      align-items: center;
-      gap: var(--spacing-04);
-
-      input {
-        margin-right: var(--spacing-02);
-      }
-    }
-  }
-}
-
-.onboarding-collapse-button {
-  display: flex;
-  align-items: center;
-  cursor: pointer;
-  color: var(--blue-50);
-  user-select: none;
-}
-
-.onboarding-privacy-extended {
-  @include media-breakpoint-down(md) {
-    padding: 0 var(--spacing-08);
-  }
-}
-
-.onboarding-data-collection-form-margin {
-  @include media-breakpoint-down(md) {
-    margin-bottom: 100px;
-  }
-}
-
 .compromised-password-content {
   display: flex;
   flex-direction: column;

+ 0 - 46
services/web/frontend/stylesheets/pages/register.scss

@@ -11,52 +11,6 @@
     margin-bottom: 0;
   }
 
-  .register-content-container {
-    padding: 0; // override bootstrap padding
-    display: flex;
-    background-color: #f2f4f7;
-    min-height: 100vh;
-  }
-
-  .register-form-container {
-    display: flex;
-    justify-content: center;
-    padding-top: var(--spacing-11);
-    background-color: var(--white);
-
-    @include media-breakpoint-down(lg) {
-      height: 100%;
-    }
-
-    .register-form {
-      text-align: center;
-      max-width: 320px;
-      padding-bottom: 120px;
-
-      .notification-content p {
-        text-align: left;
-      }
-
-      .registration-message {
-        .registration-message-heading {
-          color: var(--neutral-70);
-          font-size: var(--font-size-05);
-          line-height: var(--line-height-04);
-          margin-top: var(--spacing-08);
-          margin-bottom: var(--spacing-05);
-        }
-
-        .registration-message-details {
-          font-size: var(--font-size-02);
-        }
-      }
-
-      .tos-agreement-notice {
-        text-align: left;
-      }
-    }
-  }
-
   .register-illustration-container {
     height: 100%;
     display: flex;

+ 0 - 42
services/web/frontend/stylesheets/pages/try-premium.scss

@@ -1,42 +0,0 @@
-.try-premium-page {
-  .try-premium-logo-container {
-    padding: 0 var(--spacing-08);
-    display: flex;
-    justify-content: space-evenly;
-  }
-
-  .try-premium-third-party-logo {
-    width: 36px;
-    height: 36px;
-  }
-
-  .try-premium-page-list-wrapper {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    padding-bottom: var(--spacing-06);
-  }
-
-  .try-premium-page-list {
-    padding-inline-start: 0;
-    display: flex;
-    align-items: center;
-    flex-direction: column;
-
-    @media (min-width: var(--bs-breakpoint-sm)) {
-      flex-direction: row;
-      justify-content: space-between;
-      width: 100%;
-      max-width: 500px;
-    }
-
-    ul {
-      margin-bottom: 0;
-      width: 300px;
-
-      @media (min-width: var(--bs-breakpoint-sm)) {
-        width: unset;
-      }
-    }
-  }
-}

+ 0 - 5
services/web/locales/en.json

@@ -471,7 +471,6 @@
   "create_a_new_password_for_your_account": "Create a new password for your account",
   "create_a_new_project": "Create a new project",
   "create_account": "Create account",
-  "create_an_account": "Create an account",
   "create_first_admin_account": "Create the first Admin account",
   "create_new_account": "Create new account",
   "create_new_subscription": "Create new subscription",
@@ -691,8 +690,6 @@
   "email_already_registered_secondary": "This email is already registered as a secondary email",
   "email_already_registered_sso": "This email is already registered. Please log in to your account another way and link your account to the new provider via your account settings.",
   "email_attribute": "Email attribute",
-  "email_confirmed_onboarding": "Great! Let’s get you set up",
-  "email_confirmed_onboarding_message": "Your email address is confirmed. Click <0>Continue</0> to finish your setup.",
   "email_does_not_belong_to_university": "We don’t recognize that domain as being affiliated with your university. Please contact us to add the affiliation.",
   "email_limit_reached": "You can have a maximum of <0>__emailAddressLimit__ email addresses</0> on this account. To add another email address, please delete an existing one.",
   "email_link_expired": "Email link expired, please request a new one.",
@@ -897,7 +894,6 @@
   "get_most_subscription_by_checking_overleaf_ai_writefull": "Get the most out of your subscription by checking out <0>Overleaf’s features</0>, <1>Overleaf’s AI features</1> and <2>Writefull’s features</2>.",
   "get_real_time_track_changes": "Get real-time track changes",
   "get_the_best_overleaf_experience": "Get the best Overleaf experience",
-  "get_the_most_out_headline": "Get the most out of __appName__ with features such as:",
   "git": "Git",
   "git_authentication_token": "Git authentication token",
   "git_authentication_token_create_modal_info_1": "This is your Git authentication token. You should enter this when prompted for a password.",
@@ -1350,7 +1346,6 @@
   "login_to_accept_invitation": "Log in to accept invitation",
   "login_to_overleaf": "Log in to Overleaf",
   "login_with_service": "Log in with __service__",
-  "login_with_sso": "Log in to Overleaf with SSO",
   "logs": "Logs",
   "logs_and_output_files": "Logs and output files",
   "longer_compile_timeout": "Longer <0>compile timeout</0>",