Skip to content

The open alternative to Salesforce, designed for AI.

Use provider names on built-in connect cards in app preferences (#29496)

nitin23a46ccf0e67
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/components/SettingsAccountGroupsEmptyState.tsx b/packages/twenty-front/src/modules/settings/app-preferences/components/SettingsAccountGroupsEmptyState.tsx
index af720df0c60..0845a378049 100644
--- a/packages/twenty-front/src/modules/settings/app-preferences/components/SettingsAccountGroupsEmptyState.tsx
+++ b/packages/twenty-front/src/modules/settings/app-preferences/components/SettingsAccountGroupsEmptyState.tsx
@@ -32,18 +32,14 @@ export const SettingsAccountGroupsEmptyState = ({
return (
<StyledCardsContainer>
- {builtInAccountApps.map((app) => {
- const appName = t(app.name);
-
- return (
- <SettingsCard
- key={app.id}
- Icon={<app.Icon size={theme.icon.size.md} />}
- title={t`Connect with ${appName}`}
- onClick={() => addBuiltInAccount(app)}
- />
- );
- })}
+ {builtInAccountApps.map((app) => (
+ <SettingsCard
+ key={app.id}
+ Icon={<app.Icon size={theme.icon.size.md} />}
+ title={t(app.connectTitle)}
+ onClick={() => addBuiltInAccount(app)}
+ />
+ ))}
{!isDefined(builtInAccountApp) && <SettingsApplicationConnectCards />}
</StyledCardsContainer>
);
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/constants/BuiltInAccountApps.ts b/packages/twenty-front/src/modules/settings/app-preferences/constants/BuiltInAccountApps.ts
index 7d8b5adcfe9..67988ee094b 100644
--- a/packages/twenty-front/src/modules/settings/app-preferences/constants/BuiltInAccountApps.ts
+++ b/packages/twenty-front/src/modules/settings/app-preferences/constants/BuiltInAccountApps.ts
@@ -14,6 +14,7 @@ export const BUILT_IN_ACCOUNT_APPS: BuiltInAccountApp[] = [
id: 'google',
name: msg`Gmail and Calendar`,
description: msg`Sync emails and calendar events from your Google accounts.`,
+ connectTitle: msg`Connect with Google`,
logo: GoogleLogo,
coverImage: GoogleCover,
Icon: IconGoogle,
@@ -42,6 +43,7 @@ export const BUILT_IN_ACCOUNT_APPS: BuiltInAccountApp[] = [
id: 'outlook',
name: msg`Outlook`,
description: msg`Sync emails and calendar events from your Microsoft accounts.`,
+ connectTitle: msg`Connect with Microsoft`,
logo: OutlookLogo,
coverImage: OutlookCover,
Icon: IconMicrosoftOutlook,
@@ -58,6 +60,7 @@ export const BUILT_IN_ACCOUNT_APPS: BuiltInAccountApp[] = [
id: 'imap',
name: msg`IMAP`,
description: msg`Sync emails and calendar events from any IMAP, SMTP and CalDAV server.`,
+ connectTitle: msg`Connect via IMAP/SMTP`,
logo: ImapLogo,
coverImage: ImapCover,
Icon: IconAt,
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/types/BuiltInAccountApp.ts b/packages/twenty-front/src/modules/settings/app-preferences/types/BuiltInAccountApp.ts
index 6c3e034acfe..d594ae39697 100644
--- a/packages/twenty-front/src/modules/settings/app-preferences/types/BuiltInAccountApp.ts
+++ b/packages/twenty-front/src/modules/settings/app-preferences/types/BuiltInAccountApp.ts
@@ -7,6 +7,7 @@ export type BuiltInAccountApp = {
id: 'google' | 'outlook' | 'imap';
name: MessageDescriptor;
description: MessageDescriptor;
+ connectTitle: MessageDescriptor;
logo: string;
coverImage: string;
Icon: IconComponent;
diff --git a/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsAccounts.stories.tsx b/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsAccounts.stories.tsx
index febf0d2df51..3169c9dc0fc 100644
--- a/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsAccounts.stories.tsx
+++ b/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsAccounts.stories.tsx
@@ -318,11 +318,11 @@ export const AccountsTabWithoutAccountsOffersConnectCards: Story = {
const canvas = within(canvasElement);
expect(
- await canvas.findByText('Connect with Gmail and Calendar', undefined, {
+ await canvas.findByText('Connect with Google', undefined, {
timeout: 3000,
}),
).toBeVisible();
- expect(canvas.getByText('Connect with Outlook')).toBeVisible();
+ expect(canvas.getByText('Connect with Microsoft')).toBeVisible();
const linearCard = await canvas.findByText(
'Connect with Linear',
undefined,
diff --git a/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsBuiltInAccountApp.stories.tsx b/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsBuiltInAccountApp.stories.tsx
index 838ee68a29f..ecb531e1b30 100644
--- a/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsBuiltInAccountApp.stories.tsx
+++ b/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsBuiltInAccountApp.stories.tsx
@@ -277,13 +277,11 @@ export const OutlookWithoutAccountOffersOutlookOnly: Story = {
const canvas = within(canvasElement);
expect(
- await canvas.findByText('Connect with Outlook', undefined, {
+ await canvas.findByText('Connect with Microsoft', undefined, {
timeout: 3000,
}),
).toBeVisible();
- expect(
- canvas.queryByText('Connect with Gmail and Calendar'),
- ).not.toBeInTheDocument();
+ expect(canvas.queryByText('Connect with Google')).not.toBeInTheDocument();
expect(canvas.queryByTestId('tab-general')).not.toBeInTheDocument();
expect(canvas.getByText('Blocklist')).toBeVisible();
},