From 835dbb0ab12f96a64e9f985b78fc80a67b3d3586 Mon Sep 17 00:00:00 2001 From: Antoine Clausse Date: Wed, 25 Sep 2024 12:12:31 +0200 Subject: [PATCH] [web] Migrate `/user/subscription/canceled` to BS5 (#20590) * [web] Initialize BS5 in subscription page * [web] Backend wiring for `/user/subscription/canceled` to BS5 * [web] Backend `Canceled` to BS5 GitOrigin-RevId: 660458145c06e0d2dd1343186d31b6a7662b01a0 --- .../Subscription/SubscriptionController.js | 9 +++-- .../canceled-subscription-react.pug | 4 +++ .../canceled-subscription/canceled.tsx | 36 +++++++++++-------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index cd9b0c3ad5..11db6e6395 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -458,7 +458,12 @@ function cancelSubscription(req, res, next) { * @param {import('express').NextFunction} next * @returns {Promise} */ -function canceledSubscription(req, res, next) { +async function canceledSubscription(req, res, next) { + await SplitTestHandler.promises.getAssignment( + req, + res, + 'bootstrap-5-subscription' + ) return res.render('subscriptions/canceled-subscription-react', { title: 'subscription_canceled', }) @@ -753,7 +758,7 @@ module.exports = { interstitialPaymentPage: expressify(interstitialPaymentPage), successfulSubscription: expressify(successfulSubscription), cancelSubscription, - canceledSubscription, + canceledSubscription: expressify(canceledSubscription), cancelV1Subscription, updateSubscription, cancelPendingSubscriptionChange, diff --git a/services/web/app/views/subscriptions/canceled-subscription-react.pug b/services/web/app/views/subscriptions/canceled-subscription-react.pug index 9cd6d7b9f8..16e5283f7c 100644 --- a/services/web/app/views/subscriptions/canceled-subscription-react.pug +++ b/services/web/app/views/subscriptions/canceled-subscription-react.pug @@ -1,5 +1,9 @@ extends ../layout-marketing +block vars + - bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly' + - bootstrap5PageSplitTest = 'bootstrap-5-subscription' + block entrypointVar - entrypoint = 'pages/user/subscription/canceled-subscription' diff --git a/services/web/frontend/js/features/subscription/components/canceled-subscription/canceled.tsx b/services/web/frontend/js/features/subscription/components/canceled-subscription/canceled.tsx index 989ceba31a..10274ce09d 100644 --- a/services/web/frontend/js/features/subscription/components/canceled-subscription/canceled.tsx +++ b/services/web/frontend/js/features/subscription/components/canceled-subscription/canceled.tsx @@ -1,25 +1,31 @@ import { useTranslation } from 'react-i18next' -import { Col, Row, Alert } from 'react-bootstrap' +import OLRow from '@/features/ui/components/ol/ol-row' +import OLCol from '@/features/ui/components/ol/ol-col' +import OLCard from '@/features/ui/components/ol/ol-card' +import OLNotification from '@/features/ui/components/ol/ol-notification' function Canceled() { const { t } = useTranslation() return (
- - -
+ + +

{t('subscription_canceled')}

- -

- {t('to_modify_your_subscription_go_to')}  - - {t('manage_subscription')}. - -

-
+ + {t('to_modify_your_subscription_go_to')}  + + {t('manage_subscription')}. + +

+ } + />

-
- -
+ + +
) }