From 69896f4c8b8e963e31d4d04ecb90fb77a5cb401d Mon Sep 17 00:00:00 2001 From: Tim Down <158919+timdown@users.noreply.github.com> Date: Tue, 4 Mar 2025 09:21:32 +0000 Subject: [PATCH] Merge pull request #23872 from overleaf/td-bs5-compromised-password-page Migrate compromised password page to Bootstrap 5 GitOrigin-RevId: fed58659cdeb12ba16bdd08c0c91c629a71ac169 --- .../web/app/src/Features/User/UserPagesController.mjs | 10 +++++++++- .../app/views/project/editor/socket_diagnostics.pug | 2 -- services/web/app/views/user/addSecondaryEmail.pug | 2 -- services/web/app/views/user/compromised_password.pug | 4 ++-- .../components/compromised-password-root.tsx | 6 +++--- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/services/web/app/src/Features/User/UserPagesController.mjs b/services/web/app/src/Features/User/UserPagesController.mjs index 512dbc43be..d7bf00aed7 100644 --- a/services/web/app/src/Features/User/UserPagesController.mjs +++ b/services/web/app/src/Features/User/UserPagesController.mjs @@ -309,7 +309,15 @@ const UserPagesController = { ) }, - compromisedPasswordPage(_, res) { + async compromisedPasswordPage(req, res) { + // Populates splitTestVariants with a value for the split test name and allows + // Pug to read it + await SplitTestHandler.promises.getAssignment( + req, + res, + 'bs5-misc-pages-platform' + ) + res.render('user/compromised_password') }, diff --git a/services/web/app/views/project/editor/socket_diagnostics.pug b/services/web/app/views/project/editor/socket_diagnostics.pug index 7093bc8343..841f4b517b 100644 --- a/services/web/app/views/project/editor/socket_diagnostics.pug +++ b/services/web/app/views/project/editor/socket_diagnostics.pug @@ -10,8 +10,6 @@ block vars block entrypointVar - entrypoint = 'pages/socket-diagnostics' -block append meta - block content main.content.content-alt#main-content #socket-diagnostics diff --git a/services/web/app/views/user/addSecondaryEmail.pug b/services/web/app/views/user/addSecondaryEmail.pug index 643a740b27..00cb1ad607 100644 --- a/services/web/app/views/user/addSecondaryEmail.pug +++ b/services/web/app/views/user/addSecondaryEmail.pug @@ -7,8 +7,6 @@ block vars block entrypointVar - entrypoint = 'pages/user/add-secondary-email' -block append meta - block content main.content.content-alt #add-secondary-email diff --git a/services/web/app/views/user/compromised_password.pug b/services/web/app/views/user/compromised_password.pug index 376da0fe2a..27b85b718a 100644 --- a/services/web/app/views/user/compromised_password.pug +++ b/services/web/app/views/user/compromised_password.pug @@ -4,12 +4,12 @@ block vars - var suppressNavbar = true - var suppressFooter = true - var suppressGoogleAnalytics = true + - bootstrap5PageStatus = 'enabled' + - bootstrap5PageSplitTest = 'bs5-misc-pages-platform' block entrypointVar - entrypoint = 'pages/compromised-password' -block append meta - block content main.content.content-alt#main-content #compromised-password diff --git a/services/web/frontend/js/features/compromised-password/components/compromised-password-root.tsx b/services/web/frontend/js/features/compromised-password/components/compromised-password-root.tsx index accd302567..e16755f078 100644 --- a/services/web/frontend/js/features/compromised-password/components/compromised-password-root.tsx +++ b/services/web/frontend/js/features/compromised-password/components/compromised-password-root.tsx @@ -1,5 +1,5 @@ import useWaitForI18n from '@/shared/hooks/use-wait-for-i18n' -import { Button } from 'react-bootstrap' +import OLButton from '@/features/ui/components/ol/ol-button' import { Trans, useTranslation } from 'react-i18next' import { Interstitial } from '@/shared/components/interstitial' @@ -31,9 +31,9 @@ export function CompromisedPasswordCard() { />

- + ) }