Files
twenty/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewEmails.ts
T
Raphaël Bosi 8f7d6c24dd Add v2 onboarding import contacts page and unify the onboarding v2 shell (#22212)
<img width="3024" height="1668" alt="CleanShot 2026-06-26 at 13 29
28@2x"
src="https://github.com/user-attachments/assets/9bdd0029-45eb-4ddb-859f-eaab9bb61406"
/>

Adds the new v2 onboarding **Import contacts** step (email + calendar
import), shown right after workspace creation in the v2 flow. The
presentational page was designed in a previous PR; this wires it in and
unifies the shell.

**What changed**
- Reuses and unifies the existing v2 onboarding shell: extracts
`OnboardingV2Layout` + `OnboardingV2Header` (the back + logo header, now
with the free-credits pill), and the `SignInUpV2` workspace-creation
step renders through it (old `SignInUpV2Header` removed).
- New `SyncEmailsV2` route (`/sync/emails-v2`) under `BlankLayout`,
wired to the same OAuth/skip hooks as v1 `SyncEmails`.
- The `SYNC_EMAIL` step routes to the new page only when
`isOnboardingV2` is set (mirrors the existing `WorkspaceActivation` →
`WorkspaceActivationV2` branch); the v1 modal is unchanged for the
non-v2 flow.
- No backend changes — reuses the `SYNC_EMAIL` status and
`skipSyncEmailOnboardingStep` mutation.

**Reviewer notes**
- Connect defaults to `METADATA` (private) visibility to match the "Only
you will be able to see your emails and events" note (v1 had a selector
defaulting to `SHARE_EVERYTHING`).
- The header free-credits pill shows `0` for now (no current-workspace
credits source on the frontend yet).
- The back button is hidden on the import page (no meaningful "back"
after workspace creation); unchanged on the workspace-creation step.
2026-06-26 12:54:52 +00:00

55 lines
1.3 KiB
TypeScript

export type ImportContactsPreviewEmail = {
id: string;
sender: string;
subject: string;
date: string;
isUnread: boolean;
};
export const IMPORT_CONTACTS_PREVIEW_EMAILS = [
{
id: 'acme',
sender: 'Acme Inc.',
subject: 'Insights: The latest in industrial equipment and tools',
date: 'Feb, 26',
isUnread: false,
},
{
id: 'dylan-field',
sender: 'Dylan Field',
subject:
'Lorem ipsum dolor sit amet consectetur. Ac eget eu eget ullamcorper tellus sem scelerisque sit ante.',
date: '12/12/23',
isUnread: false,
},
{
id: 'dario-amodei',
sender: 'Dario Amodei',
subject:
'Delta Weekly News: Learn about important safety tips before you fly!',
date: 'Jan, 26',
isUnread: true,
},
{
id: 'ivan-zhao',
sender: 'Ivan Zhao',
subject: 'Our latest Adventures and Destinations',
date: 'March, 26',
isUnread: false,
},
{
id: 'brian-chesky',
sender: 'Brian Chesky',
subject: 'Insights: Industry trends and best practices',
date: 'Jan, 26',
isUnread: false,
},
{
id: 'stewart-butterfield',
sender: 'Stewart Butterfield',
subject: 'Our Complete list of Recipe Ideas and Restaurant Reviews!',
date: 'Jan, 26',
isUnread: false,
},
] satisfies ImportContactsPreviewEmail[];