From 425344b40b663dc3d552277c3d76408dc6689b42 Mon Sep 17 00:00:00 2001 From: roo hutton Date: Fri, 4 Jul 2025 10:38:30 +0100 Subject: [PATCH] Merge pull request #26806 from overleaf/rh-friendly-group-name-dash Use friendly group plan name in project dash tooltip GitOrigin-RevId: bb4e763c2fe0b8cb5d2f8ac0adf2a8cd956ddd0c --- .../current-plan-widget/group-plan.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx b/services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx index 16596c5929..ff0fc1420a 100644 --- a/services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx +++ b/services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx @@ -8,6 +8,18 @@ type GroupPlanProps = Pick< 'subscription' | 'plan' | 'remainingTrialDays' | 'featuresPageURL' > +function getFriendlyPlanName(planName: string): string { + if (planName.toLowerCase().includes('professional')) { + return 'Professional' + } else if (planName.toLowerCase().includes('collaborator')) { + return 'Standard' + } + // fallback on plan name + else { + return planName + } +} + function GroupPlan({ featuresPageURL, subscription, @@ -16,6 +28,7 @@ function GroupPlan({ }: GroupPlanProps) { const { t } = useTranslation() const planNameComponent = + const friendlyPlanName = getFriendlyPlanName(plan.name) const currentPlanLabel = remainingTrialDays >= 0 ? ( remainingTrialDays === 1 ? ( @@ -43,10 +56,10 @@ function GroupPlan({ description={ subscription.teamName != null ? t('group_plan_with_name_tooltip', { - plan: plan.name, + plan: friendlyPlanName, groupName: subscription.teamName, }) - : t('group_plan_tooltip', { plan: plan.name }) + : t('group_plan_tooltip', { plan: friendlyPlanName }) } id="group-plan" overlayProps={{ placement: 'bottom' }}