Skip to content

The open alternative to Salesforce, designed for AI.

Organize twenty-website product-feature into folder structure (#21999)

Abdullah.6a4dc37c6d65
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual.tsx b/packages/twenty-website/src/sections/product-feature/ContactsVisual/ContactsVisual.tsx
similarity index 52%
rename from packages/twenty-website/src/sections/product-feature/ContactsVisual.tsx
rename to packages/twenty-website/src/sections/product-feature/ContactsVisual/ContactsVisual.tsx
index 44ff83f67f0..383fcb0835b 100644
--- a/packages/twenty-website/src/sections/product-feature/ContactsVisual.tsx
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/ContactsVisual.tsx
@@ -3,34 +3,19 @@
import { msg } from '@lingui/core/macro';
import { useLingui } from '@lingui/react';
import { styled } from '@linaria/react';
-import {
- IconApi,
- IconBuildingFactory2,
- IconBuildingSkyscraper,
- IconCheck,
- IconLink,
- IconMapPin,
- IconMoneybag,
- IconPlus,
- IconRobot,
- IconSettingsAutomation,
- IconTarget,
- IconUser,
- IconUserCircle,
- IconX,
-} from '@tabler/icons-react';
+import { IconCheck, IconPlus } from '@tabler/icons-react';
import { useState } from 'react';
import { THEME_LIGHT } from 'twenty-ui/theme';
-import { sharedAssetUrls } from '@/app-preview/data/shared-asset-urls';
-import { Chip } from '@/app-preview/primitives/Chip';
-import { FaviconLogo } from '@/app-preview/primitives/FaviconLogo';
-import { PersonAvatar } from '@/app-preview/primitives/PersonAvatar';
-import { PreviewTag } from '@/app-preview/primitives/PreviewTag';
import { previewFontSize } from '@/app-preview/preview-font-size';
import { useHorizontalDragScroll } from '@/platform/motion';
import { EASING } from '@/tokens';
+import { CellValue } from './components/CellValue';
+import { COLUMNS } from './data/columns';
+import { COMPANIES } from './data/companies';
+import { HEADER_ICONS } from './data/header-icons';
+
const Root = styled.div`
background-color: ${THEME_LIGHT.background.primary};
display: flex;
@@ -191,29 +176,6 @@ const EdgePlus = styled.span`
margin-left: auto;
`;
-const CellText = styled.span`
- color: ${THEME_LIGHT.font.color.primary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- font-weight: ${THEME_LIGHT.font.weight.regular};
- max-width: 100%;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const BooleanRow = styled.span`
- align-items: center;
- color: ${THEME_LIGHT.font.color.primary};
- display: inline-flex;
- gap: 4px;
-`;
-
-const BooleanText = styled.span`
- color: ${THEME_LIGHT.font.color.primary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
-`;
-
const CheckboxWrap = styled.div`
align-items: center;
cursor: pointer;
@@ -246,222 +208,6 @@ const CheckboxBox = styled.div`
}
`;
-type ContactTone = 'amber' | 'blue' | 'gray' | 'pink' | 'purple' | 'turquoise';
-
-type ActorSource = 'api' | 'system' | 'workflow';
-
-type ContactActor = {
- avatarUrl?: string;
- name: string;
- source?: ActorSource;
- tone?: ContactTone;
-};
-
-type ContactCompany = {
- accountOwner: ContactActor;
- address: string;
- arr: string;
- createdBy: ContactActor;
- domain: string;
- icp: boolean;
- industry: string;
- name: string;
-};
-
-type ContactColumnId =
- | 'accountOwner'
- | 'address'
- | 'arr'
- | 'company'
- | 'createdBy'
- | 'icp'
- | 'industry'
- | 'url';
-
-type ContactColumn = {
- id: ContactColumnId;
- isFirstColumn?: boolean;
- label: string;
- width: number;
-};
-
-const COLUMNS: ContactColumn[] = [
- { id: 'company', label: 'Companies', width: 180, isFirstColumn: true },
- { id: 'url', label: 'Url', width: 140 },
- { id: 'createdBy', label: 'Created By', width: 150 },
- { id: 'address', label: 'Address', width: 140 },
- { id: 'accountOwner', label: 'Account Owner', width: 150 },
- { id: 'icp', label: 'ICP', width: 80 },
- { id: 'arr', label: 'ARR', width: 120 },
- { id: 'industry', label: 'Industry', width: 140 },
-];
-
-const PEOPLE = sharedAssetUrls.peopleAvatars;
-
-// Mock fiction company rows (product-screenshot copy, English). createdBy is
-// an Actor: members render their avatar, the API/workflow rows render their
-// source icon, mirroring twenty-front's ActorDisplay.
-const COMPANIES: ContactCompany[] = [
- {
- name: 'Anthropic',
- domain: 'anthropic.com',
- createdBy: {
- name: 'Dario Amodei',
- tone: 'gray',
- avatarUrl: PEOPLE.darioAmodei,
- },
- address: '18 Rue De Navarin',
- accountOwner: {
- name: 'Dario Amodei',
- tone: 'gray',
- avatarUrl: PEOPLE.darioAmodei,
- },
- icp: true,
- arr: '$500,000',
- industry: 'AI Research',
- },
- {
- name: 'Linkedin',
- domain: 'linkedin.com',
- createdBy: {
- name: 'Reid Hoffman',
- tone: 'purple',
- avatarUrl: PEOPLE.reidHoffman,
- },
- address: '1226 Moises Causeway',
- accountOwner: {
- name: 'Ryan Roslansky',
- tone: 'turquoise',
- avatarUrl: PEOPLE.ryanRoslansky,
- },
- icp: false,
- arr: '$1,000,000',
- industry: 'Professional Networking',
- },
- {
- name: 'Slack',
- domain: 'slack.com',
- createdBy: {
- name: 'Stewart Butterfield',
- tone: 'turquoise',
- avatarUrl: PEOPLE.stewartButterfield,
- },
- address: '1316 Dameon Mountain',
- accountOwner: {
- name: 'Stewart Butterfield',
- tone: 'turquoise',
- avatarUrl: PEOPLE.stewartButterfield,
- },
- icp: true,
- arr: '$2,300,000',
- industry: 'Collaboration Software',
- },
- {
- name: 'Notion',
- domain: 'notion.com',
- createdBy: { name: 'API - Key name', source: 'api' },
- address: '1162 Sammy Creek',
- accountOwner: {
- name: 'Ivan Zhao',
- tone: 'gray',
- avatarUrl: PEOPLE.ivanZhao,
- },
- icp: false,
- arr: '$750,000',
- industry: 'Productivity Software',
- },
- {
- name: 'Figma',
- domain: 'figma.com',
- createdBy: { name: 'Workflow name', source: 'workflow' },
- address: '110 Oswald Junction',
- accountOwner: {
- name: 'Dylan Field',
- tone: 'purple',
- avatarUrl: PEOPLE.dylanField,
- },
- icp: true,
- arr: '$3,500,000',
- industry: 'Design Tools',
- },
- {
- name: 'Github',
- domain: 'github.com',
- createdBy: {
- name: 'Chris Wanstrath',
- tone: 'gray',
- avatarUrl: PEOPLE.chrisWanstrath,
- },
- address: '3891 Ranchview Drive',
- accountOwner: {
- name: 'Thomas Dohmke',
- tone: 'gray',
- avatarUrl: PEOPLE.thomasDohmke,
- },
- icp: true,
- arr: '$900,000',
- industry: 'Developer Platform',
- },
- {
- name: 'Airbnb',
- domain: 'airbnb.com',
- createdBy: {
- name: 'Brian Chesky',
- tone: 'pink',
- avatarUrl: PEOPLE.brianChesky,
- },
- address: '888 Brannan Street',
- accountOwner: {
- name: 'Brian Chesky',
- tone: 'pink',
- avatarUrl: PEOPLE.brianChesky,
- },
- icp: false,
- arr: '$1,800,000',
- industry: 'Travel & Hospitality',
- },
- {
- name: 'Stripe',
- domain: 'stripe.com',
- createdBy: {
- name: 'Patrick Collison',
- tone: 'blue',
- avatarUrl: PEOPLE.patrickCollison,
- },
- address: '354 Oyster Point Blvd',
- accountOwner: {
- name: 'Patrick Collison',
- tone: 'blue',
- avatarUrl: PEOPLE.patrickCollison,
- },
- icp: true,
- arr: '$4,200,000',
- industry: 'Fintech',
- },
- {
- name: 'Vercel',
- domain: 'vercel.com',
- createdBy: { name: 'Guillermo Rauch', tone: 'amber' },
- address: '340 S Lemon Ave',
- accountOwner: { name: 'Guillermo Rauch', tone: 'amber' },
- icp: true,
- arr: '$620,000',
- industry: 'Developer Platform',
- },
-];
-
-// The product's column-header glyphs, by field type.
-const HEADER_ICONS: Record<ContactColumnId, typeof IconUser> = {
- company: IconBuildingSkyscraper,
- url: IconLink,
- createdBy: IconUserCircle,
- address: IconMapPin,
- accountOwner: IconUser,
- icp: IconTarget,
- arr: IconMoneybag,
- industry: IconBuildingFactory2,
-};
-
const GRIP_CELL_COUNT = 11;
const TOTAL_WIDTH = COLUMNS.reduce((sum, column) => sum + column.width, 0);
@@ -471,84 +217,6 @@ const GRIP_CELLS = Array.from(
(_, gripNumber) => gripNumber,
);
-const ACTOR_SOURCE_ICONS = {
- api: IconApi,
- system: IconRobot,
- workflow: IconSettingsAutomation,
-};
-
-// A member shows their rounded avatar; a non-person actor (API/workflow/system)
-// shows its bare source icon, inheriting the chip's text color.
-function ActorAvatar({ actor }: { actor: ContactActor }) {
- if (actor.source) {
- const SourceIcon = ACTOR_SOURCE_ICONS[actor.source];
- return <SourceIcon size={14} stroke={1.6} />;
- }
-
- return (
- <PersonAvatar
- person={{
- avatarUrl: actor.avatarUrl,
- name: actor.name,
- tone: actor.tone,
- }}
- />
- );
-}
-
-function CellValue({
- columnId,
- company,
-}: {
- columnId: ContactColumnId;
- company: ContactCompany;
-}) {
- switch (columnId) {
- case 'company':
- return (
- <Chip
- isBold
- label={company.name}
- leftComponent={
- <FaviconLogo domain={company.domain} label={company.name} />
- }
- variant="highlighted"
- />
- );
- case 'url':
- return <Chip label={company.domain} variant="static" />;
- case 'createdBy':
- return (
- <Chip
- label={company.createdBy.name}
- leftComponent={<ActorAvatar actor={company.createdBy} />}
- variant="transparent"
- />
- );
- case 'address':
- return <CellText>{company.address}</CellText>;
- case 'accountOwner':
- return (
- <Chip
- label={company.accountOwner.name}
- leftComponent={<ActorAvatar actor={company.accountOwner} />}
- variant="transparent"
- />
- );
- case 'icp':
- return (
- <BooleanRow>
- {company.icp ? <IconCheck size={14} /> : <IconX size={14} />}
- <BooleanText>{company.icp ? 'True' : 'False'}</BooleanText>
- </BooleanRow>
- );
- case 'arr':
- return <CellText>{company.arr}</CellText>;
- case 'industry':
- return <PreviewTag color="gray" label={company.industry} />;
- }
-}
-
export function ContactsVisual({ active: _active }: { active: boolean }) {
const { i18n } = useLingui();
const [checked, setChecked] = useState<Record<string, boolean>>({});
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/components/ActorAvatar.tsx b/packages/twenty-website/src/sections/product-feature/ContactsVisual/components/ActorAvatar.tsx
new file mode 100644
index 00000000000..b2053f873b9
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/components/ActorAvatar.tsx
@@ -0,0 +1,21 @@
+import { PersonAvatar } from '@/app-preview/primitives/PersonAvatar';
+
+import { ACTOR_SOURCE_ICONS } from '../data/actor-source-icons';
+import { type ContactActor } from '../types/contact-actor';
+
+export function ActorAvatar({ actor }: { actor: ContactActor }) {
+ if (actor.source) {
+ const SourceIcon = ACTOR_SOURCE_ICONS[actor.source];
+ return <SourceIcon size={14} stroke={1.6} />;
+ }
+
+ return (
+ <PersonAvatar
+ person={{
+ avatarUrl: actor.avatarUrl,
+ name: actor.name,
+ tone: actor.tone,
+ }}
+ />
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/components/CellValue.tsx b/packages/twenty-website/src/sections/product-feature/ContactsVisual/components/CellValue.tsx
new file mode 100644
index 00000000000..340257a9262
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/components/CellValue.tsx
@@ -0,0 +1,88 @@
+import { styled } from '@linaria/react';
+import { IconCheck, IconX } from '@tabler/icons-react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { Chip } from '@/app-preview/primitives/Chip';
+import { FaviconLogo } from '@/app-preview/primitives/FaviconLogo';
+import { PreviewTag } from '@/app-preview/primitives/PreviewTag';
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { type ContactColumnId } from '../types/contact-column-id';
+import { type ContactCompany } from '../types/contact-company';
+import { ActorAvatar } from './ActorAvatar';
+
+const CellText = styled.span`
+ color: ${THEME_LIGHT.font.color.primary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ font-weight: ${THEME_LIGHT.font.weight.regular};
+ max-width: 100%;
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const BooleanRow = styled.span`
+ align-items: center;
+ color: ${THEME_LIGHT.font.color.primary};
+ display: inline-flex;
+ gap: 4px;
+`;
+
+const BooleanText = styled.span`
+ color: ${THEME_LIGHT.font.color.primary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+`;
+
+export function CellValue({
+ columnId,
+ company,
+}: {
+ columnId: ContactColumnId;
+ company: ContactCompany;
+}) {
+ switch (columnId) {
+ case 'company':
+ return (
+ <Chip
+ isBold
+ label={company.name}
+ leftComponent={
+ <FaviconLogo domain={company.domain} label={company.name} />
+ }
+ variant="highlighted"
+ />
+ );
+ case 'url':
+ return <Chip label={company.domain} variant="static" />;
+ case 'createdBy':
+ return (
+ <Chip
+ label={company.createdBy.name}
+ leftComponent={<ActorAvatar actor={company.createdBy} />}
+ variant="transparent"
+ />
+ );
+ case 'address':
+ return <CellText>{company.address}</CellText>;
+ case 'accountOwner':
+ return (
+ <Chip
+ label={company.accountOwner.name}
+ leftComponent={<ActorAvatar actor={company.accountOwner} />}
+ variant="transparent"
+ />
+ );
+ case 'icp':
+ return (
+ <BooleanRow>
+ {company.icp ? <IconCheck size={14} /> : <IconX size={14} />}
+ <BooleanText>{company.icp ? 'True' : 'False'}</BooleanText>
+ </BooleanRow>
+ );
+ case 'arr':
+ return <CellText>{company.arr}</CellText>;
+ case 'industry':
+ return <PreviewTag color="gray" label={company.industry} />;
+ }
+}
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/actor-source-icons.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/actor-source-icons.ts
new file mode 100644
index 00000000000..c5619322f16
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/actor-source-icons.ts
@@ -0,0 +1,11 @@
+import {
+ IconApi,
+ IconRobot,
+ IconSettingsAutomation,
+} from '@tabler/icons-react';
+
+export const ACTOR_SOURCE_ICONS = {
+ api: IconApi,
+ system: IconRobot,
+ workflow: IconSettingsAutomation,
+};
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/columns.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/columns.ts
new file mode 100644
index 00000000000..22fe0bcbacd
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/columns.ts
@@ -0,0 +1,12 @@
+import { type ContactColumn } from '../types/contact-column';
+
+export const COLUMNS: ContactColumn[] = [
+ { id: 'company', label: 'Companies', width: 180, isFirstColumn: true },
+ { id: 'url', label: 'Url', width: 140 },
+ { id: 'createdBy', label: 'Created By', width: 150 },
+ { id: 'address', label: 'Address', width: 140 },
+ { id: 'accountOwner', label: 'Account Owner', width: 150 },
+ { id: 'icp', label: 'ICP', width: 80 },
+ { id: 'arr', label: 'ARR', width: 120 },
+ { id: 'industry', label: 'Industry', width: 140 },
+];
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/companies.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/companies.ts
new file mode 100644
index 00000000000..b3613023140
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/companies.ts
@@ -0,0 +1,154 @@
+import { sharedAssetUrls } from '@/app-preview/data/shared-asset-urls';
+
+import { type ContactCompany } from '../types/contact-company';
+
+const PEOPLE = sharedAssetUrls.peopleAvatars;
+
+export const COMPANIES: ContactCompany[] = [
+ {
+ name: 'Anthropic',
+ domain: 'anthropic.com',
+ createdBy: {
+ name: 'Dario Amodei',
+ tone: 'gray',
+ avatarUrl: PEOPLE.darioAmodei,
+ },
+ address: '18 Rue De Navarin',
+ accountOwner: {
+ name: 'Dario Amodei',
+ tone: 'gray',
+ avatarUrl: PEOPLE.darioAmodei,
+ },
+ icp: true,
+ arr: '$500,000',
+ industry: 'AI Research',
+ },
+ {
+ name: 'Linkedin',
+ domain: 'linkedin.com',
+ createdBy: {
+ name: 'Reid Hoffman',
+ tone: 'purple',
+ avatarUrl: PEOPLE.reidHoffman,
+ },
+ address: '1226 Moises Causeway',
+ accountOwner: {
+ name: 'Ryan Roslansky',
+ tone: 'turquoise',
+ avatarUrl: PEOPLE.ryanRoslansky,
+ },
+ icp: false,
+ arr: '$1,000,000',
+ industry: 'Professional Networking',
+ },
+ {
+ name: 'Slack',
+ domain: 'slack.com',
+ createdBy: {
+ name: 'Stewart Butterfield',
+ tone: 'turquoise',
+ avatarUrl: PEOPLE.stewartButterfield,
+ },
+ address: '1316 Dameon Mountain',
+ accountOwner: {
+ name: 'Stewart Butterfield',
+ tone: 'turquoise',
+ avatarUrl: PEOPLE.stewartButterfield,
+ },
+ icp: true,
+ arr: '$2,300,000',
+ industry: 'Collaboration Software',
+ },
+ {
+ name: 'Notion',
+ domain: 'notion.com',
+ createdBy: { name: 'API - Key name', source: 'api' },
+ address: '1162 Sammy Creek',
+ accountOwner: {
+ name: 'Ivan Zhao',
+ tone: 'gray',
+ avatarUrl: PEOPLE.ivanZhao,
+ },
+ icp: false,
+ arr: '$750,000',
+ industry: 'Productivity Software',
+ },
+ {
+ name: 'Figma',
+ domain: 'figma.com',
+ createdBy: { name: 'Workflow name', source: 'workflow' },
+ address: '110 Oswald Junction',
+ accountOwner: {
+ name: 'Dylan Field',
+ tone: 'purple',
+ avatarUrl: PEOPLE.dylanField,
+ },
+ icp: true,
+ arr: '$3,500,000',
+ industry: 'Design Tools',
+ },
+ {
+ name: 'Github',
+ domain: 'github.com',
+ createdBy: {
+ name: 'Chris Wanstrath',
+ tone: 'gray',
+ avatarUrl: PEOPLE.chrisWanstrath,
+ },
+ address: '3891 Ranchview Drive',
+ accountOwner: {
+ name: 'Thomas Dohmke',
+ tone: 'gray',
+ avatarUrl: PEOPLE.thomasDohmke,
+ },
+ icp: true,
+ arr: '$900,000',
+ industry: 'Developer Platform',
+ },
+ {
+ name: 'Airbnb',
+ domain: 'airbnb.com',
+ createdBy: {
+ name: 'Brian Chesky',
+ tone: 'pink',
+ avatarUrl: PEOPLE.brianChesky,
+ },
+ address: '888 Brannan Street',
+ accountOwner: {
+ name: 'Brian Chesky',
+ tone: 'pink',
+ avatarUrl: PEOPLE.brianChesky,
+ },
+ icp: false,
+ arr: '$1,800,000',
+ industry: 'Travel & Hospitality',
+ },
+ {
+ name: 'Stripe',
+ domain: 'stripe.com',
+ createdBy: {
+ name: 'Patrick Collison',
+ tone: 'blue',
+ avatarUrl: PEOPLE.patrickCollison,
+ },
+ address: '354 Oyster Point Blvd',
+ accountOwner: {
+ name: 'Patrick Collison',
+ tone: 'blue',
+ avatarUrl: PEOPLE.patrickCollison,
+ },
+ icp: true,
+ arr: '$4,200,000',
+ industry: 'Fintech',
+ },
+ {
+ name: 'Vercel',
+ domain: 'vercel.com',
+ createdBy: { name: 'Guillermo Rauch', tone: 'amber' },
+ address: '340 S Lemon Ave',
+ accountOwner: { name: 'Guillermo Rauch', tone: 'amber' },
+ icp: true,
+ arr: '$620,000',
+ industry: 'Developer Platform',
+ },
+];
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/header-icons.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/header-icons.ts
new file mode 100644
index 00000000000..65ae412590d
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/data/header-icons.ts
@@ -0,0 +1,23 @@
+import {
+ IconBuildingFactory2,
+ IconBuildingSkyscraper,
+ IconLink,
+ IconMapPin,
+ IconMoneybag,
+ IconTarget,
+ IconUser,
+ IconUserCircle,
+} from '@tabler/icons-react';
+
+import { type ContactColumnId } from '../types/contact-column-id';
+
+export const HEADER_ICONS: Record<ContactColumnId, typeof IconUser> = {
+ company: IconBuildingSkyscraper,
+ url: IconLink,
+ createdBy: IconUserCircle,
+ address: IconMapPin,
+ accountOwner: IconUser,
+ icp: IconTarget,
+ arr: IconMoneybag,
+ industry: IconBuildingFactory2,
+};
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/index.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/index.ts
new file mode 100644
index 00000000000..09826797d0d
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/index.ts
@@ -0,0 +1 @@
+export { ContactsVisual } from './ContactsVisual';
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-actor.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-actor.ts
new file mode 100644
index 00000000000..71b23a749a2
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-actor.ts
@@ -0,0 +1,10 @@
+type ContactTone = 'amber' | 'blue' | 'gray' | 'pink' | 'purple' | 'turquoise';
+
+type ActorSource = 'api' | 'system' | 'workflow';
+
+export type ContactActor = {
+ avatarUrl?: string;
+ name: string;
+ source?: ActorSource;
+ tone?: ContactTone;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-column-id.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-column-id.ts
new file mode 100644
index 00000000000..4fe0c73908b
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-column-id.ts
@@ -0,0 +1,9 @@
+export type ContactColumnId =
+ | 'accountOwner'
+ | 'address'
+ | 'arr'
+ | 'company'
+ | 'createdBy'
+ | 'icp'
+ | 'industry'
+ | 'url';
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-column.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-column.ts
new file mode 100644
index 00000000000..fc8546471e4
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-column.ts
@@ -0,0 +1,8 @@
+import { type ContactColumnId } from './contact-column-id';
+
+export type ContactColumn = {
+ id: ContactColumnId;
+ isFirstColumn?: boolean;
+ label: string;
+ width: number;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-company.ts b/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-company.ts
new file mode 100644
index 00000000000..8a51bf411e5
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ContactsVisual/types/contact-company.ts
@@ -0,0 +1,12 @@
+import { type ContactActor } from './contact-actor';
+
+export type ContactCompany = {
+ accountOwner: ContactActor;
+ address: string;
+ arr: string;
+ createdBy: ContactActor;
+ domain: string;
+ icp: boolean;
+ industry: string;
+ name: string;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/DashboardVisual.tsx b/packages/twenty-website/src/sections/product-feature/DashboardVisual/DashboardVisual.tsx
similarity index 68%
rename from packages/twenty-website/src/sections/product-feature/DashboardVisual.tsx
rename to packages/twenty-website/src/sections/product-feature/DashboardVisual/DashboardVisual.tsx
index 542f7deeb74..7d545fb884e 100644
--- a/packages/twenty-website/src/sections/product-feature/DashboardVisual.tsx
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/DashboardVisual.tsx
@@ -1,19 +1,15 @@
'use client';
import { styled } from '@linaria/react';
-import {
- IconDotsVertical,
- IconLayoutDashboard,
- IconTrendingDown,
- IconTrendingUp,
-} from '@tabler/icons-react';
+import { IconDotsVertical, IconLayoutDashboard } from '@tabler/icons-react';
import { THEME_LIGHT } from 'twenty-ui/theme';
import { previewFontSize } from '@/app-preview/preview-font-size';
-import { BarChart } from './BarChart';
-import { DASHBOARD_VISUAL_DATA } from './dashboard-visual-data';
-import { DonutChart } from './DonutChart';
+import { BarChart } from './components/BarChart';
+import { DonutChart } from './components/DonutChart';
+import { KpiCard } from './components/KpiCard';
+import { DASHBOARD_VISUAL_DATA } from './data/dashboard-visual-data';
const Window = styled.div`
background-color: ${THEME_LIGHT.background.primary};
@@ -125,49 +121,6 @@ const WidgetHeader = styled.span`
height: 24px;
`;
-const KpiBody = styled.div`
- align-items: flex-start;
- display: flex;
- flex: 1;
- flex-direction: column;
- gap: 4px;
- justify-content: center;
-`;
-
-const KpiValue = styled.span`
- color: ${THEME_LIGHT.font.color.primary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.xxl)};
- font-variant-numeric: tabular-nums;
- font-weight: ${THEME_LIGHT.font.weight.semiBold};
- line-height: 1.1;
-`;
-
-const KpiTrend = styled.span`
- align-items: center;
- display: inline-flex;
- gap: 2px;
-`;
-
-const TrendIcon = styled.span`
- align-items: center;
- display: inline-flex;
-
- &[data-direction='up'] {
- color: ${THEME_LIGHT.color.turquoise8};
- }
- &[data-direction='down'] {
- color: ${THEME_LIGHT.color.red8};
- }
-`;
-
-const TrendPercent = styled.span`
- color: ${THEME_LIGHT.font.color.secondary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.xs)};
-`;
-
-// The spotlight visual: a page-layout dashboard on twenty-front's WidgetCard
-// chrome (secondary card floating on the tertiary canvas). KPI cards plus a
-// bar widget and a donut widget; the charts animate in when the tile is active.
export function DashboardVisual({ active }: { active: boolean }) {
return (
<Window>
@@ -190,19 +143,7 @@ export function DashboardVisual({ active }: { active: boolean }) {
{DASHBOARD_VISUAL_DATA.kpis.map((kpi) => (
<WidgetCard key={kpi.label}>
<WidgetHeader>{kpi.label}</WidgetHeader>
- <KpiBody>
- <KpiValue>{kpi.value}</KpiValue>
- <KpiTrend>
- <TrendIcon data-direction={kpi.trendDirection}>
- {kpi.trendDirection === 'up' ? (
- <IconTrendingUp size={14} stroke={2} />
- ) : (
- <IconTrendingDown size={14} stroke={2} />
- )}
- </TrendIcon>
- <TrendPercent>{kpi.trendPercent}%</TrendPercent>
- </KpiTrend>
- </KpiBody>
+ <KpiCard kpi={kpi} />
</WidgetCard>
))}
<WidgetCard data-cell="bar">
diff --git a/packages/twenty-website/src/sections/product-feature/BarChart.tsx b/packages/twenty-website/src/sections/product-feature/DashboardVisual/components/BarChart.tsx
similarity index 89%
rename from packages/twenty-website/src/sections/product-feature/BarChart.tsx
rename to packages/twenty-website/src/sections/product-feature/DashboardVisual/components/BarChart.tsx
index 669b94bdd32..978bb417c0c 100644
--- a/packages/twenty-website/src/sections/product-feature/BarChart.tsx
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/components/BarChart.tsx
@@ -6,10 +6,8 @@ import { THEME_LIGHT } from 'twenty-ui/theme';
import { previewFontSize } from '@/app-preview/preview-font-size';
import { EASING } from '@/tokens';
-import {
- type DashboardMonth,
- type DashboardStage,
-} from './dashboard-visual-data';
+import { type DashboardMonth } from '../types/dashboard-month';
+import { type DashboardStage } from '../types/dashboard-stage';
const Y_TICK_COUNT = 5;
const X_LABEL_ROW_HEIGHT = 18;
@@ -66,8 +64,6 @@ const BarColumn = styled.div`
justify-content: center;
`;
-// New at the bottom, Won at the top (column-reverse keeps the data order while
-// stacking upward). Grows from the baseline when the tile becomes active.
const Stack = styled.div`
border-radius: 3px 3px 0 0;
display: flex;
@@ -117,9 +113,6 @@ const XLabel = styled.span`
text-align: center;
`;
-// Deals by stage, stacked per month, in the same colours as the donut (blue =
-// New … orange = Won). Bars are scaled to the top tick so they read against the
-// axis; stacks grow in staggered (50ms per column) when the tile is active.
export function BarChart({
active,
months,
diff --git a/packages/twenty-website/src/sections/product-feature/DonutChart.tsx b/packages/twenty-website/src/sections/product-feature/DashboardVisual/components/DonutChart.tsx
similarity index 92%
rename from packages/twenty-website/src/sections/product-feature/DonutChart.tsx
rename to packages/twenty-website/src/sections/product-feature/DashboardVisual/components/DonutChart.tsx
index 78a984f50b9..d12ab66da9d 100644
--- a/packages/twenty-website/src/sections/product-feature/DonutChart.tsx
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/components/DonutChart.tsx
@@ -6,7 +6,7 @@ import { THEME_LIGHT } from 'twenty-ui/theme';
import { previewFontSize } from '@/app-preview/preview-font-size';
import { EASING } from '@/tokens';
-import { type DashboardStage } from './dashboard-visual-data';
+import { type DashboardStage } from '../types/dashboard-stage';
const SIZE = 96;
const STROKE = 16;
@@ -128,10 +128,6 @@ const LegendValue = styled.span`
font-variant-numeric: tabular-nums;
`;
-// Multi-colour donut (twenty-front pie-chart scheme: blue → purple → turquoise
-// → orange). The ring fades + scales in when the tile becomes active; each
-// slice is rotated to its cumulative start angle and draws its arc clockwise.
-// The legend doubles as the colour key for the stacked bars beside it.
export function DonutChart({
active,
stages,
diff --git a/packages/twenty-website/src/sections/product-feature/DashboardVisual/components/KpiCard.tsx b/packages/twenty-website/src/sections/product-feature/DashboardVisual/components/KpiCard.tsx
new file mode 100644
index 00000000000..88c6844ca6d
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/components/KpiCard.tsx
@@ -0,0 +1,65 @@
+import { styled } from '@linaria/react';
+import { IconTrendingDown, IconTrendingUp } from '@tabler/icons-react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { type DashboardKpi } from '../types/dashboard-kpi';
+
+const Body = styled.div`
+ align-items: flex-start;
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ gap: 4px;
+ justify-content: center;
+`;
+
+const Value = styled.span`
+ color: ${THEME_LIGHT.font.color.primary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.xxl)};
+ font-variant-numeric: tabular-nums;
+ font-weight: ${THEME_LIGHT.font.weight.semiBold};
+ line-height: 1.1;
+`;
+
+const Trend = styled.span`
+ align-items: center;
+ display: inline-flex;
+ gap: 2px;
+`;
+
+const TrendIcon = styled.span`
+ align-items: center;
+ display: inline-flex;
+
+ &[data-direction='up'] {
+ color: ${THEME_LIGHT.color.turquoise8};
+ }
+ &[data-direction='down'] {
+ color: ${THEME_LIGHT.color.red8};
+ }
+`;
+
+const TrendPercent = styled.span`
+ color: ${THEME_LIGHT.font.color.secondary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.xs)};
+`;
+
+export function KpiCard({ kpi }: { kpi: DashboardKpi }) {
+ return (
+ <Body>
+ <Value>{kpi.value}</Value>
+ <Trend>
+ <TrendIcon data-direction={kpi.trendDirection}>
+ {kpi.trendDirection === 'up' ? (
+ <IconTrendingUp size={14} stroke={2} />
+ ) : (
+ <IconTrendingDown size={14} stroke={2} />
+ )}
+ </TrendIcon>
+ <TrendPercent>{kpi.trendPercent}%</TrendPercent>
+ </Trend>
+ </Body>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/dashboard-visual-data.ts b/packages/twenty-website/src/sections/product-feature/DashboardVisual/data/dashboard-visual-data.ts
similarity index 54%
rename from packages/twenty-website/src/sections/product-feature/dashboard-visual-data.ts
rename to packages/twenty-website/src/sections/product-feature/DashboardVisual/data/dashboard-visual-data.ts
index c21f22d55ee..0ebd9dd9bec 100644
--- a/packages/twenty-website/src/sections/product-feature/dashboard-visual-data.ts
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/data/dashboard-visual-data.ts
@@ -1,26 +1,6 @@
-// The dashboard widgets' mock series (product-screenshot fiction). One stage
-// list drives both charts, so a colour means the same thing everywhere: blue =
-// New, purple = Qualified, turquoise = Proposal, orange = Won. The donut is the
-// current pipeline snapshot; the stacked bars are the same stages over time.
-export type DashboardStageTone = 'blue' | 'orange' | 'purple' | 'turquoise';
-
-export type DashboardStage = {
- label: string;
- tone: DashboardStageTone;
-};
-
-export type DashboardKpi = {
- label: string;
- trendDirection: 'down' | 'up';
- trendPercent: number;
- value: string;
-};
-
-export type DashboardMonth = {
- label: string;
- // deal counts per stage, index-aligned to DASHBOARD_VISUAL_DATA.stages
- values: number[];
-};
+import { type DashboardKpi } from '../types/dashboard-kpi';
+import { type DashboardMonth } from '../types/dashboard-month';
+import { type DashboardStage } from '../types/dashboard-stage';
export const DASHBOARD_VISUAL_DATA: {
byMonth: DashboardMonth[];
@@ -34,9 +14,7 @@ export const DASHBOARD_VISUAL_DATA: {
{ label: 'Proposal', tone: 'turquoise' },
{ label: 'Won', tone: 'orange' },
],
- // current pipeline snapshot (the donut), index-aligned to stages
stageTotals: [47, 34, 27, 20],
- // deals worked each month, split by stage (the stacked bars)
byMonth: [
{ label: 'Jan', values: [7, 5, 4, 2] },
{ label: 'Feb', values: [9, 6, 5, 3] },
diff --git a/packages/twenty-website/src/sections/product-feature/DashboardVisual/index.ts b/packages/twenty-website/src/sections/product-feature/DashboardVisual/index.ts
new file mode 100644
index 00000000000..d2718880149
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/index.ts
@@ -0,0 +1 @@
+export { DashboardVisual } from './DashboardVisual';
diff --git a/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-kpi.ts b/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-kpi.ts
new file mode 100644
index 00000000000..83cfdf57bb3
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-kpi.ts
@@ -0,0 +1,6 @@
+export type DashboardKpi = {
+ label: string;
+ trendDirection: 'down' | 'up';
+ trendPercent: number;
+ value: string;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-month.ts b/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-month.ts
new file mode 100644
index 00000000000..e8b7585a23c
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-month.ts
@@ -0,0 +1,4 @@
+export type DashboardMonth = {
+ label: string;
+ values: number[];
+};
diff --git a/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-stage-tone.ts b/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-stage-tone.ts
new file mode 100644
index 00000000000..ea278bce496
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-stage-tone.ts
@@ -0,0 +1 @@
+export type DashboardStageTone = 'blue' | 'orange' | 'purple' | 'turquoise';
diff --git a/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-stage.ts b/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-stage.ts
new file mode 100644
index 00000000000..9af4be26a07
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/DashboardVisual/types/dashboard-stage.ts
@@ -0,0 +1,6 @@
+import { type DashboardStageTone } from './dashboard-stage-tone';
+
+export type DashboardStage = {
+ label: string;
+ tone: DashboardStageTone;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/EmailsVisual.tsx b/packages/twenty-website/src/sections/product-feature/EmailsVisual.tsx
deleted file mode 100644
index a7cfd7c22fc..00000000000
--- a/packages/twenty-website/src/sections/product-feature/EmailsVisual.tsx
+++ /dev/null
@@ -1,271 +0,0 @@
-'use client';
-
-import { styled } from '@linaria/react';
-import { IconLock, IconPlus } from '@tabler/icons-react';
-import { THEME_LIGHT } from 'twenty-ui/theme';
-
-import { sharedAssetUrls } from '@/app-preview/data/shared-asset-urls';
-import { PersonAvatar } from '@/app-preview/primitives/PersonAvatar';
-import { previewFontSize } from '@/app-preview/preview-font-size';
-
-import { RecordTabHeader } from './RecordTabHeader';
-
-const PEOPLE = sharedAssetUrls.peopleAvatars;
-
-type Participant = {
- avatarUrl: string;
- name: string;
-};
-
-type EmailThread = {
- date: string;
- messageCount: number;
- participants: Participant[];
- preview?: string;
- shared: boolean;
- subject?: string;
-};
-
-// The record's two email threads (product-screenshot copy, English). The NDA
-// thread stays private — only its metadata is shared, so twenty-front shows the
-// "Not shared" lock instead of the subject and body.
-const THREADS: EmailThread[] = [
- {
- date: '1:30pm',
- messageCount: 2,
- participants: [{ avatarUrl: PEOPLE.anonymousMike, name: 'Mike' }],
- shared: false,
- },
- {
- date: '4 nov 2023',
- messageCount: 4,
- participants: [
- { avatarUrl: PEOPLE.anonymousFelix, name: 'Félix' },
- { avatarUrl: PEOPLE.anonymousThomas, name: 'Thomas' },
- ],
- preview:
- "Hey team, I've been in touch with Notion and Figma about potential integrations.",
- shared: true,
- subject: 'Partnerships - Q4 Strategy',
- },
-];
-
-const Root = styled.div`
- background-color: ${THEME_LIGHT.background.primary};
- display: flex;
- flex-direction: column;
- font-family: var(--font-product), sans-serif;
- height: 100%;
- overflow: hidden;
- width: 100%;
-`;
-
-const Panel = styled.div`
- display: flex;
- flex: 1;
- flex-direction: column;
- min-height: 0;
- overflow: hidden;
- padding-top: 8px;
-`;
-
-const InboxHeader = styled.div`
- align-items: center;
- display: flex;
- flex-shrink: 0;
- justify-content: space-between;
- padding: 8px 16px 12px;
-`;
-
-const InboxTitle = styled.span`
- align-items: baseline;
- color: ${THEME_LIGHT.font.color.primary};
- display: flex;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- font-weight: ${THEME_LIGHT.font.weight.semiBold};
- gap: 6px;
-`;
-
-const InboxCount = styled.span`
- color: ${THEME_LIGHT.font.color.light};
- font-weight: ${THEME_LIGHT.font.weight.regular};
-`;
-
-const ComposeButton = styled.span`
- align-items: center;
- border: 1px solid ${THEME_LIGHT.border.color.medium};
- border-radius: ${THEME_LIGHT.border.radius.sm};
- color: ${THEME_LIGHT.font.color.secondary};
- display: inline-flex;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
- font-weight: ${THEME_LIGHT.font.weight.medium};
- gap: 4px;
- padding: 4px 8px;
-`;
-
-const ThreadList = styled.div`
- display: flex;
- flex: 1;
- flex-direction: column;
- min-height: 0;
- overflow: hidden;
-`;
-
-const Row = styled.div`
- align-items: center;
- box-sizing: border-box;
- color: ${THEME_LIGHT.font.color.primary};
- display: flex;
- gap: 8px;
- height: 48px;
- padding: 0 16px;
-
- &:hover {
- background-color: ${THEME_LIGHT.background.transparent.light};
- }
-`;
-
-const Heading = styled.div`
- align-items: center;
- display: flex;
- max-width: 40%;
- min-width: 0;
- overflow: hidden;
- width: fit-content;
-`;
-
-const AvatarStack = styled.div`
- align-items: center;
- display: flex;
- flex-shrink: 0;
-
- & > * + * {
- margin-left: -4px;
- }
-`;
-
-const SenderNames = styled.span`
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- margin: 0 4px;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const ThreadCount = styled.span`
- color: ${THEME_LIGHT.font.color.tertiary};
- flex-shrink: 0;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
-`;
-
-const SubjectBody = styled.div`
- align-items: center;
- display: flex;
- flex: 1;
- gap: 8px;
- min-width: 0;
- overflow: hidden;
-`;
-
-const Subject = styled.span`
- color: ${THEME_LIGHT.font.color.primary};
- flex-shrink: 0;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const Preview = styled.span`
- color: ${THEME_LIGHT.font.color.tertiary};
- flex: 1;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const NotShared = styled.span`
- align-items: center;
- background: ${THEME_LIGHT.background.transparent.lighter};
- border: 1px solid ${THEME_LIGHT.border.color.light};
- border-radius: ${THEME_LIGHT.border.radius.sm};
- color: ${THEME_LIGHT.font.color.tertiary};
- display: inline-flex;
- flex: 1;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
- gap: 4px;
- height: 20px;
- padding: 0 4px;
-`;
-
-const ReceivedAt = styled.span`
- color: ${THEME_LIGHT.font.color.tertiary};
- flex-shrink: 0;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
- padding: 0 4px;
- white-space: nowrap;
-`;
-
-export function EmailsVisual({ active: _active }: { active: boolean }) {
- return (
- <Root>
- <RecordTabHeader active="Emails" />
- <Panel>
- <InboxHeader>
- <InboxTitle>
- Inbox
- <InboxCount>{THREADS.length}</InboxCount>
- </InboxTitle>
- <ComposeButton>
- <IconPlus size={12} stroke={2} />
- Compose
- </ComposeButton>
- </InboxHeader>
- <ThreadList>
- {THREADS.map((thread) => (
- <Row key={thread.participants[0].name}>
- <Heading>
- <AvatarStack>
- {thread.participants.map((participant) => (
- <PersonAvatar
- key={participant.name}
- person={{
- avatarUrl: participant.avatarUrl,
- name: participant.name,
- }}
- size={16}
- />
- ))}
- </AvatarStack>
- <SenderNames>
- {thread.participants
- .map((participant) => participant.name)
- .join(', ')}
- </SenderNames>
- <ThreadCount>{thread.messageCount}</ThreadCount>
- </Heading>
- <SubjectBody>
- {thread.shared ? (
- <>
- <Subject>{thread.subject}</Subject>
- <Preview>{thread.preview}</Preview>
- </>
- ) : (
- <NotShared>
- <IconLock size={14} stroke={2} />
- Not shared
- </NotShared>
- )}
- </SubjectBody>
- <ReceivedAt>{thread.date}</ReceivedAt>
- </Row>
- ))}
- </ThreadList>
- </Panel>
- </Root>
- );
-}
diff --git a/packages/twenty-website/src/sections/product-feature/EmailsVisual/EmailsVisual.tsx b/packages/twenty-website/src/sections/product-feature/EmailsVisual/EmailsVisual.tsx
new file mode 100644
index 00000000000..8865d89b4a7
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/EmailsVisual/EmailsVisual.tsx
@@ -0,0 +1,97 @@
+'use client';
+
+import { styled } from '@linaria/react';
+import { IconPlus } from '@tabler/icons-react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { RecordTabHeader } from '../components/RecordTabHeader';
+import { ThreadRow } from './components/ThreadRow';
+import { THREADS } from './data/threads';
+
+const Root = styled.div`
+ background-color: ${THEME_LIGHT.background.primary};
+ display: flex;
+ flex-direction: column;
+ font-family: var(--font-product), sans-serif;
+ height: 100%;
+ overflow: hidden;
+ width: 100%;
+`;
+
+const Panel = styled.div`
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ min-height: 0;
+ overflow: hidden;
+ padding-top: 8px;
+`;
+
+const InboxHeader = styled.div`
+ align-items: center;
+ display: flex;
+ flex-shrink: 0;
+ justify-content: space-between;
+ padding: 8px 16px 12px;
+`;
+
+const InboxTitle = styled.span`
+ align-items: baseline;
+ color: ${THEME_LIGHT.font.color.primary};
+ display: flex;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ font-weight: ${THEME_LIGHT.font.weight.semiBold};
+ gap: 6px;
+`;
+
+const InboxCount = styled.span`
+ color: ${THEME_LIGHT.font.color.light};
+ font-weight: ${THEME_LIGHT.font.weight.regular};
+`;
+
+const ComposeButton = styled.span`
+ align-items: center;
+ border: 1px solid ${THEME_LIGHT.border.color.medium};
+ border-radius: ${THEME_LIGHT.border.radius.sm};
+ color: ${THEME_LIGHT.font.color.secondary};
+ display: inline-flex;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
+ font-weight: ${THEME_LIGHT.font.weight.medium};
+ gap: 4px;
+ padding: 4px 8px;
+`;
+
+const ThreadList = styled.div`
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ min-height: 0;
+ overflow: hidden;
+`;
+
+export function EmailsVisual({ active: _active }: { active: boolean }) {
+ return (
+ <Root>
+ <RecordTabHeader active="Emails" />
+ <Panel>
+ <InboxHeader>
+ <InboxTitle>
+ Inbox
+ <InboxCount>{THREADS.length}</InboxCount>
+ </InboxTitle>
+ <ComposeButton>
+ <IconPlus size={12} stroke={2} />
+ Compose
+ </ComposeButton>
+ </InboxHeader>
+ <ThreadList>
+ {THREADS.map((thread) => (
+ <ThreadRow key={thread.date} thread={thread} />
+ ))}
+ </ThreadList>
+ </Panel>
+ </Root>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/EmailsVisual/components/ThreadRow.tsx b/packages/twenty-website/src/sections/product-feature/EmailsVisual/components/ThreadRow.tsx
new file mode 100644
index 00000000000..615a4c13808
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/EmailsVisual/components/ThreadRow.tsx
@@ -0,0 +1,148 @@
+import { styled } from '@linaria/react';
+import { IconLock } from '@tabler/icons-react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { PersonAvatar } from '@/app-preview/primitives/PersonAvatar';
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { type EmailThread } from '../types/email-thread';
+
+const Row = styled.div`
+ align-items: center;
+ box-sizing: border-box;
+ color: ${THEME_LIGHT.font.color.primary};
+ display: flex;
+ gap: 8px;
+ height: 48px;
+ padding: 0 16px;
+
+ &:hover {
+ background-color: ${THEME_LIGHT.background.transparent.light};
+ }
+`;
+
+const Heading = styled.div`
+ align-items: center;
+ display: flex;
+ max-width: 40%;
+ min-width: 0;
+ overflow: hidden;
+ width: fit-content;
+`;
+
+const AvatarStack = styled.div`
+ align-items: center;
+ display: flex;
+ flex-shrink: 0;
+
+ & > * + * {
+ margin-left: -4px;
+ }
+`;
+
+const SenderNames = styled.span`
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ margin: 0 4px;
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const ThreadCount = styled.span`
+ color: ${THEME_LIGHT.font.color.tertiary};
+ flex-shrink: 0;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+`;
+
+const SubjectBody = styled.div`
+ align-items: center;
+ display: flex;
+ flex: 1;
+ gap: 8px;
+ min-width: 0;
+ overflow: hidden;
+`;
+
+const Subject = styled.span`
+ color: ${THEME_LIGHT.font.color.primary};
+ flex-shrink: 0;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ max-width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const Preview = styled.span`
+ color: ${THEME_LIGHT.font.color.tertiary};
+ flex: 1;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const NotShared = styled.span`
+ align-items: center;
+ background: ${THEME_LIGHT.background.transparent.lighter};
+ border: 1px solid ${THEME_LIGHT.border.color.light};
+ border-radius: ${THEME_LIGHT.border.radius.sm};
+ color: ${THEME_LIGHT.font.color.tertiary};
+ display: inline-flex;
+ flex: 1;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
+ gap: 4px;
+ height: 20px;
+ padding: 0 4px;
+`;
+
+const ReceivedAt = styled.span`
+ color: ${THEME_LIGHT.font.color.tertiary};
+ flex-shrink: 0;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
+ padding: 0 4px;
+ white-space: nowrap;
+`;
+
+export function ThreadRow({ thread }: { thread: EmailThread }) {
+ return (
+ <Row>
+ <Heading>
+ <AvatarStack>
+ {thread.participants.map((participant) => (
+ <PersonAvatar
+ key={participant.name}
+ person={{
+ avatarUrl: participant.avatarUrl,
+ name: participant.name,
+ }}
+ size={16}
+ />
+ ))}
+ </AvatarStack>
+ <SenderNames>
+ {thread.participants
+ .map((participant) => participant.name)
+ .join(', ')}
+ </SenderNames>
+ <ThreadCount>{thread.messageCount}</ThreadCount>
+ </Heading>
+ <SubjectBody>
+ {thread.shared ? (
+ <>
+ <Subject>{thread.subject}</Subject>
+ <Preview>{thread.preview}</Preview>
+ </>
+ ) : (
+ <NotShared>
+ <IconLock size={14} stroke={2} />
+ Not shared
+ </NotShared>
+ )}
+ </SubjectBody>
+ <ReceivedAt>{thread.date}</ReceivedAt>
+ </Row>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/EmailsVisual/data/threads.ts b/packages/twenty-website/src/sections/product-feature/EmailsVisual/data/threads.ts
new file mode 100644
index 00000000000..58071e59654
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/EmailsVisual/data/threads.ts
@@ -0,0 +1,26 @@
+import { sharedAssetUrls } from '@/app-preview/data/shared-asset-urls';
+
+import { type EmailThread } from '../types/email-thread';
+
+const PEOPLE = sharedAssetUrls.peopleAvatars;
+
+export const THREADS: EmailThread[] = [
+ {
+ date: '1:30pm',
+ messageCount: 2,
+ participants: [{ avatarUrl: PEOPLE.anonymousMike, name: 'Mike' }],
+ shared: false,
+ },
+ {
+ date: '4 nov 2023',
+ messageCount: 4,
+ participants: [
+ { avatarUrl: PEOPLE.anonymousFelix, name: 'Félix' },
+ { avatarUrl: PEOPLE.anonymousThomas, name: 'Thomas' },
+ ],
+ preview:
+ "Hey team, I've been in touch with Notion and Figma about potential integrations.",
+ shared: true,
+ subject: 'Partnerships - Q4 Strategy',
+ },
+];
diff --git a/packages/twenty-website/src/sections/product-feature/EmailsVisual/index.ts b/packages/twenty-website/src/sections/product-feature/EmailsVisual/index.ts
new file mode 100644
index 00000000000..ae4a2375a5f
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/EmailsVisual/index.ts
@@ -0,0 +1 @@
+export { EmailsVisual } from './EmailsVisual';
diff --git a/packages/twenty-website/src/sections/product-feature/EmailsVisual/types/email-thread.ts b/packages/twenty-website/src/sections/product-feature/EmailsVisual/types/email-thread.ts
new file mode 100644
index 00000000000..57aa48955eb
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/EmailsVisual/types/email-thread.ts
@@ -0,0 +1,13 @@
+type Participant = {
+ avatarUrl: string;
+ name: string;
+};
+
+export type EmailThread = {
+ date: string;
+ messageCount: number;
+ participants: Participant[];
+ preview?: string;
+ shared: boolean;
+ subject?: string;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/FilesVisual.tsx b/packages/twenty-website/src/sections/product-feature/FilesVisual.tsx
deleted file mode 100644
index c49ad776207..00000000000
--- a/packages/twenty-website/src/sections/product-feature/FilesVisual.tsx
+++ /dev/null
@@ -1,222 +0,0 @@
-'use client';
-
-import { styled } from '@linaria/react';
-import {
- IconCalendar,
- IconDotsVertical,
- IconFileText,
- IconPhoto,
- IconPlus,
- IconPresentation,
- IconTable,
-} from '@tabler/icons-react';
-import { type ComponentType } from 'react';
-import { THEME_LIGHT } from 'twenty-ui/theme';
-
-import { previewFontSize } from '@/app-preview/preview-font-size';
-
-import { RecordTabHeader } from './RecordTabHeader';
-
-type FileCategory = 'document' | 'image' | 'presentation' | 'spreadsheet';
-
-type FileGlyph = ComponentType<{ size?: number; stroke?: number }>;
-
-// twenty-front's file-type icon by category: a solid colour box (document blue,
-// spreadsheet turquoise, presentation orange, image amber) with a white glyph.
-const FILE_ICONS: Record<FileCategory, FileGlyph> = {
- document: IconFileText,
- image: IconPhoto,
- presentation: IconPresentation,
- spreadsheet: IconTable,
-};
-
-const FILES: { category: FileCategory; date: string; name: string }[] = [
- { category: 'document', date: 'Jul 1', name: 'NDA - Anthropic.pdf' },
- { category: 'spreadsheet', date: 'Jul 12', name: 'Pricing Q4.xlsx' },
- { category: 'presentation', date: 'Jul 18', name: 'Onboarding deck.pptx' },
- { category: 'image', date: 'Jul 20', name: 'Brand assets.png' },
- { category: 'document', date: 'Jul 24', name: 'Security review.docx' },
-];
-
-const Root = styled.div`
- background-color: ${THEME_LIGHT.background.primary};
- display: flex;
- flex-direction: column;
- font-family: var(--font-product), sans-serif;
- height: 100%;
- overflow: hidden;
- width: 100%;
-`;
-
-const Panel = styled.div`
- display: flex;
- flex: 1;
- flex-direction: column;
- min-height: 0;
- overflow: hidden;
- padding-top: 8px;
-`;
-
-const TitleBar = styled.div`
- align-items: center;
- display: flex;
- flex-shrink: 0;
- justify-content: space-between;
- padding: 8px 16px 12px;
-`;
-
-const Title = styled.span`
- align-items: baseline;
- color: ${THEME_LIGHT.font.color.primary};
- display: flex;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- font-weight: ${THEME_LIGHT.font.weight.semiBold};
-`;
-
-const Count = styled.span`
- color: ${THEME_LIGHT.font.color.light};
- font-weight: ${THEME_LIGHT.font.weight.regular};
- margin-left: 8px;
-`;
-
-const AddButton = styled.span`
- align-items: center;
- border: 1px solid ${THEME_LIGHT.border.color.medium};
- border-radius: ${THEME_LIGHT.border.radius.sm};
- color: ${THEME_LIGHT.font.color.secondary};
- display: inline-flex;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
- font-weight: ${THEME_LIGHT.font.weight.medium};
- gap: 4px;
- padding: 4px 8px;
-`;
-
-const List = styled.div`
- display: flex;
- flex: 1;
- flex-direction: column;
- min-height: 0;
- overflow: hidden;
-`;
-
-const Row = styled.div`
- align-items: center;
- box-sizing: border-box;
- display: flex;
- gap: 8px;
- height: 48px;
- padding: 0 16px;
-
- &:hover {
- background-color: ${THEME_LIGHT.background.transparent.light};
- }
-`;
-
-const Left = styled.div`
- align-items: center;
- display: flex;
- flex: 1;
- gap: 12px;
- min-width: 0;
- overflow: hidden;
-`;
-
-const FileIconBox = styled.span`
- align-items: center;
- border-radius: ${THEME_LIGHT.border.radius.sm};
- color: ${THEME_LIGHT.font.color.inverted};
- display: flex;
- flex-shrink: 0;
- justify-content: center;
- padding: 5px;
-
- &[data-category='document'] {
- background: ${THEME_LIGHT.color.blue};
- }
- &[data-category='image'] {
- background: ${THEME_LIGHT.color.amber};
- }
- &[data-category='presentation'] {
- background: ${THEME_LIGHT.color.orange};
- }
- &[data-category='spreadsheet'] {
- background: ${THEME_LIGHT.color.turquoise};
- }
-`;
-
-const FileName = styled.span`
- color: ${THEME_LIGHT.font.color.primary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const Right = styled.div`
- align-items: center;
- color: ${THEME_LIGHT.font.color.light};
- display: inline-flex;
- flex-shrink: 0;
- gap: 2px;
-`;
-
-const DateText = styled.span`
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- white-space: nowrap;
-`;
-
-const CalendarIcon = styled.span`
- align-items: center;
- display: inline-flex;
-`;
-
-const Dots = styled.span`
- align-items: center;
- display: inline-flex;
- margin-left: 4px;
-`;
-
-export function FilesVisual({ active: _active }: { active: boolean }) {
- return (
- <Root>
- <RecordTabHeader active="Files" />
- <Panel>
- <TitleBar>
- <Title>
- All
- <Count>{FILES.length}</Count>
- </Title>
- <AddButton>
- <IconPlus size={12} stroke={2} />
- Add file
- </AddButton>
- </TitleBar>
- <List>
- {FILES.map((file) => {
- const FileGlyphIcon = FILE_ICONS[file.category];
- return (
- <Row key={file.name}>
- <Left>
- <FileIconBox data-category={file.category}>
- <FileGlyphIcon size={14} stroke={1.6} />
- </FileIconBox>
- <FileName>{file.name}</FileName>
- </Left>
- <Right>
- <CalendarIcon>
- <IconCalendar size={16} stroke={2} />
- </CalendarIcon>
- <DateText>{file.date}</DateText>
- <Dots>
- <IconDotsVertical size={16} stroke={2} />
- </Dots>
- </Right>
- </Row>
- );
- })}
- </List>
- </Panel>
- </Root>
- );
-}
diff --git a/packages/twenty-website/src/sections/product-feature/FilesVisual/FilesVisual.tsx b/packages/twenty-website/src/sections/product-feature/FilesVisual/FilesVisual.tsx
new file mode 100644
index 00000000000..6b973aeb281
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/FilesVisual/FilesVisual.tsx
@@ -0,0 +1,97 @@
+'use client';
+
+import { styled } from '@linaria/react';
+import { IconPlus } from '@tabler/icons-react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { RecordTabHeader } from '../components/RecordTabHeader';
+import { FileRow } from './components/FileRow';
+import { FILES } from './data/files';
+
+const Root = styled.div`
+ background-color: ${THEME_LIGHT.background.primary};
+ display: flex;
+ flex-direction: column;
+ font-family: var(--font-product), sans-serif;
+ height: 100%;
+ overflow: hidden;
+ width: 100%;
+`;
+
+const Panel = styled.div`
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ min-height: 0;
+ overflow: hidden;
+ padding-top: 8px;
+`;
+
+const TitleBar = styled.div`
+ align-items: center;
+ display: flex;
+ flex-shrink: 0;
+ justify-content: space-between;
+ padding: 8px 16px 12px;
+`;
+
+const Title = styled.span`
+ align-items: baseline;
+ color: ${THEME_LIGHT.font.color.primary};
+ display: flex;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ font-weight: ${THEME_LIGHT.font.weight.semiBold};
+`;
+
+const Count = styled.span`
+ color: ${THEME_LIGHT.font.color.light};
+ font-weight: ${THEME_LIGHT.font.weight.regular};
+ margin-left: 8px;
+`;
+
+const AddButton = styled.span`
+ align-items: center;
+ border: 1px solid ${THEME_LIGHT.border.color.medium};
+ border-radius: ${THEME_LIGHT.border.radius.sm};
+ color: ${THEME_LIGHT.font.color.secondary};
+ display: inline-flex;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
+ font-weight: ${THEME_LIGHT.font.weight.medium};
+ gap: 4px;
+ padding: 4px 8px;
+`;
+
+const List = styled.div`
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ min-height: 0;
+ overflow: hidden;
+`;
+
+export function FilesVisual({ active: _active }: { active: boolean }) {
+ return (
+ <Root>
+ <RecordTabHeader active="Files" />
+ <Panel>
+ <TitleBar>
+ <Title>
+ All
+ <Count>{FILES.length}</Count>
+ </Title>
+ <AddButton>
+ <IconPlus size={12} stroke={2} />
+ Add file
+ </AddButton>
+ </TitleBar>
+ <List>
+ {FILES.map((file) => (
+ <FileRow key={file.name} file={file} />
+ ))}
+ </List>
+ </Panel>
+ </Root>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/FilesVisual/components/FileRow.tsx b/packages/twenty-website/src/sections/product-feature/FilesVisual/components/FileRow.tsx
new file mode 100644
index 00000000000..ecaeaf83bf4
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/FilesVisual/components/FileRow.tsx
@@ -0,0 +1,109 @@
+import { styled } from '@linaria/react';
+import { IconCalendar, IconDotsVertical } from '@tabler/icons-react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { FILE_ICONS } from '../data/file-icons';
+import { type FileEntry } from '../types/file-entry';
+
+const Row = styled.div`
+ align-items: center;
+ box-sizing: border-box;
+ display: flex;
+ gap: 8px;
+ height: 48px;
+ padding: 0 16px;
+
+ &:hover {
+ background-color: ${THEME_LIGHT.background.transparent.light};
+ }
+`;
+
+const Left = styled.div`
+ align-items: center;
+ display: flex;
+ flex: 1;
+ gap: 12px;
+ min-width: 0;
+ overflow: hidden;
+`;
+
+const FileIconBox = styled.span`
+ align-items: center;
+ border-radius: ${THEME_LIGHT.border.radius.sm};
+ color: ${THEME_LIGHT.font.color.inverted};
+ display: flex;
+ flex-shrink: 0;
+ justify-content: center;
+ padding: 5px;
+
+ &[data-category='document'] {
+ background: ${THEME_LIGHT.color.blue};
+ }
+ &[data-category='image'] {
+ background: ${THEME_LIGHT.color.amber};
+ }
+ &[data-category='presentation'] {
+ background: ${THEME_LIGHT.color.orange};
+ }
+ &[data-category='spreadsheet'] {
+ background: ${THEME_LIGHT.color.turquoise};
+ }
+`;
+
+const FileName = styled.span`
+ color: ${THEME_LIGHT.font.color.primary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const Right = styled.div`
+ align-items: center;
+ color: ${THEME_LIGHT.font.color.light};
+ display: inline-flex;
+ flex-shrink: 0;
+ gap: 2px;
+`;
+
+const DateText = styled.span`
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ white-space: nowrap;
+`;
+
+const CalendarIcon = styled.span`
+ align-items: center;
+ display: inline-flex;
+`;
+
+const Dots = styled.span`
+ align-items: center;
+ display: inline-flex;
+ margin-left: 4px;
+`;
+
+export function FileRow({ file }: { file: FileEntry }) {
+ const FileGlyphIcon = FILE_ICONS[file.category];
+ return (
+ <Row>
+ <Left>
+ <FileIconBox data-category={file.category}>
+ <FileGlyphIcon size={14} stroke={1.6} />
+ </FileIconBox>
+ <FileName>{file.name}</FileName>
+ </Left>
+ <Right>
+ <CalendarIcon>
+ <IconCalendar size={16} stroke={2} />
+ </CalendarIcon>
+ <DateText>{file.date}</DateText>
+ <Dots>
+ <IconDotsVertical size={16} stroke={2} />
+ </Dots>
+ </Right>
+ </Row>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/FilesVisual/data/file-icons.ts b/packages/twenty-website/src/sections/product-feature/FilesVisual/data/file-icons.ts
new file mode 100644
index 00000000000..dd867948d25
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/FilesVisual/data/file-icons.ts
@@ -0,0 +1,18 @@
+import {
+ IconFileText,
+ IconPhoto,
+ IconPresentation,
+ IconTable,
+} from '@tabler/icons-react';
+import { type ComponentType } from 'react';
+
+import { type FileCategory } from '../types/file-category';
+
+type FileGlyph = ComponentType<{ size?: number; stroke?: number }>;
+
+export const FILE_ICONS: Record<FileCategory, FileGlyph> = {
+ document: IconFileText,
+ image: IconPhoto,
+ presentation: IconPresentation,
+ spreadsheet: IconTable,
+};
diff --git a/packages/twenty-website/src/sections/product-feature/FilesVisual/data/files.ts b/packages/twenty-website/src/sections/product-feature/FilesVisual/data/files.ts
new file mode 100644
index 00000000000..a83f25fa924
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/FilesVisual/data/files.ts
@@ -0,0 +1,9 @@
+import { type FileEntry } from '../types/file-entry';
+
+export const FILES: FileEntry[] = [
+ { category: 'document', date: 'Jul 1', name: 'NDA - Anthropic.pdf' },
+ { category: 'spreadsheet', date: 'Jul 12', name: 'Pricing Q4.xlsx' },
+ { category: 'presentation', date: 'Jul 18', name: 'Onboarding deck.pptx' },
+ { category: 'image', date: 'Jul 20', name: 'Brand assets.png' },
+ { category: 'document', date: 'Jul 24', name: 'Security review.docx' },
+];
diff --git a/packages/twenty-website/src/sections/product-feature/FilesVisual/index.ts b/packages/twenty-website/src/sections/product-feature/FilesVisual/index.ts
new file mode 100644
index 00000000000..0e9579c7aa0
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/FilesVisual/index.ts
@@ -0,0 +1 @@
+export { FilesVisual } from './FilesVisual';
diff --git a/packages/twenty-website/src/sections/product-feature/FilesVisual/types/file-category.ts b/packages/twenty-website/src/sections/product-feature/FilesVisual/types/file-category.ts
new file mode 100644
index 00000000000..4583f1c4160
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/FilesVisual/types/file-category.ts
@@ -0,0 +1,5 @@
+export type FileCategory =
+ | 'document'
+ | 'image'
+ | 'presentation'
+ | 'spreadsheet';
diff --git a/packages/twenty-website/src/sections/product-feature/FilesVisual/types/file-entry.ts b/packages/twenty-website/src/sections/product-feature/FilesVisual/types/file-entry.ts
new file mode 100644
index 00000000000..0dd8099eb3f
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/FilesVisual/types/file-entry.ts
@@ -0,0 +1,7 @@
+import { type FileCategory } from './file-category';
+
+export type FileEntry = {
+ category: FileCategory;
+ date: string;
+ name: string;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/ImportVisual.tsx b/packages/twenty-website/src/sections/product-feature/ImportVisual.tsx
deleted file mode 100644
index 2c307c58e0a..00000000000
--- a/packages/twenty-website/src/sections/product-feature/ImportVisual.tsx
+++ /dev/null
@@ -1,187 +0,0 @@
-'use client';
-
-import { styled } from '@linaria/react';
-import {
- IconBriefcase,
- IconBuildingSkyscraper,
- IconChevronDown,
- IconMail,
- IconUser,
-} from '@tabler/icons-react';
-import { type ComponentType } from 'react';
-import { THEME_LIGHT } from 'twenty-ui/theme';
-
-import { previewFontSize } from '@/app-preview/preview-font-size';
-
-type FieldGlyph = ComponentType<{ size?: number; stroke?: number }>;
-
-// twenty-front's spreadsheet-import "Match Columns" step: each imported column
-// (header + example) maps to a Twenty field. Company maps to a relation.
-const MAPPINGS: {
- Icon: FieldGlyph;
- example: string;
- field: string;
- header: string;
-}[] = [
- { Icon: IconUser, example: 'Dario', field: 'Name', header: 'First Name' },
- {
- Icon: IconMail,
- example: '[email protected]',
- field: 'Emails',
- header: 'Email',
- },
- {
- Icon: IconBuildingSkyscraper,
- example: 'Anthropic',
- field: 'Company',
- header: 'Company',
- },
- {
- Icon: IconBriefcase,
- example: 'CEO',
- field: 'Job Title',
- header: 'Job Title',
- },
-];
-
-const Root = styled.div`
- background-color: ${THEME_LIGHT.background.primary};
- display: flex;
- font-family: var(--font-product), sans-serif;
- height: 100%;
- justify-content: center;
- overflow: hidden;
- width: 100%;
-`;
-
-const Grid = styled.div`
- display: flex;
- flex-direction: column;
- width: 100%;
-`;
-
-const HeaderRow = styled.div`
- background-color: ${THEME_LIGHT.background.secondary};
- border-bottom: 1px solid ${THEME_LIGHT.border.color.medium};
- display: flex;
- flex-shrink: 0;
- min-height: 40px;
-`;
-
-const HeaderCell = styled.span`
- align-items: center;
- color: ${THEME_LIGHT.font.color.light};
- display: flex;
- flex: 1;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- font-weight: ${THEME_LIGHT.font.weight.semiBold};
- padding: 0 16px;
-`;
-
-const MappingRow = styled.div`
- border-bottom: 1px solid ${THEME_LIGHT.border.color.medium};
- display: flex;
- min-height: 64px;
-
- &:last-child {
- border-bottom: none;
- }
-`;
-
-const ImportedCell = styled.div`
- display: flex;
- flex: 1;
- flex-direction: column;
- justify-content: center;
- min-width: 0;
- overflow: hidden;
- padding: 16px 8px 16px 16px;
-`;
-
-const ColumnHeader = styled.span`
- color: ${THEME_LIGHT.font.color.primary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- font-weight: ${THEME_LIGHT.font.weight.medium};
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const ColumnExample = styled.span`
- color: ${THEME_LIGHT.font.color.tertiary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
- font-weight: ${THEME_LIGHT.font.weight.medium};
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const FieldCell = styled.div`
- align-items: center;
- display: flex;
- flex: 1;
- min-width: 0;
- padding: 16px 16px 16px 8px;
-`;
-
-const FieldSelect = styled.span`
- align-items: center;
- background-color: ${THEME_LIGHT.background.transparent.lighter};
- border: 1px solid ${THEME_LIGHT.border.color.medium};
- border-radius: ${THEME_LIGHT.border.radius.sm};
- box-sizing: border-box;
- color: ${THEME_LIGHT.font.color.secondary};
- display: flex;
- gap: 6px;
- min-width: 0;
- padding: 6px 8px;
- width: 100%;
-`;
-
-const FieldName = styled.span`
- color: ${THEME_LIGHT.font.color.primary};
- flex: 1;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const FieldIcon = styled.span`
- align-items: center;
- display: inline-flex;
- flex-shrink: 0;
-`;
-
-export function ImportVisual({ active: _active }: { active: boolean }) {
- return (
- <Root>
- <Grid>
- <HeaderRow>
- <HeaderCell>Imported data</HeaderCell>
- <HeaderCell>Twenty fields</HeaderCell>
- </HeaderRow>
- {MAPPINGS.map(({ Icon, example, field, header }) => (
- <MappingRow key={header}>
- <ImportedCell>
- <ColumnHeader>{header}</ColumnHeader>
- <ColumnExample>ex: {example}</ColumnExample>
- </ImportedCell>
- <FieldCell>
- <FieldSelect>
- <FieldIcon>
- <Icon size={16} stroke={2} />
- </FieldIcon>
- <FieldName>{field}</FieldName>
- <FieldIcon>
- <IconChevronDown size={16} stroke={2} />
- </FieldIcon>
- </FieldSelect>
- </FieldCell>
- </MappingRow>
- ))}
- </Grid>
- </Root>
- );
-}
diff --git a/packages/twenty-website/src/sections/product-feature/ImportVisual/ImportVisual.tsx b/packages/twenty-website/src/sections/product-feature/ImportVisual/ImportVisual.tsx
new file mode 100644
index 00000000000..652f937093d
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ImportVisual/ImportVisual.tsx
@@ -0,0 +1,59 @@
+'use client';
+
+import { styled } from '@linaria/react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { MappingRow } from './components/MappingRow';
+import { MAPPINGS } from './data/import-mappings';
+
+const Root = styled.div`
+ background-color: ${THEME_LIGHT.background.primary};
+ display: flex;
+ font-family: var(--font-product), sans-serif;
+ height: 100%;
+ justify-content: center;
+ overflow: hidden;
+ width: 100%;
+`;
+
+const Grid = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+`;
+
+const HeaderRow = styled.div`
+ background-color: ${THEME_LIGHT.background.secondary};
+ border-bottom: 1px solid ${THEME_LIGHT.border.color.medium};
+ display: flex;
+ flex-shrink: 0;
+ min-height: 40px;
+`;
+
+const HeaderCell = styled.span`
+ align-items: center;
+ color: ${THEME_LIGHT.font.color.light};
+ display: flex;
+ flex: 1;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ font-weight: ${THEME_LIGHT.font.weight.semiBold};
+ padding: 0 16px;
+`;
+
+export function ImportVisual({ active: _active }: { active: boolean }) {
+ return (
+ <Root>
+ <Grid>
+ <HeaderRow>
+ <HeaderCell>Imported data</HeaderCell>
+ <HeaderCell>Twenty fields</HeaderCell>
+ </HeaderRow>
+ {MAPPINGS.map((mapping) => (
+ <MappingRow key={mapping.header} mapping={mapping} />
+ ))}
+ </Grid>
+ </Root>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/ImportVisual/components/MappingRow.tsx b/packages/twenty-website/src/sections/product-feature/ImportVisual/components/MappingRow.tsx
new file mode 100644
index 00000000000..f9ff3b3d7b2
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ImportVisual/components/MappingRow.tsx
@@ -0,0 +1,106 @@
+import { styled } from '@linaria/react';
+import { IconChevronDown } from '@tabler/icons-react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { type ColumnMapping } from '../types/column-mapping';
+
+const Row = styled.div`
+ border-bottom: 1px solid ${THEME_LIGHT.border.color.medium};
+ display: flex;
+ min-height: 64px;
+
+ &:last-child {
+ border-bottom: none;
+ }
+`;
+
+const ImportedCell = styled.div`
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ justify-content: center;
+ min-width: 0;
+ overflow: hidden;
+ padding: 16px 8px 16px 16px;
+`;
+
+const ColumnHeader = styled.span`
+ color: ${THEME_LIGHT.font.color.primary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ font-weight: ${THEME_LIGHT.font.weight.medium};
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const ColumnExample = styled.span`
+ color: ${THEME_LIGHT.font.color.tertiary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
+ font-weight: ${THEME_LIGHT.font.weight.medium};
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const FieldCell = styled.div`
+ align-items: center;
+ display: flex;
+ flex: 1;
+ min-width: 0;
+ padding: 16px 16px 16px 8px;
+`;
+
+const FieldSelect = styled.span`
+ align-items: center;
+ background-color: ${THEME_LIGHT.background.transparent.lighter};
+ border: 1px solid ${THEME_LIGHT.border.color.medium};
+ border-radius: ${THEME_LIGHT.border.radius.sm};
+ box-sizing: border-box;
+ color: ${THEME_LIGHT.font.color.secondary};
+ display: flex;
+ gap: 6px;
+ min-width: 0;
+ padding: 6px 8px;
+ width: 100%;
+`;
+
+const FieldName = styled.span`
+ color: ${THEME_LIGHT.font.color.primary};
+ flex: 1;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const FieldIcon = styled.span`
+ align-items: center;
+ display: inline-flex;
+ flex-shrink: 0;
+`;
+
+export function MappingRow({ mapping }: { mapping: ColumnMapping }) {
+ const { Icon, example, field, header } = mapping;
+ return (
+ <Row>
+ <ImportedCell>
+ <ColumnHeader>{header}</ColumnHeader>
+ <ColumnExample>ex: {example}</ColumnExample>
+ </ImportedCell>
+ <FieldCell>
+ <FieldSelect>
+ <FieldIcon>
+ <Icon size={16} stroke={2} />
+ </FieldIcon>
+ <FieldName>{field}</FieldName>
+ <FieldIcon>
+ <IconChevronDown size={16} stroke={2} />
+ </FieldIcon>
+ </FieldSelect>
+ </FieldCell>
+ </Row>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/ImportVisual/data/import-mappings.ts b/packages/twenty-website/src/sections/product-feature/ImportVisual/data/import-mappings.ts
new file mode 100644
index 00000000000..09c769c27e9
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ImportVisual/data/import-mappings.ts
@@ -0,0 +1,30 @@
+import {
+ IconBriefcase,
+ IconBuildingSkyscraper,
+ IconMail,
+ IconUser,
+} from '@tabler/icons-react';
+
+import { type ColumnMapping } from '../types/column-mapping';
+
+export const MAPPINGS: ColumnMapping[] = [
+ { Icon: IconUser, example: 'Dario', field: 'Name', header: 'First Name' },
+ {
+ Icon: IconMail,
+ example: '[email protected]',
+ field: 'Emails',
+ header: 'Email',
+ },
+ {
+ Icon: IconBuildingSkyscraper,
+ example: 'Anthropic',
+ field: 'Company',
+ header: 'Company',
+ },
+ {
+ Icon: IconBriefcase,
+ example: 'CEO',
+ field: 'Job Title',
+ header: 'Job Title',
+ },
+];
diff --git a/packages/twenty-website/src/sections/product-feature/ImportVisual/index.ts b/packages/twenty-website/src/sections/product-feature/ImportVisual/index.ts
new file mode 100644
index 00000000000..a633e3dd626
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ImportVisual/index.ts
@@ -0,0 +1 @@
+export { ImportVisual } from './ImportVisual';
diff --git a/packages/twenty-website/src/sections/product-feature/ImportVisual/types/column-mapping.ts b/packages/twenty-website/src/sections/product-feature/ImportVisual/types/column-mapping.ts
new file mode 100644
index 00000000000..ff2ca71ed12
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/ImportVisual/types/column-mapping.ts
@@ -0,0 +1,10 @@
+import { type ComponentType } from 'react';
+
+type FieldGlyph = ComponentType<{ size?: number; stroke?: number }>;
+
+export type ColumnMapping = {
+ Icon: FieldGlyph;
+ example: string;
+ field: string;
+ header: string;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/ProductFeature.tsx b/packages/twenty-website/src/sections/product-feature/ProductFeature.tsx
index 550ef3b623d..c7195f31bfd 100644
--- a/packages/twenty-website/src/sections/product-feature/ProductFeature.tsx
+++ b/packages/twenty-website/src/sections/product-feature/ProductFeature.tsx
@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';
import { msg } from '@lingui/core/macro';
import { getServerI18n } from '@/platform/i18n/get-server-i18n';
-import { color, mediaUp, radius, spacing } from '@/tokens';
+import { spacing } from '@/tokens';
import {
Eyebrow,
Heading,
@@ -11,10 +11,8 @@ import {
SectionStack,
} from '@/ui';
-import { FEATURE_TILES, type FeatureTile } from './feature-tiles';
-import { ScrollEntrance } from './ScrollEntrance';
-import { TileContent } from './TileContent';
-import { TileVisual } from './TileVisual';
+import { Tiles } from './components/Tiles';
+import { FEATURE_TILES } from './data/feature-tiles';
const IntroMeasure = styled.div`
margin-inline: auto;
@@ -26,157 +24,6 @@ const IntroMeasure = styled.div`
}
`;
-const Grid = styled.div`
- border: 1px solid ${color('black-20')};
- border-radius: ${radius(2)};
- display: grid;
- grid-template-columns: 1fr;
- overflow: hidden;
-
- ${mediaUp('md')} {
- grid-template-columns: repeat(100, 1fr);
- }
-`;
-
-const SpotlightCell = styled.div`
- background-color: ${color('neutral')};
- border-bottom: 1px solid ${color('black-20')};
- display: flex;
- flex-direction: column;
- min-width: 0;
-
- ${mediaUp('md')} {
- grid-column: span 100;
- }
-`;
-
-const GridCell = styled.div`
- background-color: ${color('neutral')};
- border-bottom: 1px solid ${color('black-20')};
- display: flex;
- flex-direction: column;
- min-width: 0;
-
- ${mediaUp('md')} {
- &[data-span='40'] {
- grid-column: span 40;
- }
-
- &[data-span='60'] {
- grid-column: span 60;
- }
-
- &:nth-child(even) {
- border-right: 1px solid ${color('black-20')};
- }
-
- &:nth-last-child(-n + 2) {
- border-bottom: none;
- }
- }
-`;
-
-const SpotlightInner = styled.div`
- display: flex;
- flex-direction: column;
- height: 100%;
- width: 100%;
-`;
-
-const SpotlightContent = styled.div`
- width: 100%;
-`;
-
-const SpotlightVisual = styled.div`
- border: 1px solid ${color('black-20')};
- border-radius: ${radius(2)};
- margin: ${spacing(4)};
- min-height: 260px;
- overflow: hidden;
-
- ${mediaUp('md')} {
- margin: ${spacing(5)};
- min-height: 420px;
- }
-`;
-
-const CardInner = styled.div`
- display: flex;
- flex-direction: column;
- height: 100%;
- width: 100%;
-`;
-
-const CardVisualFrame = styled.div`
- border: 1px solid ${color('black-20')};
- border-radius: ${radius(2)};
- height: 300px;
- margin: ${spacing(4)} ${spacing(4)} 0;
- overflow: hidden;
- position: relative;
-
- ${mediaUp('md')} {
- height: 340px;
- margin: ${spacing(5)} ${spacing(5)} 0;
- }
-`;
-
-const CARD_SPANS = [60, 40, 40, 60, 60, 40];
-
-function padCounter(value: number): string {
- return String(value).padStart(2, '0');
-}
-
-function formatCounter(position: number, totalCount: number): string {
- return `${padCounter(position)} / ${padCounter(totalCount)}`;
-}
-
-function Tiles({ tiles }: { tiles: FeatureTile[] }) {
- const totalCount = tiles.length;
- const numberedTiles = tiles.map((tile, tileNumber) => ({
- tile,
- tileNumber,
- }));
-
- return (
- <Grid>
- {numberedTiles.map(({ tile, tileNumber }) => {
- const counter = formatCounter(tileNumber + 1, totalCount);
-
- if (tileNumber === 0) {
- return (
- <SpotlightCell key={tileNumber}>
- <ScrollEntrance>
- <SpotlightInner>
- <SpotlightVisual>
- <TileVisual visualKey={tile.visual} />
- </SpotlightVisual>
- <SpotlightContent>
- <TileContent counter={counter} spotlight tile={tile} />
- </SpotlightContent>
- </SpotlightInner>
- </ScrollEntrance>
- </SpotlightCell>
- );
- }
-
- return (
- <GridCell key={tileNumber} data-span={CARD_SPANS[tileNumber - 1]}>
- <ScrollEntrance>
- <CardInner>
- <CardVisualFrame>
- <TileVisual visualKey={tile.visual} />
- </CardVisualFrame>
- <TileContent counter={counter} spotlight={false} tile={tile} />
- </CardInner>
- </ScrollEntrance>
- </GridCell>
- );
- })}
- </Grid>
- );
-}
-
export function ProductFeature() {
const i18n = getServerI18n();
diff --git a/packages/twenty-website/src/sections/product-feature/TasksVisual.tsx b/packages/twenty-website/src/sections/product-feature/TasksVisual.tsx
deleted file mode 100644
index e0492f3f5f7..00000000000
--- a/packages/twenty-website/src/sections/product-feature/TasksVisual.tsx
+++ /dev/null
@@ -1,235 +0,0 @@
-'use client';
-
-import { styled } from '@linaria/react';
-import { IconCalendar, IconCheck } from '@tabler/icons-react';
-import { THEME_LIGHT } from 'twenty-ui/theme';
-
-import { sharedAssetUrls } from '@/app-preview/data/shared-asset-urls';
-import { Chip } from '@/app-preview/primitives/Chip';
-import { PersonAvatar } from '@/app-preview/primitives/PersonAvatar';
-import { previewFontSize } from '@/app-preview/preview-font-size';
-
-import { RecordTabHeader } from './RecordTabHeader';
-
-const PEOPLE = sharedAssetUrls.peopleAvatars;
-
-type TaskTarget = {
- avatarUrl: string;
- name: string;
-};
-
-type Task = {
- body: string;
- done: boolean;
- due: string;
- target: TaskTarget;
- title: string;
-};
-
-const TASKS: Task[] = [
- {
- body: 'Loop in legal before sending.',
- done: false,
- due: 'Tomorrow',
- target: { avatarUrl: PEOPLE.darioAmodei, name: 'Dario Amodei' },
- title: 'Send NDA',
- },
- {
- body: 'Send the updated annual quote.',
- done: false,
- due: 'Jul 24',
- target: { avatarUrl: PEOPLE.patrickCollison, name: 'Patrick Collison' },
- title: 'Follow up on pricing',
- },
- {
- body: 'Use the Q3 template.',
- done: false,
- due: 'Jul 26',
- target: { avatarUrl: PEOPLE.dylanField, name: 'Dylan Field' },
- title: 'Onboarding deck',
- },
- {
- body: 'Coordinated with the data team.',
- done: true,
- due: 'Jul 18',
- target: { avatarUrl: PEOPLE.darioAmodei, name: 'Dario Amodei' },
- title: 'Schedule security review',
- },
-];
-
-const TASK_GROUPS = [
- { items: TASKS.filter((task) => !task.done), label: 'To do' },
- { items: TASKS.filter((task) => task.done), label: 'Done' },
-];
-
-const Root = styled.div`
- background-color: ${THEME_LIGHT.background.primary};
- display: flex;
- flex-direction: column;
- font-family: var(--font-product), sans-serif;
- height: 100%;
- overflow: hidden;
- width: 100%;
-`;
-
-const Panel = styled.div`
- display: flex;
- flex: 1;
- flex-direction: column;
- min-height: 0;
- overflow: hidden;
- padding: 8px 0;
-`;
-
-const Group = styled.div`
- display: flex;
- flex-direction: column;
-
- & + & {
- margin-top: 8px;
- }
-`;
-
-const GroupHeader = styled.div`
- align-items: center;
- color: ${THEME_LIGHT.font.color.light};
- display: flex;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
- font-weight: ${THEME_LIGHT.font.weight.semiBold};
- gap: 6px;
- padding: 0 16px 4px;
-`;
-
-const GroupCount = styled.span`
- color: ${THEME_LIGHT.font.color.tertiary};
- font-weight: ${THEME_LIGHT.font.weight.medium};
-`;
-
-const Row = styled.div`
- align-items: center;
- box-sizing: border-box;
- display: flex;
- gap: 8px;
- height: 48px;
- padding: 0 16px;
-
- &:hover {
- background-color: ${THEME_LIGHT.background.transparent.light};
- }
-`;
-
-const RowLeft = styled.div`
- align-items: center;
- display: flex;
- flex: 1;
- min-width: 0;
- overflow: hidden;
-`;
-
-const Checkbox = styled.span`
- align-items: center;
- border: 1px solid ${THEME_LIGHT.border.color.strong};
- border-radius: ${THEME_LIGHT.border.radius.rounded};
- box-sizing: border-box;
- color: ${THEME_LIGHT.font.color.inverted};
- display: flex;
- flex-shrink: 0;
- height: 14px;
- justify-content: center;
- width: 14px;
-
- &[data-done] {
- background-color: ${THEME_LIGHT.color.blue};
- border-color: ${THEME_LIGHT.color.blue};
- }
-`;
-
-const Title = styled.span`
- color: ${THEME_LIGHT.font.color.primary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- font-weight: ${THEME_LIGHT.font.weight.medium};
- overflow: hidden;
- padding: 0 ${THEME_LIGHT.spacing(2)};
- text-overflow: ellipsis;
- white-space: nowrap;
-
- &[data-done] {
- text-decoration: line-through;
- }
-`;
-
-const Body = styled.span`
- color: ${THEME_LIGHT.font.color.tertiary};
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-`;
-
-const RowRight = styled.div`
- align-items: center;
- display: inline-flex;
- flex-shrink: 0;
- gap: 8px;
- max-width: 50%;
-`;
-
-const Due = styled.span`
- align-items: center;
- color: ${THEME_LIGHT.font.color.secondary};
- display: flex;
- flex-shrink: 0;
- font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
- gap: ${THEME_LIGHT.spacing(1)};
- white-space: nowrap;
-`;
-
-export function TasksVisual({ active: _active }: { active: boolean }) {
- return (
- <Root>
- <RecordTabHeader active="Tasks" />
- <Panel>
- {TASK_GROUPS.map((group) => (
- <Group key={group.label}>
- <GroupHeader>
- {group.label}
- <GroupCount>{group.items.length}</GroupCount>
- </GroupHeader>
- {group.items.map((task) => (
- <Row key={task.title}>
- <RowLeft>
- <Checkbox data-done={task.done ? '' : undefined}>
- {task.done ? <IconCheck size={11} stroke={2.5} /> : null}
- </Checkbox>
- <Title data-done={task.done ? '' : undefined}>
- {task.title}
- </Title>
- <Body>{task.body}</Body>
- </RowLeft>
- <RowRight>
- <Due>
- <IconCalendar size={16} stroke={2} />
- {task.due}
- </Due>
- <Chip
- label={task.target.name}
- leftComponent={
- <PersonAvatar
- person={{
- avatarUrl: task.target.avatarUrl,
- name: task.target.name,
- }}
- />
- }
- variant="transparent"
- />
- </RowRight>
- </Row>
- ))}
- </Group>
- ))}
- </Panel>
- </Root>
- );
-}
diff --git a/packages/twenty-website/src/sections/product-feature/TasksVisual/TasksVisual.tsx b/packages/twenty-website/src/sections/product-feature/TasksVisual/TasksVisual.tsx
new file mode 100644
index 00000000000..65192821b64
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/TasksVisual/TasksVisual.tsx
@@ -0,0 +1,74 @@
+'use client';
+
+import { styled } from '@linaria/react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { RecordTabHeader } from '../components/RecordTabHeader';
+import { TaskRow } from './components/TaskRow';
+import { TASK_GROUPS } from './data/task-groups';
+
+const Root = styled.div`
+ background-color: ${THEME_LIGHT.background.primary};
+ display: flex;
+ flex-direction: column;
+ font-family: var(--font-product), sans-serif;
+ height: 100%;
+ overflow: hidden;
+ width: 100%;
+`;
+
+const Panel = styled.div`
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ min-height: 0;
+ overflow: hidden;
+ padding: 8px 0;
+`;
+
+const Group = styled.div`
+ display: flex;
+ flex-direction: column;
+
+ & + & {
+ margin-top: 8px;
+ }
+`;
+
+const GroupHeader = styled.div`
+ align-items: center;
+ color: ${THEME_LIGHT.font.color.light};
+ display: flex;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.sm)};
+ font-weight: ${THEME_LIGHT.font.weight.semiBold};
+ gap: 6px;
+ padding: 0 16px 4px;
+`;
+
+const GroupCount = styled.span`
+ color: ${THEME_LIGHT.font.color.tertiary};
+ font-weight: ${THEME_LIGHT.font.weight.medium};
+`;
+
+export function TasksVisual({ active: _active }: { active: boolean }) {
+ return (
+ <Root>
+ <RecordTabHeader active="Tasks" />
+ <Panel>
+ {TASK_GROUPS.map((group) => (
+ <Group key={group.label}>
+ <GroupHeader>
+ {group.label}
+ <GroupCount>{group.items.length}</GroupCount>
+ </GroupHeader>
+ {group.items.map((task) => (
+ <TaskRow key={task.title} task={task} />
+ ))}
+ </Group>
+ ))}
+ </Panel>
+ </Root>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/TasksVisual/components/TaskRow.tsx b/packages/twenty-website/src/sections/product-feature/TasksVisual/components/TaskRow.tsx
new file mode 100644
index 00000000000..52f5a9bc22c
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/TasksVisual/components/TaskRow.tsx
@@ -0,0 +1,121 @@
+import { styled } from '@linaria/react';
+import { IconCalendar, IconCheck } from '@tabler/icons-react';
+import { THEME_LIGHT } from 'twenty-ui/theme';
+
+import { Chip } from '@/app-preview/primitives/Chip';
+import { PersonAvatar } from '@/app-preview/primitives/PersonAvatar';
+import { previewFontSize } from '@/app-preview/preview-font-size';
+
+import { type Task } from '../types/task';
+
+const Row = styled.div`
+ align-items: center;
+ box-sizing: border-box;
+ display: flex;
+ gap: 8px;
+ height: 48px;
+ padding: 0 16px;
+
+ &:hover {
+ background-color: ${THEME_LIGHT.background.transparent.light};
+ }
+`;
+
+const RowLeft = styled.div`
+ align-items: center;
+ display: flex;
+ flex: 1;
+ min-width: 0;
+ overflow: hidden;
+`;
+
+const Checkbox = styled.span`
+ align-items: center;
+ border: 1px solid ${THEME_LIGHT.border.color.strong};
+ border-radius: ${THEME_LIGHT.border.radius.rounded};
+ box-sizing: border-box;
+ color: ${THEME_LIGHT.font.color.inverted};
+ display: flex;
+ flex-shrink: 0;
+ height: 14px;
+ justify-content: center;
+ width: 14px;
+
+ &[data-done] {
+ background-color: ${THEME_LIGHT.color.blue};
+ border-color: ${THEME_LIGHT.color.blue};
+ }
+`;
+
+const Title = styled.span`
+ color: ${THEME_LIGHT.font.color.primary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ font-weight: ${THEME_LIGHT.font.weight.medium};
+ overflow: hidden;
+ padding: 0 ${THEME_LIGHT.spacing(2)};
+ text-overflow: ellipsis;
+ white-space: nowrap;
+
+ &[data-done] {
+ text-decoration: line-through;
+ }
+`;
+
+const Body = styled.span`
+ color: ${THEME_LIGHT.font.color.tertiary};
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`;
+
+const RowRight = styled.div`
+ align-items: center;
+ display: inline-flex;
+ flex-shrink: 0;
+ gap: 8px;
+ max-width: 50%;
+`;
+
+const Due = styled.span`
+ align-items: center;
+ color: ${THEME_LIGHT.font.color.secondary};
+ display: flex;
+ flex-shrink: 0;
+ font-size: ${previewFontSize(THEME_LIGHT.font.size.md)};
+ gap: ${THEME_LIGHT.spacing(1)};
+ white-space: nowrap;
+`;
+
+export function TaskRow({ task }: { task: Task }) {
+ return (
+ <Row>
+ <RowLeft>
+ <Checkbox data-done={task.done ? '' : undefined}>
+ {task.done ? <IconCheck size={11} stroke={2.5} /> : null}
+ </Checkbox>
+ <Title data-done={task.done ? '' : undefined}>{task.title}</Title>
+ <Body>{task.body}</Body>
+ </RowLeft>
+ <RowRight>
+ <Due>
+ <IconCalendar size={16} stroke={2} />
+ {task.due}
+ </Due>
+ <Chip
+ label={task.target.name}
+ leftComponent={
+ <PersonAvatar
+ person={{
+ avatarUrl: task.target.avatarUrl,
+ name: task.target.name,
+ }}
+ />
+ }
+ variant="transparent"
+ />
+ </RowRight>
+ </Row>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/TasksVisual/data/task-groups.ts b/packages/twenty-website/src/sections/product-feature/TasksVisual/data/task-groups.ts
new file mode 100644
index 00000000000..503804ecb9b
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/TasksVisual/data/task-groups.ts
@@ -0,0 +1,7 @@
+import { type Task } from '../types/task';
+import { TASKS } from './tasks';
+
+export const TASK_GROUPS: { items: Task[]; label: string }[] = [
+ { items: TASKS.filter((task) => !task.done), label: 'To do' },
+ { items: TASKS.filter((task) => task.done), label: 'Done' },
+];
diff --git a/packages/twenty-website/src/sections/product-feature/TasksVisual/data/tasks.ts b/packages/twenty-website/src/sections/product-feature/TasksVisual/data/tasks.ts
new file mode 100644
index 00000000000..ebb1dcf6379
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/TasksVisual/data/tasks.ts
@@ -0,0 +1,36 @@
+import { sharedAssetUrls } from '@/app-preview/data/shared-asset-urls';
+
+import { type Task } from '../types/task';
+
+const PEOPLE = sharedAssetUrls.peopleAvatars;
+
+export const TASKS: Task[] = [
+ {
+ body: 'Loop in legal before sending.',
+ done: false,
+ due: 'Tomorrow',
+ target: { avatarUrl: PEOPLE.darioAmodei, name: 'Dario Amodei' },
+ title: 'Send NDA',
+ },
+ {
+ body: 'Send the updated annual quote.',
+ done: false,
+ due: 'Jul 24',
+ target: { avatarUrl: PEOPLE.patrickCollison, name: 'Patrick Collison' },
+ title: 'Follow up on pricing',
+ },
+ {
+ body: 'Use the Q3 template.',
+ done: false,
+ due: 'Jul 26',
+ target: { avatarUrl: PEOPLE.dylanField, name: 'Dylan Field' },
+ title: 'Onboarding deck',
+ },
+ {
+ body: 'Coordinated with the data team.',
+ done: true,
+ due: 'Jul 18',
+ target: { avatarUrl: PEOPLE.darioAmodei, name: 'Dario Amodei' },
+ title: 'Schedule security review',
+ },
+];
diff --git a/packages/twenty-website/src/sections/product-feature/TasksVisual/index.ts b/packages/twenty-website/src/sections/product-feature/TasksVisual/index.ts
new file mode 100644
index 00000000000..0ac40302216
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/TasksVisual/index.ts
@@ -0,0 +1 @@
+export { TasksVisual } from './TasksVisual';
diff --git a/packages/twenty-website/src/sections/product-feature/TasksVisual/types/task.ts b/packages/twenty-website/src/sections/product-feature/TasksVisual/types/task.ts
new file mode 100644
index 00000000000..91eaa95fcac
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/TasksVisual/types/task.ts
@@ -0,0 +1,12 @@
+type TaskTarget = {
+ avatarUrl: string;
+ name: string;
+};
+
+export type Task = {
+ body: string;
+ done: boolean;
+ due: string;
+ target: TaskTarget;
+ title: string;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/TileVisual.tsx b/packages/twenty-website/src/sections/product-feature/TileVisual.tsx
deleted file mode 100644
index 6bc91396e5c..00000000000
--- a/packages/twenty-website/src/sections/product-feature/TileVisual.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-'use client';
-
-import { useEffect, useRef, useState, type ComponentType } from 'react';
-
-import { observeElementVisibility } from '@/platform/visuals/engine/observe-element-visibility';
-
-import { ContactsVisual } from './ContactsVisual';
-import { DashboardVisual } from './DashboardVisual';
-import { EmailsVisual } from './EmailsVisual';
-import { type FeatureVisualKey } from './feature-tiles';
-import { FilesVisual } from './FilesVisual';
-import { ImportVisual } from './ImportVisual';
-import { PipelineVisual } from './PipelineVisual';
-import { TasksVisual } from './TasksVisual';
-
-const VISUALS: Record<FeatureVisualKey, ComponentType<{ active: boolean }>> = {
- contacts: ContactsVisual,
- dashboard: DashboardVisual,
- emails: EmailsVisual,
- files: FilesVisual,
- import: ImportVisual,
- pipeline: PipelineVisual,
- tasks: TasksVisual,
-};
-
-// A visual is "active" while 30% of it is on screen — each visual
-// decides what its active state animates.
-const ACTIVE_THRESHOLD = 0.3;
-
-export function TileVisual({ visualKey }: { visualKey: FeatureVisualKey }) {
- const ref = useRef<HTMLDivElement>(null);
- const [active, setActive] = useState(false);
-
- useEffect(() => {
- const element = ref.current;
-
- if (!element) {
- return undefined;
- }
-
- return observeElementVisibility(element, setActive, {
- threshold: ACTIVE_THRESHOLD,
- });
- }, []);
-
- const Visual = VISUALS[visualKey];
-
- return (
- <div ref={ref} style={{ height: '100%', width: '100%' }}>
- <Visual active={active} />
- </div>
- );
-}
diff --git a/packages/twenty-website/src/sections/product-feature/WindowChrome.tsx b/packages/twenty-website/src/sections/product-feature/WindowChrome.tsx
deleted file mode 100644
index 8f6d14cf1aa..00000000000
--- a/packages/twenty-website/src/sections/product-feature/WindowChrome.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-import { styled } from '@linaria/react';
-import { type ReactNode } from 'react';
-
-import { PRODUCT_FEATURE_SCENE } from '@/tokens/feature-scenes/product-feature-scene';
-
-const scene = PRODUCT_FEATURE_SCENE.window;
-
-const Window = styled.div`
- background-color: ${scene.background};
- display: flex;
- flex-direction: column;
- height: 100%;
- overflow: hidden;
- width: 100%;
-`;
-
-const Titlebar = styled.div`
- align-items: center;
- border-bottom: 1px solid ${scene.border};
- display: flex;
- flex-shrink: 0;
- gap: 12px;
- padding: 12px 16px;
-`;
-
-const TrafficLights = styled.div`
- display: flex;
- gap: 6px;
-`;
-
-const Dot = styled.span<{ $ink: string }>`
- background-color: ${({ $ink }) => $ink};
- border-radius: 50%;
- height: 9px;
- width: 9px;
-`;
-
-const Title = styled.span`
- color: ${scene.textPrimary};
- font-size: 12px;
- font-weight: 600;
- letter-spacing: 0.01em;
-`;
-
-const Breadcrumb = styled.span`
- color: ${scene.textSecondary};
- font-size: 11px;
- letter-spacing: 0.01em;
- margin-left: auto;
-`;
-
-const Bold = styled.span`
- color: ${scene.textPrimary};
- font-weight: 600;
-`;
-
-const Body = styled.div`
- display: flex;
- flex: 1;
- flex-direction: column;
- min-height: 0;
-`;
-
-// The feature visuals' shared dark mini-window (its own authored stage —
-// not the product mockup's chrome).
-export function WindowChrome({
- breadcrumb,
- breadcrumbBold,
- children,
- title,
-}: {
- breadcrumb?: string;
- breadcrumbBold?: string;
- children: ReactNode;
- title: string;
-}) {
- return (
- <Window>
- <Titlebar>
- <TrafficLights>
- <Dot $ink={scene.trafficDots.close} />
- <Dot $ink={scene.trafficDots.minimize} />
- <Dot $ink={scene.trafficDots.zoom} />
- </TrafficLights>
- <Title>{title}</Title>
- {breadcrumb ? (
- <Breadcrumb>
- {breadcrumb}
- {breadcrumbBold ? (
- <>
- {' / '}
- <Bold>{breadcrumbBold}</Bold>
- </>
- ) : null}
- </Breadcrumb>
- ) : null}
- </Titlebar>
- <Body>{children}</Body>
- </Window>
- );
-}
diff --git a/packages/twenty-website/src/sections/product-feature/RecordTabHeader.tsx b/packages/twenty-website/src/sections/product-feature/components/RecordTabHeader.tsx
similarity index 70%
rename from packages/twenty-website/src/sections/product-feature/RecordTabHeader.tsx
rename to packages/twenty-website/src/sections/product-feature/components/RecordTabHeader.tsx
index 533bb5be0c5..6e6bf75719d 100644
--- a/packages/twenty-website/src/sections/product-feature/RecordTabHeader.tsx
+++ b/packages/twenty-website/src/sections/product-feature/components/RecordTabHeader.tsx
@@ -1,37 +1,12 @@
'use client';
import { styled } from '@linaria/react';
-import {
- IconCalendarEvent,
- IconCheckbox,
- IconMail,
- IconNotes,
- IconPaperclip,
- IconTimelineEvent,
-} from '@tabler/icons-react';
-import { type ComponentType } from 'react';
import { THEME_LIGHT } from 'twenty-ui/theme';
import { previewFontSize } from '@/app-preview/preview-font-size';
-export type RecordTabLabel =
- | 'Calendar'
- | 'Emails'
- | 'Files'
- | 'Notes'
- | 'Tasks'
- | 'Timeline';
-
-type TabGlyph = ComponentType<{ size?: number; stroke?: number }>;
-
-const RECORD_TABS: { icon: TabGlyph; label: RecordTabLabel }[] = [
- { icon: IconTimelineEvent, label: 'Timeline' },
- { icon: IconCheckbox, label: 'Tasks' },
- { icon: IconNotes, label: 'Notes' },
- { icon: IconPaperclip, label: 'Files' },
- { icon: IconMail, label: 'Emails' },
- { icon: IconCalendarEvent, label: 'Calendar' },
-];
+import { RECORD_TABS } from '../data/record-tabs';
+import { type RecordTabLabel } from '../types/record-tab-label';
const Bar = styled.div`
align-items: stretch;
diff --git a/packages/twenty-website/src/sections/product-feature/ScrollEntrance.tsx b/packages/twenty-website/src/sections/product-feature/components/ScrollEntrance.tsx
similarity index 81%
rename from packages/twenty-website/src/sections/product-feature/ScrollEntrance.tsx
rename to packages/twenty-website/src/sections/product-feature/components/ScrollEntrance.tsx
index d282de46718..56ad05b9cf9 100644
--- a/packages/twenty-website/src/sections/product-feature/ScrollEntrance.tsx
+++ b/packages/twenty-website/src/sections/product-feature/components/ScrollEntrance.tsx
@@ -7,12 +7,8 @@ import { getReducedMotionSnapshot } from '@/platform/motion';
import { observeElementVisibility } from '@/platform/visuals/engine/observe-element-visibility';
import { REDUCED_MOTION } from '@/tokens';
-// 10% of the tile in view fades it in; leaving fades it back out.
const VIEWPORT_THRESHOLD = 0.1;
-// The old site's entrance carried dead stagger machinery (0ms delays) and
-// three directionally-named hidden classes that were all `opacity: 0` —
-// the real behavior is just this reversible fade.
const Entrance = styled.div`
height: 100%;
opacity: 0;
diff --git a/packages/twenty-website/src/sections/product-feature/TileContent.tsx b/packages/twenty-website/src/sections/product-feature/components/TileContent.tsx
similarity index 96%
rename from packages/twenty-website/src/sections/product-feature/TileContent.tsx
rename to packages/twenty-website/src/sections/product-feature/components/TileContent.tsx
index a05129777da..39ebb1688ff 100644
--- a/packages/twenty-website/src/sections/product-feature/TileContent.tsx
+++ b/packages/twenty-website/src/sections/product-feature/components/TileContent.tsx
@@ -13,7 +13,7 @@ import {
} from '@/tokens';
import { Body, Heading } from '@/ui';
-import { type FeatureTile } from './feature-tiles';
+import { type FeatureTile } from '../types/feature-tile';
const BULLET_ICON_STROKE_WIDTH = 1.5;
@@ -118,7 +118,6 @@ export function TileContent({
tile: FeatureTile;
}) {
const i18n = getServerI18n();
- // Bullets are an authored fixed list: position is identity.
const bullets = tile.bullets.map((bullet, bulletNumber) => ({
bullet,
bulletNumber,
diff --git a/packages/twenty-website/src/sections/product-feature/components/TileVisual.tsx b/packages/twenty-website/src/sections/product-feature/components/TileVisual.tsx
new file mode 100644
index 00000000000..b00c7ca5afd
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/components/TileVisual.tsx
@@ -0,0 +1,35 @@
+'use client';
+
+import { useEffect, useRef, useState } from 'react';
+
+import { observeElementVisibility } from '@/platform/visuals/engine/observe-element-visibility';
+
+import { VISUALS } from '../data/visuals';
+import { type FeatureVisualKey } from '../types/feature-visual-key';
+
+const ACTIVE_THRESHOLD = 0.3;
+
+export function TileVisual({ visualKey }: { visualKey: FeatureVisualKey }) {
+ const ref = useRef<HTMLDivElement>(null);
+ const [active, setActive] = useState(false);
+
+ useEffect(() => {
+ const element = ref.current;
+
+ if (!element) {
+ return undefined;
+ }
+
+ return observeElementVisibility(element, setActive, {
+ threshold: ACTIVE_THRESHOLD,
+ });
+ }, []);
+
+ const Visual = VISUALS[visualKey];
+
+ return (
+ <div ref={ref} style={{ height: '100%', width: '100%' }}>
+ <Visual active={active} />
+ </div>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/components/Tiles.tsx b/packages/twenty-website/src/sections/product-feature/components/Tiles.tsx
new file mode 100644
index 00000000000..3f1c904af4f
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/components/Tiles.tsx
@@ -0,0 +1,151 @@
+import { styled } from '@linaria/react';
+
+import { color, mediaUp, radius, spacing } from '@/tokens';
+
+import { CARD_SPANS } from '../data/card-spans';
+import { type FeatureTile } from '../types/feature-tile';
+import { formatCounter } from '../utils/format-counter';
+import { ScrollEntrance } from './ScrollEntrance';
+import { TileContent } from './TileContent';
+import { TileVisual } from './TileVisual';
+
+const Grid = styled.div`
+ border: 1px solid ${color('black-20')};
+ border-radius: ${radius(2)};
+ display: grid;
+ grid-template-columns: 1fr;
+ overflow: hidden;
+
+ ${mediaUp('md')} {
+ grid-template-columns: repeat(100, 1fr);
+ }
+`;
+
+const SpotlightCell = styled.div`
+ background-color: ${color('neutral')};
+ border-bottom: 1px solid ${color('black-20')};
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+
+ ${mediaUp('md')} {
+ grid-column: span 100;
+ }
+`;
+
+const GridCell = styled.div`
+ background-color: ${color('neutral')};
+ border-bottom: 1px solid ${color('black-20')};
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+
+ ${mediaUp('md')} {
+ &[data-span='40'] {
+ grid-column: span 40;
+ }
+
+ &[data-span='60'] {
+ grid-column: span 60;
+ }
+
+ &:nth-child(even) {
+ border-right: 1px solid ${color('black-20')};
+ }
+
+ &:nth-last-child(-n + 2) {
+ border-bottom: none;
+ }
+ }
+`;
+
+const SpotlightInner = styled.div`
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+`;
+
+const SpotlightContent = styled.div`
+ width: 100%;
+`;
+
+const SpotlightVisual = styled.div`
+ border: 1px solid ${color('black-20')};
+ border-radius: ${radius(2)};
+ margin: ${spacing(4)};
+ min-height: 260px;
+ overflow: hidden;
+
+ ${mediaUp('md')} {
+ margin: ${spacing(5)};
+ min-height: 420px;
+ }
+`;
+
+const CardInner = styled.div`
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+`;
+
+const CardVisualFrame = styled.div`
+ border: 1px solid ${color('black-20')};
+ border-radius: ${radius(2)};
+ height: 300px;
+ margin: ${spacing(4)} ${spacing(4)} 0;
+ overflow: hidden;
+ position: relative;
+
+ ${mediaUp('md')} {
+ height: 340px;
+ margin: ${spacing(5)} ${spacing(5)} 0;
+ }
+`;
+
+export function Tiles({ tiles }: { tiles: FeatureTile[] }) {
+ const totalCount = tiles.length;
+ const numberedTiles = tiles.map((tile, tileNumber) => ({
+ tile,
+ tileNumber,
+ }));
+
+ return (
+ <Grid>
+ {numberedTiles.map(({ tile, tileNumber }) => {
+ const counter = formatCounter(tileNumber + 1, totalCount);
+
+ if (tileNumber === 0) {
+ return (
+ <SpotlightCell key={tileNumber}>
+ <ScrollEntrance>
+ <SpotlightInner>
+ <SpotlightVisual>
+ <TileVisual visualKey={tile.visual} />
+ </SpotlightVisual>
+ <SpotlightContent>
+ <TileContent counter={counter} spotlight tile={tile} />
+ </SpotlightContent>
+ </SpotlightInner>
+ </ScrollEntrance>
+ </SpotlightCell>
+ );
+ }
+
+ return (
+ <GridCell key={tileNumber} data-span={CARD_SPANS[tileNumber - 1]}>
+ <ScrollEntrance>
+ <CardInner>
+ <CardVisualFrame>
+ <TileVisual visualKey={tile.visual} />
+ </CardVisualFrame>
+ <TileContent counter={counter} spotlight={false} tile={tile} />
+ </CardInner>
+ </ScrollEntrance>
+ </GridCell>
+ );
+ })}
+ </Grid>
+ );
+}
diff --git a/packages/twenty-website/src/sections/product-feature/data/card-spans.ts b/packages/twenty-website/src/sections/product-feature/data/card-spans.ts
new file mode 100644
index 00000000000..a0d5c5cedc3
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/data/card-spans.ts
@@ -0,0 +1 @@
+export const CARD_SPANS = [60, 40, 40, 60, 60, 40];
diff --git a/packages/twenty-website/src/sections/product-feature/feature-tiles.test.ts b/packages/twenty-website/src/sections/product-feature/data/feature-tiles.test.ts
similarity index 67%
rename from packages/twenty-website/src/sections/product-feature/feature-tiles.test.ts
rename to packages/twenty-website/src/sections/product-feature/data/feature-tiles.test.ts
index ea6dc675140..b77dfec3eef 100644
--- a/packages/twenty-website/src/sections/product-feature/feature-tiles.test.ts
+++ b/packages/twenty-website/src/sections/product-feature/data/feature-tiles.test.ts
@@ -1,8 +1,6 @@
-import { FEATURE_TILES, type FeatureVisualKey } from './feature-tiles';
+import { type FeatureVisualKey } from '../types/feature-visual-key';
+import { FEATURE_TILES } from './feature-tiles';
-// The visual registry in tile-visual.tsx is a total Record over
-// FeatureVisualKey, so the compiler guarantees every key renders; this
-// pins the converse — every key is used by exactly one tile.
const ALL_VISUAL_KEYS: FeatureVisualKey[] = [
'contacts',
'dashboard',
diff --git a/packages/twenty-website/src/sections/product-feature/feature-tiles.ts b/packages/twenty-website/src/sections/product-feature/data/feature-tiles.ts
similarity index 83%
rename from packages/twenty-website/src/sections/product-feature/feature-tiles.ts
rename to packages/twenty-website/src/sections/product-feature/data/feature-tiles.ts
index cd090a2fe5d..af80d2ba16c 100644
--- a/packages/twenty-website/src/sections/product-feature/feature-tiles.ts
+++ b/packages/twenty-website/src/sections/product-feature/data/feature-tiles.ts
@@ -1,41 +1,7 @@
-import { type MessageDescriptor } from '@lingui/core';
import { msg } from '@lingui/core/macro';
-export type FeatureBulletIcon =
- | 'book'
- | 'check'
- | 'code'
- | 'edit'
- | 'eye'
- | 'search'
- | 'tag'
- | 'users';
+import { type FeatureTile } from '../types/feature-tile';
-// Keys bind tiles to their visuals in tile-visual.tsx, keeping this
-// module pure data.
-export type FeatureVisualKey =
- | 'contacts'
- | 'dashboard'
- | 'emails'
- | 'files'
- | 'import'
- | 'pipeline'
- | 'tasks';
-
-export type FeatureBullet = {
- icon: FeatureBulletIcon;
- text: MessageDescriptor;
-};
-
-export type FeatureTile = {
- bullets: FeatureBullet[];
- category: MessageDescriptor;
- description: MessageDescriptor;
- heading: MessageDescriptor;
- visual: FeatureVisualKey;
-};
-
-// Tile 0 is the spotlight (spans the grid).
export const FEATURE_TILES: FeatureTile[] = [
{
category: msg`Reports & Dashboards`,
diff --git a/packages/twenty-website/src/sections/product-feature/data/record-tabs.ts b/packages/twenty-website/src/sections/product-feature/data/record-tabs.ts
new file mode 100644
index 00000000000..f6a9badebd0
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/data/record-tabs.ts
@@ -0,0 +1,22 @@
+import {
+ IconCalendarEvent,
+ IconCheckbox,
+ IconMail,
+ IconNotes,
+ IconPaperclip,
+ IconTimelineEvent,
+} from '@tabler/icons-react';
+import { type ComponentType } from 'react';
+
+import { type RecordTabLabel } from '../types/record-tab-label';
+
+type TabGlyph = ComponentType<{ size?: number; stroke?: number }>;
+
+export const RECORD_TABS: { icon: TabGlyph; label: RecordTabLabel }[] = [
+ { icon: IconTimelineEvent, label: 'Timeline' },
+ { icon: IconCheckbox, label: 'Tasks' },
+ { icon: IconNotes, label: 'Notes' },
+ { icon: IconPaperclip, label: 'Files' },
+ { icon: IconMail, label: 'Emails' },
+ { icon: IconCalendarEvent, label: 'Calendar' },
+];
diff --git a/packages/twenty-website/src/sections/product-feature/data/visuals.ts b/packages/twenty-website/src/sections/product-feature/data/visuals.ts
new file mode 100644
index 00000000000..6eaefc0d48f
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/data/visuals.ts
@@ -0,0 +1,23 @@
+import { type ComponentType } from 'react';
+
+import { ContactsVisual } from '../ContactsVisual';
+import { DashboardVisual } from '../DashboardVisual';
+import { EmailsVisual } from '../EmailsVisual';
+import { FilesVisual } from '../FilesVisual';
+import { ImportVisual } from '../ImportVisual';
+import { PipelineVisual } from '../PipelineVisual';
+import { TasksVisual } from '../TasksVisual';
+import { type FeatureVisualKey } from '../types/feature-visual-key';
+
+export const VISUALS: Record<
+ FeatureVisualKey,
+ ComponentType<{ active: boolean }>
+> = {
+ contacts: ContactsVisual,
+ dashboard: DashboardVisual,
+ emails: EmailsVisual,
+ files: FilesVisual,
+ import: ImportVisual,
+ pipeline: PipelineVisual,
+ tasks: TasksVisual,
+};
diff --git a/packages/twenty-website/src/sections/product-feature/types/feature-bullet-icon.ts b/packages/twenty-website/src/sections/product-feature/types/feature-bullet-icon.ts
new file mode 100644
index 00000000000..bef7bab7cd8
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/types/feature-bullet-icon.ts
@@ -0,0 +1,9 @@
+export type FeatureBulletIcon =
+ | 'book'
+ | 'check'
+ | 'code'
+ | 'edit'
+ | 'eye'
+ | 'search'
+ | 'tag'
+ | 'users';
diff --git a/packages/twenty-website/src/sections/product-feature/types/feature-bullet.ts b/packages/twenty-website/src/sections/product-feature/types/feature-bullet.ts
new file mode 100644
index 00000000000..3898046b9f2
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/types/feature-bullet.ts
@@ -0,0 +1,8 @@
+import { type MessageDescriptor } from '@lingui/core';
+
+import { type FeatureBulletIcon } from './feature-bullet-icon';
+
+export type FeatureBullet = {
+ icon: FeatureBulletIcon;
+ text: MessageDescriptor;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/types/feature-tile.ts b/packages/twenty-website/src/sections/product-feature/types/feature-tile.ts
new file mode 100644
index 00000000000..4faccf0c8de
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/types/feature-tile.ts
@@ -0,0 +1,12 @@
+import { type MessageDescriptor } from '@lingui/core';
+
+import { type FeatureBullet } from './feature-bullet';
+import { type FeatureVisualKey } from './feature-visual-key';
+
+export type FeatureTile = {
+ bullets: FeatureBullet[];
+ category: MessageDescriptor;
+ description: MessageDescriptor;
+ heading: MessageDescriptor;
+ visual: FeatureVisualKey;
+};
diff --git a/packages/twenty-website/src/sections/product-feature/types/feature-visual-key.ts b/packages/twenty-website/src/sections/product-feature/types/feature-visual-key.ts
new file mode 100644
index 00000000000..7226ccb70c1
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/types/feature-visual-key.ts
@@ -0,0 +1,8 @@
+export type FeatureVisualKey =
+ | 'contacts'
+ | 'dashboard'
+ | 'emails'
+ | 'files'
+ | 'import'
+ | 'pipeline'
+ | 'tasks';
diff --git a/packages/twenty-website/src/sections/product-feature/types/record-tab-label.ts b/packages/twenty-website/src/sections/product-feature/types/record-tab-label.ts
new file mode 100644
index 00000000000..cd040f45abb
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/types/record-tab-label.ts
@@ -0,0 +1,7 @@
+export type RecordTabLabel =
+ | 'Calendar'
+ | 'Emails'
+ | 'Files'
+ | 'Notes'
+ | 'Tasks'
+ | 'Timeline';
diff --git a/packages/twenty-website/src/sections/product-feature/utils/format-counter.ts b/packages/twenty-website/src/sections/product-feature/utils/format-counter.ts
new file mode 100644
index 00000000000..badc872736a
--- /dev/null
+++ b/packages/twenty-website/src/sections/product-feature/utils/format-counter.ts
@@ -0,0 +1,7 @@
+function padCounter(value: number): string {
+ return String(value).padStart(2, '0');
+}
+
+export function formatCounter(position: number, totalCount: number): string {
+ return `${padCounter(position)} / ${padCounter(totalCount)}`;
+}
diff --git a/packages/twenty-website/src/tokens/feature-scenes/product-feature-scene.ts b/packages/twenty-website/src/tokens/feature-scenes/product-feature-scene.ts
deleted file mode 100644
index c6275f4e7ed..00000000000
--- a/packages/twenty-website/src/tokens/feature-scenes/product-feature-scene.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-// The dark mini-window chrome's inks (verbatim from the old visual-tokens).
-export const PRODUCT_FEATURE_SCENE = {
- window: {
- background: '#1c1c28',
- border: 'rgba(255, 255, 255, 0.06)',
- textPrimary: '#f0f0f4',
- textSecondary: '#8b8b9e',
- trafficDots: {
- close: '#ff5f57',
- minimize: '#ffbd2e',
- zoom: '#28c840',
- },
- },
-};