From 452d854d5b89623e300218312348288d70fefb84 Mon Sep 17 00:00:00 2001
From: Tim Down <158919+timdown@users.noreply.github.com>
Date: Fri, 5 Dec 2025 09:53:53 +0000
Subject: [PATCH] Merge pull request #29972 from overleaf/td-ciam-onboarding
Unified access onboarding data collection pages
GitOrigin-RevId: c56a3d52f749883eeb2302e22aaf6bdf1239160c
---
.../web/app/views/_mixins/ciam_mixins.pug | 91 ++++++++
.../components/emails/confirm-email-form.tsx | 47 ++--
.../components/emails/downshift-input.tsx | 108 ++++++---
.../js/shared/components/ciam-stepper.tsx | 35 +++
.../js/shared/components/ds/ds-button.tsx | 4 +-
.../shared/components/ds/ds-form-checkbox.tsx | 27 +++
.../shared/components/ds/ds-form-control.tsx | 42 +++-
.../js/shared/components/ds/ds-form-radio.tsx | 27 +++
.../shared/components/ds/ds-notification.tsx | 28 +++
.../components/ds/ds-selection-group-item.tsx | 46 ++++
.../components/ds/ds-selection-group.tsx | 20 ++
.../shared/components/layouts/ciam-layout.tsx | 21 +-
.../frontend/js/shared/components/select.tsx | 118 +++++++---
.../frontend/js/shared/hooks/use-is-ciam.ts | 6 +
.../shared/{ => ds}/ds-button.stories.tsx | 2 +-
.../shared/ds/ds-form-check.stories.tsx | 27 +++
.../{ => ds}/ds-form-control.stories.tsx | 4 +-
.../shared/ds/ds-form-radio.stories.tsx | 27 +++
.../shared/ds/ds-notification.stories.tsx | 32 +++
.../shared/ds/ds-selection-group.stories.tsx | 70 ++++++
.../{ => ds}/ds-six-digits-input.stories.tsx | 2 +-
.../stories/shared/select.stories.tsx | 27 ++-
.../web/frontend/stylesheets/ciam/all.scss | 2 +
.../stylesheets/ciam/ciam-layout.scss | 139 +++++++----
.../stylesheets/ciam/ciam-onboarding.scss | 31 +++
.../stylesheets/ciam/ciam-try-premium.scss | 13 ++
.../web/frontend/stylesheets/ds/colors.scss | 220 ++++++++++++------
.../stylesheets/ds/components/all.scss | 2 +
.../ds/components/form-control.scss | 196 +++++++++++++++-
.../ds/components/notification.scss | 30 +++
.../ds/components/selection-group.scss | 40 ++++
.../pages/onboarding-confirm-email-ciam.scss | 11 +-
services/web/public/img/ciam-check-green.svg | 3 +
33 files changed, 1273 insertions(+), 225 deletions(-)
create mode 100644 services/web/app/views/_mixins/ciam_mixins.pug
create mode 100644 services/web/frontend/js/shared/components/ciam-stepper.tsx
create mode 100644 services/web/frontend/js/shared/components/ds/ds-form-checkbox.tsx
create mode 100644 services/web/frontend/js/shared/components/ds/ds-form-radio.tsx
create mode 100644 services/web/frontend/js/shared/components/ds/ds-notification.tsx
create mode 100644 services/web/frontend/js/shared/components/ds/ds-selection-group-item.tsx
create mode 100644 services/web/frontend/js/shared/components/ds/ds-selection-group.tsx
create mode 100644 services/web/frontend/js/shared/hooks/use-is-ciam.ts
rename services/web/frontend/stories/shared/{ => ds}/ds-button.stories.tsx (91%)
create mode 100644 services/web/frontend/stories/shared/ds/ds-form-check.stories.tsx
rename services/web/frontend/stories/shared/{ => ds}/ds-form-control.stories.tsx (93%)
create mode 100644 services/web/frontend/stories/shared/ds/ds-form-radio.stories.tsx
create mode 100644 services/web/frontend/stories/shared/ds/ds-notification.stories.tsx
create mode 100644 services/web/frontend/stories/shared/ds/ds-selection-group.stories.tsx
rename services/web/frontend/stories/shared/{ => ds}/ds-six-digits-input.stories.tsx (94%)
create mode 100644 services/web/frontend/stylesheets/ciam/ciam-onboarding.scss
create mode 100644 services/web/frontend/stylesheets/ciam/ciam-try-premium.scss
create mode 100644 services/web/frontend/stylesheets/ds/components/notification.scss
create mode 100644 services/web/frontend/stylesheets/ds/components/selection-group.scss
create mode 100644 services/web/public/img/ciam-check-green.svg
diff --git a/services/web/app/views/_mixins/ciam_mixins.pug b/services/web/app/views/_mixins/ciam_mixins.pug
new file mode 100644
index 0000000000..6cf7a9b986
--- /dev/null
+++ b/services/web/app/views/_mixins/ciam_mixins.pug
@@ -0,0 +1,91 @@
+include terms_of_service
+include recaptcha
+include ../../../modules/saas-authentication/app/views/_mixins
+
+mixin ciamLogo
+ header.ciam-logo
+ a.brand.overleaf-ds-logo.ciam-image-link(href='/')
+ span.visually-hidden Overleaf
+
+mixin ciamCardSeparator
+ hr.ciam-card-separator
+
+mixin ciamCardFooter
+ section.ciam-card-footer
+ +ciamCardSeparator
+ .ciam-footer-ds-logo
+ a.ciam-image-link(
+ href='https://www.digital-science.com/'
+ target='_blank'
+ rel='noopener noreferrer'
+ )
+ img(
+ src=buildImgPath('digital-science/digital-science.svg')
+ alt='Digital Science — home'
+ )
+ p
+ | !{translate('advancing_research_with', null, [{ name: 'a', attrs: { href: 'https://www.overleaf.com/', target: '_blank', rel: 'noopener noreferrer' }}, { name: 'a', attrs: { href: 'https://www.papersapp.com/', target: '_blank', rel: 'noopener noreferrer' }}])}
+
+mixin ciamTermsOfServiceAgreement
+ p
+ +termsOfServiceAgreementContent
+
+mixin ciamRecaptchaConditions
+ p
+ +recaptchaConditionsContent
+
+mixin ciamCustomFormDangerMessage(key)
+ div(
+ class='notification ciam-notification notification-type-error'
+ hidden
+ data-ol-custom-form-message=key
+ role='alert'
+ aria-live='polite'
+ )
+ .notification-icon
+ ph-warning-circle(aria-hidden='true')
+ .notification-content.text-left
+ block
+
+mixin ciamSamlErrorNotLoggedIn(error)
+ +samlErrorNotLoggedIn(error)
+ ph-warning-circle(aria-hidden='true')
+
+mixin ciamFooter
+ footer
+ .footer-links
+ a(href='https://www.overleaf.com/legal#Privacy') Privacy
+ a(href='https://www.overleaf.com/legal#Terms') Terms
+
+mixin ciamErrorNotification
+ .notification.notification-ds.notification-type-error(
+ role='alert'
+ aria-live='polite'
+ )
+ .notification-icon
+ ph-warning-circle(aria-hidden='true')
+ .notification-content-and-cta
+ .notification-content
+ block
+
+mixin ciamInfoNotification
+ .notification.notification-ds.notification-type-info(
+ role='alert'
+ aria-live='polite'
+ )
+ .notification-icon
+ ph-info(aria-hidden='true')
+ .notification-content-and-cta
+ .notification-content
+ block
+
+mixin ciamOrDivider
+ p.ciam-login-register-or-text-container= translate('login_register_or').toUpperCase()
+
+mixin ciamButtonContentLoading(loadingLabel)
+ span.button-content
+ span(data-ol-inflight='idle')
+ block
+ span.spinner-container(hidden data-ol-inflight='pending')
+ .loading-spinner-large.spinner-border.spinner-border-sm(aria-hidden='true')
+ span.visually-hidden= loadingLabel
diff --git a/services/web/frontend/js/features/settings/components/emails/confirm-email-form.tsx b/services/web/frontend/js/features/settings/components/emails/confirm-email-form.tsx
index ab9a4bfccd..40d2e683e9 100644
--- a/services/web/frontend/js/features/settings/components/emails/confirm-email-form.tsx
+++ b/services/web/frontend/js/features/settings/components/emails/confirm-email-form.tsx
@@ -7,7 +7,6 @@ import {
ComponentProps,
FormEvent,
MouseEventHandler,
- useEffect,
useState,
} from 'react'
import { Trans, useTranslation } from 'react-i18next'
@@ -21,6 +20,8 @@ import DSButton from '@/shared/components/ds/ds-button'
import CIAMSixDigitsInput from '@/features/settings/components/emails/ciam-six-digits-input'
import OLFormText from '@/shared/components/ol/ol-form-text'
import DSFormText from '@/shared/components/ds/ds-form-text'
+import { CaretRight } from '@phosphor-icons/react'
+import DSNotification from '@/shared/components/ds/ds-notification'
type Feedback = {
type: 'input' | 'alert'
@@ -177,11 +178,11 @@ export function ConfirmEmailForm({
if (successRedirectPath && successButtonText && successMessage) {
return (
-