From 4eee7cd6ef909e2bfa0d4a8885d8e9f4e4cb2a6d Mon Sep 17 00:00:00 2001 From: Kristina <7614497+khjrtbrg@users.noreply.github.com> Date: Wed, 2 Jul 2025 14:42:42 +0200 Subject: [PATCH] [web] rm annual-prices-monthly-rates split test (#26727) * [web] rm annual-prices-monthly-rates split test - rm monthly rates treatment - rm unused translations - rm unused supporting functions - rm unused styles GitOrigin-RevId: 5901853245cd9b01ee9e4774154d29ae8f5fcae5 --- .../Subscription/SubscriptionHelper.js | 22 ------------------- .../web/frontend/stylesheets/app/plans.less | 4 ---- .../stylesheets/bootstrap-5/pages/plans.scss | 4 ---- services/web/locales/en.json | 2 -- services/web/scripts/plan-prices/plans.mjs | 5 ----- .../Subscription/SubscriptionHelperTests.js | 20 ----------------- 6 files changed, 57 deletions(-) diff --git a/services/web/app/src/Features/Subscription/SubscriptionHelper.js b/services/web/app/src/Features/Subscription/SubscriptionHelper.js index 429432349d..0a93fa3479 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionHelper.js +++ b/services/web/app/src/Features/Subscription/SubscriptionHelper.js @@ -23,17 +23,6 @@ function shouldPlanChangeAtTermEnd(oldPlan, newPlan, isInTrial) { return oldPlan.price_in_cents > newPlan.price_in_cents } -/** - * This is duplicated in: - * - services/web/scripts/plan-prices/plans.mjs - * - services/web/modules/subscriptions/frontend/js/pages/plans/group-member-picker/group-plan-pricing.js - * @param {number} number - * @returns {number} - */ -function roundUpToNearest5Cents(number) { - return Math.ceil(number * 20) / 20 -} - /** * @import { CurrencyCode } from '../../../../types/subscription/currency' */ @@ -48,7 +37,6 @@ function roundUpToNearest5Cents(number) { * @typedef {Object} LocalizedGroupPrice * @property {PlanToPrice} price * @property {PlanToPrice} pricePerUser - * @property {PlanToPrice} pricePerUserPerMonth */ /** @@ -65,17 +53,11 @@ function generateInitialLocalizedGroupPrice(recommendedCurrency, locale) { INITIAL_LICENSE_SIZE ].price_in_cents / 100 const collaboratorPricePerUser = collaboratorPrice / INITIAL_LICENSE_SIZE - const collaboratorPricePerUserPerMonth = roundUpToNearest5Cents( - collaboratorPrice / INITIAL_LICENSE_SIZE / 12 - ) const professionalPrice = GroupPlansData.enterprise.professional[recommendedCurrency][ INITIAL_LICENSE_SIZE ].price_in_cents / 100 const professionalPricePerUser = professionalPrice / INITIAL_LICENSE_SIZE - const professionalPricePerUserPerMonth = roundUpToNearest5Cents( - professionalPrice / INITIAL_LICENSE_SIZE / 12 - ) /** * @param {number} price @@ -93,10 +75,6 @@ function generateInitialLocalizedGroupPrice(recommendedCurrency, locale) { collaborator: formatPrice(collaboratorPricePerUser), professional: formatPrice(professionalPricePerUser), }, - pricePerUserPerMonth: { - collaborator: formatPrice(collaboratorPricePerUserPerMonth), - professional: formatPrice(professionalPricePerUserPerMonth), - }, } } diff --git a/services/web/frontend/stylesheets/app/plans.less b/services/web/frontend/stylesheets/app/plans.less index 127f102b6e..47bd2603c3 100644 --- a/services/web/frontend/stylesheets/app/plans.less +++ b/services/web/frontend/stylesheets/app/plans.less @@ -1049,10 +1049,6 @@ .plans-card-price-container-mobile { display: flex; align-items: baseline; - - .light-gray-text:has(.billed-annually-disclaimer) { - align-self: center; - } } .group-plans-card-price-container-mobile { diff --git a/services/web/frontend/stylesheets/bootstrap-5/pages/plans.scss b/services/web/frontend/stylesheets/bootstrap-5/pages/plans.scss index 65b1e8b12c..b24ae34b71 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/pages/plans.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/pages/plans.scss @@ -1081,10 +1081,6 @@ $z-index-group-member-picker-list: 1; .plans-card-price-container-mobile { display: flex; align-items: baseline; - - .light-gray-text:has(.billed-annually-disclaimer) { - align-self: center; - } } .group-plans-card-price-container-mobile { diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 7e7d42c184..85833c3e18 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -236,7 +236,6 @@ "beta_program_opt_in_action": "Opt-In to Beta Program", "beta_program_opt_out_action": "Opt-Out of Beta Program", "bibliographies": "Bibliographies", - "billed_annually": "billed annually", "billed_annually_at": "Billed annually at <0>__price__ <1>(includes plan and any add-ons)", "billed_monthly_at": "Billed monthly at <0>__price__ <1>(includes plan and any add-ons)", "billed_yearly": "billed yearly", @@ -1626,7 +1625,6 @@ "per_month": "per month", "per_month_billed_annually": "per month, billed annually", "per_month_x_annually": "per month, __price__ annually", - "per_user_month": "per user / month", "per_user_year": "per user / year", "per_year": "per year", "percent_is_the_percentage_of_the_line_width": "% is the percentage of the line width", diff --git a/services/web/scripts/plan-prices/plans.mjs b/services/web/scripts/plan-prices/plans.mjs index 122b2c5683..6d67214d11 100644 --- a/services/web/scripts/plan-prices/plans.mjs +++ b/services/web/scripts/plan-prices/plans.mjs @@ -64,11 +64,6 @@ const currencies = [ 'USD', ] -/** - * This is duplicated in: - * - services/web/app/src/Features/Subscription/SubscriptionHelper.js - * - services/web/modules/subscriptions/frontend/js/pages/plans-new-design/group-member-picker/group-plan-pricing.js - */ function roundUpToNearest5Cents(number) { return Math.ceil(number * 20) / 20 } diff --git a/services/web/test/unit/src/Subscription/SubscriptionHelperTests.js b/services/web/test/unit/src/Subscription/SubscriptionHelperTests.js index fb667ca451..4c618221ca 100644 --- a/services/web/test/unit/src/Subscription/SubscriptionHelperTests.js +++ b/services/web/test/unit/src/Subscription/SubscriptionHelperTests.js @@ -184,10 +184,6 @@ describe('SubscriptionHelper', function () { collaborator: '5 CHF', professional: '50 CHF', }, - pricePerUserPerMonth: { - collaborator: '0,45 CHF', - professional: '4,20 CHF', - }, }) }) }) @@ -209,10 +205,6 @@ describe('SubscriptionHelper', function () { collaborator: '10 kr.', professional: '100 kr.', }, - pricePerUserPerMonth: { - collaborator: '0,85 kr.', - professional: '8,35 kr.', - }, }) }) }) @@ -234,10 +226,6 @@ describe('SubscriptionHelper', function () { collaborator: '15 kr', professional: '150 kr', }, - pricePerUserPerMonth: { - collaborator: '1,25 kr', - professional: '12,50 kr', - }, }) }) }) @@ -261,10 +249,6 @@ describe('SubscriptionHelper', function () { collaborator: 'kr 20', professional: 'kr 200', }, - pricePerUserPerMonth: { - collaborator: 'kr 1.70', - professional: 'kr 16.70', - }, }) }) }) @@ -286,10 +270,6 @@ describe('SubscriptionHelper', function () { collaborator: '$25', professional: '$250', }, - pricePerUserPerMonth: { - collaborator: '$2.10', - professional: '$20.85', - }, }) }) })