Skip to content

The open alternative to Salesforce, designed for AI.

feat(billing): show Early tag with tooltip on legacy plan column (#29030)

Etienneb8d2fb6c15a6
diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTable.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTable.tsx
index 34e99039622..82a46a71e6b 100644
--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTable.tsx
+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTable.tsx
@@ -17,6 +17,7 @@ import {
} from 'twenty-ui/components/input';
import { Button } from 'twenty-ui/primitives/input';
import { Tag } from 'twenty-ui/primitives/data-display';
+import { Tooltip } from 'twenty-ui/primitives/surfaces';
import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';
import { SubscriptionInterval } from '~/generated-metadata/graphql';
@@ -221,7 +222,13 @@ export const SettingsBillingPlanComparisonTable = ({
}: Pick<SettingsBillingComparedPlan, 'isLegacy' | 'planKey'>) => (
<>
<StyledPlanName>{t(BILLING_PLAN_LABELS[planKey])}</StyledPlanName>
- {isLegacy && <Tag color="gray">{t`Legacy`}</Tag>}
+ {isLegacy && (
+ <Tooltip
+ content={t`Early plan - You keep this price as long as you stay on it. It can't be picked again after you switch.`}
+ >
+ <Tag color="purple" truncate={false}>{t`Early`}</Tag>
+ </Tooltip>
+ )}
</>
);
diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/__stories__/SettingsBillingPlanComparisonTable.stories.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/__stories__/SettingsBillingPlanComparisonTable.stories.tsx
index eeacbe3416b..097cf385b2b 100644
--- a/packages/twenty-front/src/modules/settings/billing/components/internal/__stories__/SettingsBillingPlanComparisonTable.stories.tsx
+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/__stories__/SettingsBillingPlanComparisonTable.stories.tsx
@@ -105,7 +105,7 @@ export const WithLegacyPlan: Story = {
{
action: { disabled: true, title: 'Current', variant: 'outline' },
isLegacy: true,
- planKey: BillingPlanKey.PRO,
+ planKey: BillingPlanKey.ENTERPRISE,
},
{
action: {
@@ -130,7 +130,7 @@ export const WithLegacyPlan: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
- await expect(canvas.getAllByText('Legacy')[0]).toBeVisible();
+ await expect(canvas.getAllByText('Early')[0]).toBeVisible();
await expect(
canvas.getAllByRole('button', { name: 'Upgrade' }),
).toHaveLength(2);