The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Match AI chat user bubbles to the design (#28984)
Raphaël Bosid98a0dc2c84c
diff --git a/packages/twenty-docs/snippets/ui/generated/tokens.mdx b/packages/twenty-docs/snippets/ui/generated/tokens.mdxindex 0ced6c776af..a7aada93bcf 100644--- a/packages/twenty-docs/snippets/ui/generated/tokens.mdx+++ b/packages/twenty-docs/snippets/ui/generated/tokens.mdx@@ -100,6 +100,7 @@| border.color.strong | --t-border-color-strong | color(display-p3 0.839 0.839 0.839) | color(display-p3 0.282 0.282 0.282) | || border.color.transparentStrong | --t-border-color-transparent-strong | color(display-p3 0 0 0 / 0.071) | color(display-p3 1 1 1 / 0.071) | || border.radius.lg | --t-border-radius-lg | 16px | 16px | |+| border.radius.lgRound | --t-border-radius-lg-round | 12px | 12px | || border.radius.md | --t-border-radius-md | 8px | 8px | || border.radius.mdRound | --t-border-radius-md-round | 8px | 8px | || border.radius.pill | --t-border-radius-pill | 999px | 999px | |diff --git a/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsx b/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsxindex 94cfc14a52f..f4596e23458 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsx@@ -72,8 +72,12 @@ const StyledMessageText = styled.div<{? `1px solid ${themeCssVariables.border.color.medium}`: 'none'};border-radius: ${({ isUser }) =>- isUser ? themeCssVariables.border.radius.lg : '0'};- color: ${themeCssVariables.font.color.primary};+ isUser ? themeCssVariables.border.radius.lgRound : '0'};+ color: ${({ isUser }) =>+ isUser+ ? themeCssVariables.font.color.secondary+ : themeCssVariables.font.color.primary};+ corner-shape: round;font-weight: ${({ isUser }) => (isUser ? 500 : 400)};line-height: ${themeCssVariables.spacing[6]};max-width: 100%;diff --git a/packages/twenty-ui/design-tokens/border.ts b/packages/twenty-ui/design-tokens/border.tsindex 9545acf86d7..3b9848641f2 100644--- a/packages/twenty-ui/design-tokens/border.ts+++ b/packages/twenty-ui/design-tokens/border.ts@@ -22,6 +22,7 @@ export const BORDER_TOKENS = {md: MD_RADIUS,smRound: SM_RADIUS,mdRound: MD_RADIUS,+ lgRound: token('12px'),lg: token('16px'),xl: token('20px'),xxl: token('40px'),diff --git a/packages/twenty-ui/design-tokens/pipeline/__tests__/buildThemeCss.test.ts b/packages/twenty-ui/design-tokens/pipeline/__tests__/buildThemeCss.test.tsindex a5c20ea5e02..a9ce5a57321 100644--- a/packages/twenty-ui/design-tokens/pipeline/__tests__/buildThemeCss.test.ts+++ b/packages/twenty-ui/design-tokens/pipeline/__tests__/buildThemeCss.test.ts@@ -14,6 +14,7 @@ const radiusLeaf = (const roundRadiusLeaves = [radiusLeaf('smRound', '4px'),radiusLeaf('mdRound', '8px'),+ radiusLeaf('lgRound', '12px'),radiusLeaf('pill', '999px'),radiusLeaf('rounded', '100%'),];@@ -65,6 +66,7 @@ describe('buildThemeCss', () => {);expect(squircleBlock).not.toContain('--t-border-radius-sm-round');expect(squircleBlock).not.toContain('--t-border-radius-md-round');+ expect(squircleBlock).not.toContain('--t-border-radius-lg-round');expect(squircleBlock).not.toContain('--t-border-radius-pill');expect(squircleBlock).not.toContain('--t-border-radius-rounded');});diff --git a/packages/twenty-ui/design-tokens/roundRadiusTokens.ts b/packages/twenty-ui/design-tokens/roundRadiusTokens.tsindex d6f4c3b66e2..93b0e56c436 100644--- a/packages/twenty-ui/design-tokens/roundRadiusTokens.ts+++ b/packages/twenty-ui/design-tokens/roundRadiusTokens.ts@@ -1,6 +1,7 @@export const ROUND_RADIUS_TOKENS: readonly string[] = ['smRound','mdRound',+ 'lgRound','pill','rounded',];diff --git a/packages/twenty-ui/generated/tokens.docs.json b/packages/twenty-ui/generated/tokens.docs.jsonindex 6ce384ffca5..96025cbf399 100644--- a/packages/twenty-ui/generated/tokens.docs.json+++ b/packages/twenty-ui/generated/tokens.docs.json@@ -419,6 +419,13 @@"dark": "16px","isNumber": false},+ {+ "path": "border.radius.lgRound",+ "cssVariable": "--t-border-radius-lg-round",+ "light": "12px",+ "dark": "12px",+ "isNumber": false+ },{"path": "border.radius.md","cssVariable": "--t-border-radius-md",diff --git a/packages/twenty-ui/src/theme/constants/ThemeDark.ts b/packages/twenty-ui/src/theme/constants/ThemeDark.tsindex ffcf100a64e..a9bc4d66c86 100644--- a/packages/twenty-ui/src/theme/constants/ThemeDark.ts+++ b/packages/twenty-ui/src/theme/constants/ThemeDark.ts@@ -152,6 +152,7 @@ export const THEME_DARK: typeof THEME_LIGHT = {md: '8px',smRound: '4px',mdRound: '8px',+ lgRound: '12px',lg: '16px',xl: '20px',xxl: '40px',diff --git a/packages/twenty-ui/src/theme/constants/ThemeLight.ts b/packages/twenty-ui/src/theme/constants/ThemeLight.tsindex eb249b42fa5..cfc4243caf7 100644--- a/packages/twenty-ui/src/theme/constants/ThemeLight.ts+++ b/packages/twenty-ui/src/theme/constants/ThemeLight.ts@@ -151,6 +151,7 @@ export const THEME_LIGHT = {md: '8px',smRound: '4px',mdRound: '8px',+ lgRound: '12px',lg: '16px',xl: '20px',xxl: '40px',diff --git a/packages/twenty-ui/src/theme/theme-dark.css b/packages/twenty-ui/src/theme/theme-dark.cssindex a2aa7ecac54..9c045baf551 100644--- a/packages/twenty-ui/src/theme/theme-dark.css+++ b/packages/twenty-ui/src/theme/theme-dark.css@@ -143,6 +143,7 @@--t-border-radius-md: 8px;--t-border-radius-sm-round: 4px;--t-border-radius-md-round: 8px;+ --t-border-radius-lg-round: 12px;--t-border-radius-lg: 16px;--t-border-radius-xl: 20px;--t-border-radius-xxl: 40px;diff --git a/packages/twenty-ui/src/theme/theme-light.css b/packages/twenty-ui/src/theme/theme-light.cssindex 6b5389e6fbb..1621a603ff1 100644--- a/packages/twenty-ui/src/theme/theme-light.css+++ b/packages/twenty-ui/src/theme/theme-light.css@@ -143,6 +143,7 @@--t-border-radius-md: 8px;--t-border-radius-sm-round: 4px;--t-border-radius-md-round: 8px;+ --t-border-radius-lg-round: 12px;--t-border-radius-lg: 16px;--t-border-radius-xl: 20px;--t-border-radius-xxl: 40px;diff --git a/packages/twenty-ui/src/theme/themeCssVariables.ts b/packages/twenty-ui/src/theme/themeCssVariables.tsindex 8df218e0819..10a44bad299 100644--- a/packages/twenty-ui/src/theme/themeCssVariables.ts+++ b/packages/twenty-ui/src/theme/themeCssVariables.ts@@ -184,6 +184,7 @@ export const themeCssVariables = {md: 'var(--t-border-radius-md)',smRound: 'var(--t-border-radius-sm-round)',mdRound: 'var(--t-border-radius-md-round)',+ lgRound: 'var(--t-border-radius-lg-round)',lg: 'var(--t-border-radius-lg)',xl: 'var(--t-border-radius-xl)',xxl: 'var(--t-border-radius-xxl)',diff --git a/packages/twenty-ui/src/theme/themeTypes.ts b/packages/twenty-ui/src/theme/themeTypes.tsindex 7546a22c61a..3d0c20c5de9 100644--- a/packages/twenty-ui/src/theme/themeTypes.ts+++ b/packages/twenty-ui/src/theme/themeTypes.ts@@ -183,6 +183,7 @@ export type ThemeType = {md: string;smRound: string;mdRound: string;+ lgRound: string;lg: string;xl: string;xxl: string;