From 218c376f3721bc223ae1902c92b4577d2df43374 Mon Sep 17 00:00:00 2001 From: Kristina <7614497+khjrtbrg@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:10:30 +0100 Subject: [PATCH] [web] tear down group-pricing-2025 split test on non-plans pages (#22785) * [web] rm split test from the change to group modal * [web] rm split test from cancel flow * [web] rm split test from checkout flow * [web] rm unused translations GitOrigin-RevId: 0188f2631ed18e79fdf55dabedac7cdea4f213d3 --- .../Subscription/SubscriptionController.js | 1 - .../web/frontend/extracted-translations.json | 6 +- .../cancel-plan/cancel-subscription.tsx | 4 - .../modals/change-to-group-modal.tsx | 87 ++++--------------- services/web/locales/en.json | 6 +- .../active/change-plan/change-plan.test.tsx | 17 ++-- 6 files changed, 24 insertions(+), 97 deletions(-) diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index a9b505ade1..187e049f21 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -55,7 +55,6 @@ async function userSubscriptionPage(req, res) { res, 'bootstrap-5-subscription' ) - await SplitTestHandler.promises.getAssignment(req, res, 'group-pricing-2025') const results = await SubscriptionViewModelBuilder.promises.buildUsersSubscriptionViewModel( diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 130a748b0c..0f7a458ed5 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -444,7 +444,6 @@ "editor_theme": "", "educational_disclaimer": "", "educational_disclaimer_heading": "", - "educational_discount_for_groups_of_x_or_more": "", "educational_percent_discount_applied": "", "email": "", "email_address": "", @@ -832,8 +831,7 @@ "let_us_know_how_we_can_help": "", "let_us_know_what_you_think": "", "library": "", - "license_for_educational_purposes": "", - "license_for_educational_purposes_2025": "", + "license_for_educational_purposes_confirmation": "", "limited_offer": "", "limited_to_n_editors": "", "limited_to_n_editors_per_project": "", @@ -1099,7 +1097,6 @@ "pending_addon_cancellation": "", "pending_invite": "", "per_user": "", - "percent_discount_for_groups": "", "percent_is_the_percentage_of_the_line_width": "", "permanently_disables_the_preview": "", "personal_library": "", @@ -1329,7 +1326,6 @@ "save_or_cancel-cancel": "", "save_or_cancel-or": "", "save_or_cancel-save": "", - "save_x_percent_or_more": "", "saving": "", "saving_notification_with_seconds": "", "search": "", diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/cancel-plan/cancel-subscription.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/cancel-plan/cancel-subscription.tsx index 1b1a3dcf3f..c50666b3fc 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/cancel-plan/cancel-subscription.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/states/active/cancel-plan/cancel-subscription.tsx @@ -16,7 +16,6 @@ import { useLocation } from '../../../../../../../shared/hooks/use-location' import { debugConsole } from '@/utils/debugging' import OLButton from '@/features/ui/components/ol/ol-button' import moment from 'moment' -import { getSplitTestVariant } from '@/utils/splitTestUtils' import OLNotification from '@/features/ui/components/ol/ol-notification' const planCodeToDowngradeTo = 'paid-personal' @@ -160,8 +159,6 @@ export function CancelSubscription() { isSuccessSecondaryAction || isSuccessCancel - const groupPricingVariant = getSplitTestVariant('group-pricing-2025') - if (!personalSubscription || !('recurly' in personalSubscription)) return null const showDowngrade = showDowngradeOption( @@ -179,7 +176,6 @@ export function CancelSubscription() { const startDate = moment.utc(personalSubscription.recurly.account.created_at) const pricingChangeEffectiveDate = moment.utc('2025-01-08T12:00:00Z') const displayPricingWarning = - groupPricingVariant === 'enabled' && personalSubscription.plan.groupPlan && startDate.isBefore(pricingChangeEffectiveDate) diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx index c5deba1765..96fe6a3dfe 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx @@ -25,10 +25,8 @@ import OLButton from '@/features/ui/components/ol/ol-button' import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' import OLNotification from '@/features/ui/components/ol/ol-notification' import { bsVersion } from '@/features/utils/bootstrap-5' -import { useFeatureFlag } from '@/shared/context/split-test-context' const educationalPercentDiscount = 40 -const groupSizeForEducationalDiscount = 10 function GroupPlanCollaboratorCount({ planCode }: { planCode: string }) { const { t } = useTranslation() @@ -47,34 +45,6 @@ function GroupPlanCollaboratorCount({ planCode }: { planCode: string }) { return null } -function EducationDiscountAppliedOrNot({ - groupSize, - showGroupPricing2025, -}: { - groupSize: string - showGroupPricing2025: boolean -}) { - const { t } = useTranslation() - const size = parseInt(groupSize) - if (size >= groupSizeForEducationalDiscount || showGroupPricing2025) { - return ( -
- {t('educational_percent_discount_applied', { - percent: educationalPercentDiscount, - })} -
- ) - } - - return ( -- {t('educational_discount_for_groups_of_x_or_more', { - size: groupSizeForEducationalDiscount, - })} -
- ) -} - function GroupPrice({ groupPlanToChangeToPrice, queryingGroupPlanToChangeToPrice, @@ -152,7 +122,6 @@ export function ChangeToGroupModal() { const [error, setError] = useState(false) const [inflight, setInflight] = useState(false) const location = useLocation() - const showGroupPricing2025 = useFeatureFlag('group-pricing-2025') async function upgrade() { setError(false) @@ -203,14 +172,6 @@ export function ChangeToGroupModal() {+ {t('educational_percent_discount_applied', { + percent: educationalPercentDiscount, + })} +
)}