From c53a13417e03b1aa4895f4e7013e15084cb79f0c Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 5 Mar 2026 18:16:25 +0100 Subject: [PATCH] Remove all styled(Component) patterns in favor of parent wrappers and props (#18430) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Eliminates all ~350 `styled(Component)` usages across `twenty-front` and `twenty-ui` (212 files changed). Each was replaced following these rules: - **Margin/layout CSS** (margin, padding, flex, align-self, width) → wrapped in a `styled.div`/`styled.span` parent container - **Third-party components** (Link, TextareaAutosize, ReactPhoneNumberInput, Handle, etc.) → parent container with child CSS selectors (`> a`, `> textarea`, `> input`, etc.) - **Intrinsic behavior via existing props** (TableRow `gridTemplateColumns`, TableCell `color`/`align`) → replaced `styled(TableRow)` / `styled(TableCell)` with direct prop usage - **Other visual overrides on twenty-ui components** (Card, Section, TabList, Button, MenuItem, ScrollWrapper, etc.) → parent wrappers with `> div` / `> *` child selectors - **Extending styled.div/span** → merged all CSS into a single `styled.div`/`styled.span` Also adds `overflow: hidden` to parent containers wrapping `ScrollWrapper` so scroll activates correctly with the new wrapper structure. ### Migration patterns | Before | After | |--------|-------| | `styled(Avatar)` with `margin-right` | `` | | `styled(Link)` with `text-decoration: none` | `` with `> a { ... }` | | `styled(TableRow)` with `grid-template-columns` | `` | | `styled(TableCell)` with `color` / `align` | `` | | `styled(Card)` with `margin-top` | `` | | `styled(TabList)` with `background` | `` with `> div { ... }` | | `styled(StyledBase)` extending a `styled.div` | Single merged `styled.div` with all styles inlined | --- .../components/CalendarDayCardContent.tsx | 63 +-- .../components/CalendarEventDetails.tsx | 54 +-- .../CalendarEventNotSharedContent.tsx | 25 +- ...arEventParticipantsResponseStatusField.tsx | 30 +- .../activities/components/ActivityList.tsx | 20 +- .../activities/components/ActivityRow.tsx | 12 +- .../activities/components/ParticipantChip.tsx | 16 +- .../emails/components/EmailsCard.tsx | 28 +- .../activities/files/components/DropZone.tsx | 13 +- .../components/TimelineCard.tsx | 28 +- .../rows/components/EventCard.tsx | 5 +- .../components/EventRowDynamicComponent.tsx | 6 +- .../components/BubbleMenuIconButton.tsx | 27 +- .../AIChatAssistantMessageRenderer.tsx | 7 +- .../src/modules/ai/components/AIChatTab.tsx | 19 +- .../ai/components/AIChatTabMessageList.tsx | 16 +- .../ai/components/ThinkingStepsDisplay.tsx | 25 +- .../AIChatSuggestedPrompts.tsx | 17 +- .../internal/MeteredPriceSelector.tsx | 46 +- .../blocks/MentionInlineContent.tsx | 32 +- .../components/CommandMenuItemNumberInput.tsx | 30 +- .../components/CommandMenuItemTextInput.tsx | 26 +- .../components/InformationBanner.tsx | 18 +- .../MainContainerLayoutWithSidePanel.tsx | 28 +- ...epthRecordGqlFieldsFromRecord.test.ts.snap | 2 +- .../RecordBoardCardMultiDragCounterChip.tsx | 8 +- .../components/RecordBoardColumnHeader.tsx | 43 +- ...ardColumnHeaderAggregateDropdownButton.tsx | 50 ++- .../components/RecordCalendarAddNew.tsx | 28 +- .../components/RecordCalendarTopBar.tsx | 30 +- .../components/RecordCalendarCard.tsx | 28 +- .../RecordDetailSectionContainer.tsx | 56 ++- .../components/FormAdvancedTextFieldInput.tsx | 96 ++-- .../components/FormArrayFieldInput.tsx | 37 +- .../components/FormDateFieldInput.tsx | 87 ++-- .../components/FormDateTimeFieldInput.tsx | 89 ++-- .../components/FormMultiSelectFieldInput.tsx | 21 +- .../components/FormSingleRecordPicker.tsx | 69 +-- .../input/components/PhonesFieldInput.tsx | 35 +- .../RecordIndexPageKanbanAddMenuItem.tsx | 50 ++- .../components/MergeRecordsContainer.tsx | 14 +- .../components/MergeSettingsTab.tsx | 22 +- .../RecordTableEmptyStateDisplay.tsx | 8 +- .../components/RecordTableCellCheckbox.tsx | 23 +- .../RecordTableCellCheckboxPlaceholder.tsx | 23 +- .../RecordTableCellFirstRowFirstColumn.tsx | 26 +- .../RecordTableColumnAggregateFooterValue.tsx | 4 +- ...ordTableColumnAggregateFooterValueCell.tsx | 6 +- .../RecordTableColumnHeadDropdownMenu.tsx | 80 ++-- .../components/RecordTableActionRow.tsx | 9 +- .../RecordTableRowMultiDragCounterChip.tsx | 8 +- .../RecordTableRecordGroupSection.tsx | 50 ++- .../components/UpdateMultipleRecordsForm.tsx | 70 +-- .../OnboardingSyncEmailsSettingsCard.tsx | 14 +- .../components/PageLayoutRendererContent.tsx | 46 +- .../components/WidgetActionFieldSeeAll.tsx | 19 +- .../components/FieldWidgetShowMoreButton.tsx | 7 +- .../fields/components/FieldsWidget.tsx | 9 +- .../components/GraphWidgetAggregateChart.tsx | 15 +- .../components/GraphWidgetGaugeChart.tsx | 12 +- .../SettingsAccountsBlocklistTable.tsx | 46 +- ...AccountsCalendarVisibilitySettingsCard.tsx | 18 +- ...tingsAccountsConnectedAccountsListCard.tsx | 32 +- ...ettingsAccountsMessageAutoCreationIcon.tsx | 13 +- .../SettingsAccountsMessageFolderIcon.tsx | 12 +- .../SettingsAccountsRadioSettingsCard.tsx | 73 +-- .../SettingsAccountsToggleSettingCard.tsx | 45 +- .../SettingsAccountsVisibilityIcon.tsx | 28 +- .../SettingsConnectedAccountsTableHeader.tsx | 18 +- .../SettingsAccountsMessageFoldersCard.tsx | 38 +- .../ai/components/SettingsAdminAI.tsx | 18 +- .../components/ConfigVariableSearchInput.tsx | 20 +- .../SettingsAdminConfigVariablesRow.tsx | 67 +-- .../SettingsAdminConfigVariablesTable.tsx | 20 +- ...ngsAdminHealthAccountSyncCountersTable.tsx | 24 +- .../SettingsAdminWorkerMetricsGraph.tsx | 44 +- .../AdvancedSettingsContentWrapperWithDot.tsx | 16 +- .../settings/components/SettingsCard.tsx | 73 +-- .../SettingsConnectedAccountsTableRow.tsx | 40 +- .../settings/components/SettingsCounter.tsx | 23 +- .../components/SettingsDnsRecordsTable.tsx | 109 +++-- .../settings/components/SettingsListCard.tsx | 24 +- .../SettingsListItemCardContent.tsx | 84 ++-- .../components/SettingsListSkeletonCard.tsx | 14 +- .../SettingsOptionCardContentToggle.tsx | 32 +- .../settings/components/SettingsRadioCard.tsx | 48 +- .../components/SettingsSummaryCard.tsx | 24 +- ...ngsDataModelNewFieldBreadcrumbDropDown.tsx | 24 +- .../SettingsDataModelPreviewFormCard.tsx | 32 +- .../SettingsObjectNewFieldSelector.tsx | 18 +- .../SettingsDataModelFieldDateForm.tsx | 20 +- .../SettingsDataModelFieldSelectForm.tsx | 419 +++++++++--------- ...tingsDataModelFieldSelectFormOptionRow.tsx | 49 +- .../SettingsDataModelFieldPreviewWidget.tsx | 62 +-- ...DataModelRelationFieldPreviewSubWidget.tsx | 51 ++- .../SettingsDataModelOverviewObject.tsx | 36 +- ...ngsAvailableStandardObjectItemTableRow.tsx | 40 +- ...ettingsAvailableStandardObjectsSection.tsx | 9 +- .../SettingsObjectFieldItemTableRow.tsx | 48 +- .../components/SettingsObjectItemTableRow.tsx | 11 +- ...tingsObjectItemTableRowStyledComponents.ts | 21 - ...ingsObjectItemTableRowStyledComponents.tsx | 29 ++ .../SettingsObjectRelationItemTableRow.tsx | 93 ++-- .../SettingsObjectRelationsTable.tsx | 27 +- .../components/tabs/ObjectSettings.tsx | 34 +- .../components/SettingsObjectCoverImage.tsx | 4 +- .../SettingsDataModelObjectAboutForm.tsx | 44 +- ...ettingsDataModelObjectSettingsFormCard.tsx | 67 +-- .../SettingsApiKeysFieldItemTableRow.tsx | 50 ++- .../components/SettingsApiKeysTable.tsx | 26 +- .../SettingsDevelopersWebhookTableRow.tsx | 47 +- .../components/SettingsWebhooksTable.tsx | 34 +- .../components/WebhookEntitySelect.tsx | 11 +- .../components/SettingPublicDomain.tsx | 46 +- .../components/SettingsCustomDomain.tsx | 42 +- ...ettingsLogicFunctionsFieldItemTableRow.tsx | 55 +-- .../SettingsLogicFunctionsTable.tsx | 41 +- .../SettingsLogicFunctionCodeEditorTab.tsx | 20 +- ...FunctionTabEnvironmentVariableTableRow.tsx | 25 +- .../tabs/SettingsLogicFunctionTriggersTab.tsx | 55 ++- .../SettingsPlaygroundCoverImage.tsx | 8 +- .../profile/components/EmailField.tsx | 58 +-- .../roles/components/SettingsRolesList.tsx | 60 +-- .../components/SettingsRolesTableRow.tsx | 116 ++--- .../SettingsRoleAssignmentTable.tsx | 32 +- .../SettingsRoleAssignmentTableRow.tsx | 12 +- ...RolePermissionsObjectLevelObjectPicker.tsx | 24 +- ...tingsRolePermissionsObjectLevelSection.tsx | 48 +- ...ingsRolePermissionsObjectLevelTableRow.tsx | 24 +- ...sObjectLevelObjectFieldPermissionTable.tsx | 27 +- ...jectLevelObjectFieldPermissionTableRow.tsx | 23 +- ...jectLevelObjectFormObjectLevelTableRow.tsx | 40 +- ...rmissionsObjectLevelRecordLevelSection.tsx | 59 +-- ...tingsRolePermissionsObjectsTableHeader.tsx | 22 +- ...SettingsRolePermissionsObjectsTableRow.tsx | 39 +- ...SettingsRolePermissionsSettingsSection.tsx | 34 +- ...ingsRolePermissionsSettingsTableHeader.tsx | 16 +- ...ettingsRolePermissionsSettingsTableRow.tsx | 42 +- .../SettingsRolePermissionsToolSection.tsx | 34 +- ...SettingsSSOIdentitiesProvidersListCard.tsx | 24 +- .../SettingsApprovedAccessDomainsListCard.tsx | 20 +- .../components/SidePanelBackButton.tsx | 7 +- .../side-panel/components/SidePanelGroup.tsx | 6 +- .../SidePanelTopBarRightCornerIcon.tsx | 32 +- .../SidePanelWorkflowRunViewStepContent.tsx | 14 +- .../components/MatchColumnToFieldSelect.tsx | 19 +- .../components/SpreadsheetImportTable.tsx | 46 +- .../components/StepNavigationButton.tsx | 50 ++- .../SubMatchingSelectDropdownButton.tsx | 7 +- .../components/UnmatchColumnBanner.tsx | 54 +-- .../SelectHeaderStep/SelectHeaderStep.tsx | 6 +- .../SelectSheetStep/SelectSheetStep.tsx | 25 +- .../ValidationStep/ValidationStep.tsx | 22 +- .../dialog-manager/components/Dialog.tsx | 25 +- .../snack-bar-manager/components/SnackBar.tsx | 40 +- .../field/input/components/CurrencyInput.tsx | 64 +-- .../field/input/components/TextAreaInput.tsx | 70 +-- .../modules/ui/input/components/TextArea.tsx | 88 ++-- .../StyledDropdownMenuSubheader.tsx | 13 +- .../components/FullScreenContainer.tsx | 14 +- .../fullscreen/components/FullScreenModal.tsx | 14 +- .../modal/components/ConfirmationModal.tsx | 56 ++- .../page/components/ShowPageContainer.tsx | 15 +- .../tab-list/components/TabMoreButton.tsx | 22 +- .../layout/table/components/TableSection.tsx | 6 +- .../layout/table/components/TableSubRow.tsx | 13 +- .../bread-crumb/components/Breadcrumb.tsx | 22 +- .../components/MobileBreadcrumb.tsx | 22 +- .../MultiWorkspacesDropdownStyles.tsx | 14 +- .../components/NavigationDrawerHeader.tsx | 16 +- .../__stories__/DragSelect.stories.tsx | 48 +- ...wBarFilterDropdownAdvancedFilterButton.tsx | 12 +- .../components/ViewPickerListContent.tsx | 18 +- .../WorkflowDiagramEdgeButtonGroup.tsx | 17 +- .../WorkflowDiagramHandleSource.tsx | 13 +- .../WorkflowDiagramHandleTarget.tsx | 20 +- .../components/WorkflowRunDiagramStepNode.tsx | 9 +- ...kflowStepFilterAddRootStepFilterButton.tsx | 24 +- ...s => WorkflowAiAgentPermissionsStyles.tsx} | 23 +- .../WorkflowAiAgentPermissionsTab.tsx | 26 +- .../components/WorkflowEditActionAiAgent.tsx | 14 +- .../components/WorkflowEditActionCode.tsx | 14 +- .../WorkflowEditActionFormBuilder.tsx | 5 +- .../components/BodyInput.tsx | 38 +- .../WorkflowEditActionHttpRequest.tsx | 34 +- .../components/WorkflowVariablesDropdown.tsx | 23 +- .../src/pages/auth/PasswordReset.tsx | 122 ++--- .../src/pages/onboarding/BookCallDecision.tsx | 14 +- .../src/pages/onboarding/CreateWorkspace.tsx | 3 +- .../SettingsTwoFactorAuthenticationMethod.tsx | 6 +- .../SettingsAdminConfigVariableDetails.tsx | 107 ++--- .../src/pages/settings/ai/SettingsAI.tsx | 22 +- .../pages/settings/ai/SettingsAgentForm.tsx | 14 +- .../settings/ai/SettingsAgentTurnDetail.tsx | 109 +++-- .../ai/components/SettingsAIAgentTableRow.tsx | 40 +- .../ai/components/SettingsAIAgentsTable.tsx | 101 +++-- .../ai/components/SettingsAgentLogsTab.tsx | 184 ++++---- .../components/SettingsSystemToolTableRow.tsx | 47 +- .../ai/components/SettingsToolTableRow.tsx | 39 +- .../ai/components/SettingsToolsTable.tsx | 67 +-- .../components/SettingsAppModalLayout.tsx | 25 +- .../SettingsApplicationDataTable.tsx | 10 +- .../SettingsApplicationDataTableRow.tsx | 13 +- ...ettingsApplicationNameDescriptionTable.tsx | 13 +- .../SettingsApplicationTableRow.tsx | 53 +-- .../components/SettingsApplicationsTable.tsx | 103 +++-- .../SettingsAvailableApplicationCard.tsx | 83 ++-- .../data-model/SettingsObjectFieldTable.tsx | 27 +- .../data-model/SettingsObjectIndexTable.tsx | 35 +- .../data-model/SettingsObjectTable.tsx | 21 +- .../settings/domains/SettingsDomains.tsx | 64 +-- .../SettingsEmailingDomains.tsx | 14 +- .../members/SettingsWorkspaceMembers.tsx | 398 ++++++++--------- .../settings/security/SettingsSecurity.tsx | 68 +-- .../components/EventLogResultsTable.tsx | 211 +++++---- .../workspace/SettingsApiWebhooks.tsx | 100 +++-- packages/twenty-shared/eslint.config.mjs | 2 + ...eserved-metadata-name-keywords.constant.ts | 6 +- .../src/display/tooltip/AppTooltip.tsx | 46 +- .../components/JsonValueNode.tsx | 7 +- .../components/__stories__/Modal.stories.tsx | 18 +- .../menu-item/components/MenuItemSelect.tsx | 26 +- .../components/MenuItemLeftContent.tsx | 8 +- .../components/StyledMenuItemBase.tsx | 96 +++- 224 files changed, 4765 insertions(+), 3837 deletions(-) delete mode 100644 packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.ts create mode 100644 packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.tsx rename packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/{WorkflowAiAgentPermissionsStyles.ts => WorkflowAiAgentPermissionsStyles.tsx} (76%) diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx index f96ec1768e..b2de426f03 100644 --- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx +++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx @@ -13,12 +13,14 @@ type CalendarDayCardContentProps = { divider?: boolean; }; -const StyledCardContent = styled(CardContent)` - align-items: flex-start; - display: flex; - flex-direction: row; - gap: ${themeCssVariables.spacing[3]}; - padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[3]}; +const StyledCardContentContainer = styled.div` + > * { + align-items: flex-start; + display: flex; + flex-direction: row; + gap: ${themeCssVariables.spacing[3]}; + padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[3]}; + } `; const StyledDayContainer = styled.div` @@ -44,7 +46,7 @@ const StyledEvents = styled.div` gap: ${themeCssVariables.spacing[3]}; `; -const StyledEventRow = styled(CalendarEventRow)` +const StyledEventRowContainer = styled.div` flex: 1 0 auto; `; @@ -67,28 +69,29 @@ export const CalendarDayCardContent = ({ }; return ( - - - {weekDayLabel} - {monthDayLabel} - - - {calendarEvents.map((calendarEvent) => ( - - ))} - - + + + + {weekDayLabel} + {monthDayLabel} + + + {calendarEvents.map((calendarEvent) => ( + + + + ))} + + + ); }; diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventDetails.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventDetails.tsx index 9b40593036..e867707f2b 100644 --- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventDetails.tsx +++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventDetails.tsx @@ -85,7 +85,7 @@ const StyledFields = styled.div` width: 100%; `; -const StyledPropertyBox = styled(PropertyBox)` +const StyledPropertyBoxContainer = styled.div` height: ${themeCssVariables.spacing[6]}; width: 100%; `; @@ -165,35 +165,37 @@ export const CalendarEventDetails = ({ }); return ( - - - + + - - - - + + + + + + ); }; diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx index 8dc32bf6f6..0892e523fd 100644 --- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx +++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx @@ -5,15 +5,18 @@ import { IconLock } from 'twenty-ui/display'; import { Card, CardContent } from 'twenty-ui/layout'; import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants'; -const StyledVisibilityCard = styled(Card)` +const StyledVisibilityCardContainer = styled.div` color: ${themeCssVariables.font.color.light}; flex: 1; - border-color: ${themeCssVariables.border.color.light}; transition: color ${themeCssVariables.animation.duration.normal} ease; width: 100%; + + > * { + border-color: ${themeCssVariables.border.color.light}; + } `; -const StyledVisibilityCardContent = styled(CardContent)` +const StyledVisibilityCardContentContainer = styled.div` align-items: center; background-color: ${themeCssVariables.background.transparent.lighter}; box-sizing: border-box; @@ -29,11 +32,15 @@ export const CalendarEventNotSharedContent = () => { const { theme } = useContext(ThemeContext); return ( - - - - Not shared - - + + + + + + Not shared + + + + ); }; diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx index 424308772b..094c124771 100644 --- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx +++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx @@ -21,7 +21,7 @@ const StyledInlineCellBaseContainer = styled.div` user-select: none; `; -const StyledPropertyBox = styled(PropertyBox)` +const StyledPropertyBoxContainer = styled.div` height: ${themeCssVariables.spacing[6]}; width: 100%; `; @@ -87,19 +87,21 @@ export const CalendarEventParticipantsResponseStatusField = ({ )); return ( - - - - {Icon} + + + + + {Icon} - - {responseStatus} - - - - {styledChips} - - - + + {responseStatus} + + + + {styledChips} + + + + ); }; diff --git a/packages/twenty-front/src/modules/activities/components/ActivityList.tsx b/packages/twenty-front/src/modules/activities/components/ActivityList.tsx index ae5ad19134..a26c2e5e05 100644 --- a/packages/twenty-front/src/modules/activities/components/ActivityList.tsx +++ b/packages/twenty-front/src/modules/activities/components/ActivityList.tsx @@ -2,16 +2,20 @@ import { styled } from '@linaria/react'; import { Card } from 'twenty-ui/layout'; import { themeCssVariables } from 'twenty-ui/theme-constants'; -const StyledList = styled(Card)` - & > :not(:last-child) { - border-bottom: 1px solid ${themeCssVariables.border.color.light}; +const StyledListContainer = styled.div` + > * { + & > :not(:last-child) { + border-bottom: 1px solid ${themeCssVariables.border.color.light}; + } + overflow: auto; + width: calc(100% - 2px); } - - width: calc(100% - 2px); - - overflow: auto; `; export const ActivityList = ({ children }: React.PropsWithChildren) => { - return {children}; + return ( + + {children} + + ); }; diff --git a/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx b/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx index cfdbb59451..20494b5234 100644 --- a/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx +++ b/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx @@ -3,14 +3,14 @@ import React from 'react'; import { CardContent } from 'twenty-ui/layout'; import { themeCssVariables } from 'twenty-ui/theme-constants'; -const StyledRowContent = styled(CardContent)` +const StyledRowContentContainer = styled.div` align-items: center; display: flex; gap: ${themeCssVariables.spacing[2]}; height: ${themeCssVariables.spacing[12]}; padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[4]}; - &[data-clickable='false'] { + > *[data-clickable='false'] { cursor: default; } `; @@ -30,8 +30,10 @@ export const ActivityRow = ({ }; return ( - - {children} - + + + {children} + + ); }; diff --git a/packages/twenty-front/src/modules/activities/components/ParticipantChip.tsx b/packages/twenty-front/src/modules/activities/components/ParticipantChip.tsx index 2adf7fea50..dd4672d24d 100644 --- a/packages/twenty-front/src/modules/activities/components/ParticipantChip.tsx +++ b/packages/twenty-front/src/modules/activities/components/ParticipantChip.tsx @@ -7,7 +7,7 @@ import { RecordChip } from '@/object-record/components/RecordChip'; import { Avatar } from 'twenty-ui/display'; import { themeCssVariables } from 'twenty-ui/theme-constants'; -const StyledAvatar = styled(Avatar)` +const StyledAvatarContainer = styled.span` margin-right: ${themeCssVariables.spacing[1]}; `; @@ -67,12 +67,14 @@ export const ParticipantChip = ({ /> ) : ( - + + + {displayName} )} diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailsCard.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailsCard.tsx index d746889c84..e2ef6e2635 100644 --- a/packages/twenty-front/src/modules/activities/emails/components/EmailsCard.tsx +++ b/packages/twenty-front/src/modules/activities/emails/components/EmailsCard.tsx @@ -38,9 +38,11 @@ const StyledContainer = styled.div` overflow: auto; `; -const StyledH1Title = styled(H1Title)` - display: flex; - gap: ${themeCssVariables.spacing[2]}; +const StyledH1TitleWrapper = styled.div` + > h2 { + display: flex; + gap: ${themeCssVariables.spacing[2]}; + } `; const StyledEmailCount = styled.span` @@ -107,15 +109,17 @@ export const EmailsCard = () => { return (
- - Inbox{' '} - {totalNumberOfThreads} - - } - fontColor={H1TitleFontColor.Primary} - /> + + + Inbox{' '} + {totalNumberOfThreads} + + } + fontColor={H1TitleFontColor.Primary} + /> + {!firstQueryLoading && ( {timelineThreads?.map((thread: TimelineThread) => ( diff --git a/packages/twenty-front/src/modules/activities/files/components/DropZone.tsx b/packages/twenty-front/src/modules/activities/files/components/DropZone.tsx index 66065ac61f..eacfd31faf 100644 --- a/packages/twenty-front/src/modules/activities/files/components/DropZone.tsx +++ b/packages/twenty-front/src/modules/activities/files/components/DropZone.tsx @@ -34,8 +34,9 @@ const StyledUploadDragSubTitle = styled.div` line-height: ${themeCssVariables.text.lineHeight.md}; `; -const StyledUploadIcon = styled(IconUpload)` +const StyledUploadIconContainer = styled.div` color: ${themeCssVariables.font.color.tertiary}; + display: flex; margin-bottom: ${themeCssVariables.spacing[3]}; `; @@ -83,10 +84,12 @@ export const DropZone = ({ // eslint-disable-next-line react/jsx-props-no-spreading {...getInputProps()} /> - + + + {t`Upload files`} {t`Drag and Drop Here`} diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/components/TimelineCard.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/components/TimelineCard.tsx index eef9404347..3825f23613 100644 --- a/packages/twenty-front/src/modules/activities/timeline-activities/components/TimelineCard.tsx +++ b/packages/twenty-front/src/modules/activities/timeline-activities/components/TimelineCard.tsx @@ -38,11 +38,11 @@ const StyledMainContainer = styled.div` } `; -const StyledSidePanelAnimatedPlaceholderEmptyContainer = styled( - AnimatedPlaceholderEmptyContainer, -)` - height: auto; - padding-top: ${themeCssVariables.spacing[8]}; +const StyledSidePanelPlaceholderWrapper = styled.div` + > * { + height: auto; + padding-top: ${themeCssVariables.spacing[8]}; + } `; export const TimelineCard = () => { @@ -59,12 +59,8 @@ export const TimelineCard = () => { } if (isTimelineActivitiesEmpty) { - const EmptyContainer = isInSidePanel - ? StyledSidePanelAnimatedPlaceholderEmptyContainer - : AnimatedPlaceholderEmptyContainer; - - return ( - @@ -77,7 +73,15 @@ export const TimelineCard = () => { {t`There is no activity associated with this record.`} - + + ); + + return isInSidePanel ? ( + + {placeholderContent} + + ) : ( + placeholderContent ); } diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCard.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCard.tsx index 715302b23c..e2d6c94260 100644 --- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCard.tsx +++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCard.tsx @@ -1,5 +1,4 @@ import { styled } from '@linaria/react'; -import { Card } from 'twenty-ui/layout'; import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants'; type EventCardProps = { @@ -22,7 +21,7 @@ const StyledCardContainer = styled.div` } `; -const StyledCard = styled(Card)` +const StyledCardInnerContainer = styled.div` background: ${themeCssVariables.background.secondary}; border: 1px solid ${themeCssVariables.border.color.medium}; border-radius: ${themeCssVariables.border.radius.md}; @@ -40,7 +39,7 @@ export const EventCard = ({ children, isOpen }: EventCardProps) => { return ( isOpen && ( - {children} + {children} ) ); diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDynamicComponent.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDynamicComponent.tsx index 0e5b147802..c3ce1bbd47 100644 --- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDynamicComponent.tsx +++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDynamicComponent.tsx @@ -26,8 +26,12 @@ export const StyledEventRowItemColumn = styled.div` gap: ${themeCssVariables.spacing[1]}; `; -export const StyledEventRowItemAction = styled(StyledEventRowItemColumn)` +export const StyledEventRowItemAction = styled.div` + align-items: center; color: ${themeCssVariables.font.color.secondary}; + display: flex; + flex-direction: row; + gap: ${themeCssVariables.spacing[1]}; `; export const EventRowDynamicComponent = ({ diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/BubbleMenuIconButton.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/BubbleMenuIconButton.tsx index 062bc3958a..acf2e9969e 100644 --- a/packages/twenty-front/src/modules/advanced-text-editor/components/BubbleMenuIconButton.tsx +++ b/packages/twenty-front/src/modules/advanced-text-editor/components/BubbleMenuIconButton.tsx @@ -13,7 +13,7 @@ type BubbleMenuIconButtonProps = { isActive?: boolean; }; -const StyledBubbleMenuIconButton = styled(FloatingIconButton)` +const StyledBubbleMenuIconButtonContainer = styled.div` border: none; border-radius: ${themeCssVariables.spacing[1.5]}; width: ${themeCssVariables.spacing[6]}; @@ -29,17 +29,18 @@ export const BubbleMenuIconButton = ({ isActive, }: BubbleMenuIconButtonProps) => { return ( - + + + ); }; diff --git a/packages/twenty-front/src/modules/ai/components/AIChatAssistantMessageRenderer.tsx b/packages/twenty-front/src/modules/ai/components/AIChatAssistantMessageRenderer.tsx index b538346cc2..ebd44920cb 100644 --- a/packages/twenty-front/src/modules/ai/components/AIChatAssistantMessageRenderer.tsx +++ b/packages/twenty-front/src/modules/ai/components/AIChatAssistantMessageRenderer.tsx @@ -27,8 +27,9 @@ const StyledLoadingIconContainer = styled.div` padding-inline: ${themeCssVariables.spacing[1]}; `; -const StyledLoadingIcon = styled(IconDotsVertical)` +const StyledLoadingIconWrapper = styled.span` color: ${themeCssVariables.font.color.light}; + display: flex; transform: rotate(90deg); `; @@ -37,7 +38,9 @@ const InitialLoadingIndicator = () => { return ( - + + + ); }; diff --git a/packages/twenty-front/src/modules/ai/components/AIChatTab.tsx b/packages/twenty-front/src/modules/ai/components/AIChatTab.tsx index d7b03a7328..7b149e614f 100644 --- a/packages/twenty-front/src/modules/ai/components/AIChatTab.tsx +++ b/packages/twenty-front/src/modules/ai/components/AIChatTab.tsx @@ -115,12 +115,14 @@ const StyledRightButtonsContainer = styled.div` gap: ${themeCssVariables.spacing[1]}; `; -const StyledReadOnlyModelButton = styled(LightButton)` - cursor: default; +const StyledReadOnlyModelButtonContainer = styled.div` + > * { + cursor: default; - &:hover, - &:active { - background: transparent; + &:hover, + &:active { + background: transparent; + } } `; @@ -163,10 +165,9 @@ export const AIChatTab = () => { - + + + diff --git a/packages/twenty-front/src/modules/ai/components/AIChatTabMessageList.tsx b/packages/twenty-front/src/modules/ai/components/AIChatTabMessageList.tsx index 62dcf15592..e43e3c9b6d 100644 --- a/packages/twenty-front/src/modules/ai/components/AIChatTabMessageList.tsx +++ b/packages/twenty-front/src/modules/ai/components/AIChatTabMessageList.tsx @@ -8,7 +8,7 @@ import { styled } from '@linaria/react'; import { isNonEmptyArray } from '@sniptt/guards'; import { themeCssVariables } from 'twenty-ui/theme-constants'; -const StyledScrollWrapper = styled(ScrollWrapper)` +const StyledScrollWrapperContainer = styled.div` display: flex; flex: 1; flex-direction: column; @@ -30,11 +30,13 @@ export const AIChatTabMessageList = () => { } return ( - - {agentChatMessageIdsComponent.map((messageId) => { - return ; - })} - - + + + {agentChatMessageIdsComponent.map((messageId) => { + return ; + })} + + + ); }; diff --git a/packages/twenty-front/src/modules/ai/components/ThinkingStepsDisplay.tsx b/packages/twenty-front/src/modules/ai/components/ThinkingStepsDisplay.tsx index d126fca33f..afe19c0b49 100644 --- a/packages/twenty-front/src/modules/ai/components/ThinkingStepsDisplay.tsx +++ b/packages/twenty-front/src/modules/ai/components/ThinkingStepsDisplay.tsx @@ -140,8 +140,9 @@ const StyledReasoningText = styled.p` white-space: pre-wrap; `; -const StyledOrbitLoaderIcon = styled(ThinkingOrbitLoaderIcon)` +const StyledOrbitLoaderIconContainer = styled.span` color: ${themeCssVariables.font.color.tertiary}; + display: flex; `; const StyledIconContainer = styled.div` @@ -214,7 +215,7 @@ const StyledToolDetailsContainer = styled.div` overflow: hidden; `; -const StyledToolTabList = styled(TabList)` +const StyledToolTabListContainer = styled.div` background-color: ${themeCssVariables.background.secondary}; padding-left: ${themeCssVariables.spacing[1]}; `; @@ -334,11 +335,13 @@ const ThinkingToolStepRow = ({ {part.errorText} ) : ( - + + + - {isActive ? : } + {isActive ? ( + + + + ) : ( + + )} {isActive ? t`Thinking` : t`Thought`} diff --git a/packages/twenty-front/src/modules/ai/components/suggested-prompts/AIChatSuggestedPrompts.tsx b/packages/twenty-front/src/modules/ai/components/suggested-prompts/AIChatSuggestedPrompts.tsx index 5fd76d216a..413c783f8b 100644 --- a/packages/twenty-front/src/modules/ai/components/suggested-prompts/AIChatSuggestedPrompts.tsx +++ b/packages/twenty-front/src/modules/ai/components/suggested-prompts/AIChatSuggestedPrompts.tsx @@ -29,7 +29,7 @@ const StyledTitle = styled.div` padding: 0 ${themeCssVariables.spacing[2]}; `; -const StyledSuggestedPromptButton = styled(LightButton)` +const StyledSuggestedPromptButtonContainer = styled.div` align-self: flex-start; `; @@ -62,13 +62,14 @@ export const AIChatSuggestedPrompts = ({ {t`What can I help you with?`} {DEFAULT_SUGGESTED_PROMPTS.map((prompt) => ( - handleClick(prompt)} - /> + + handleClick(prompt)} + /> + ))} ); diff --git a/packages/twenty-front/src/modules/billing/components/internal/MeteredPriceSelector.tsx b/packages/twenty-front/src/modules/billing/components/internal/MeteredPriceSelector.tsx index 9eafc02adf..bdb73476e2 100644 --- a/packages/twenty-front/src/modules/billing/components/internal/MeteredPriceSelector.tsx +++ b/packages/twenty-front/src/modules/billing/components/internal/MeteredPriceSelector.tsx @@ -31,11 +31,11 @@ const StyledRow = styled.div` gap: ${themeCssVariables.spacing[2]}; `; -const StyledSelect = styled(Select)` +const StyledSelectContainer = styled.div` flex: 1 1; `; -const StyledButton = styled(Button)` +const StyledButtonContainer = styled.div` flex: 0 0 auto; `; @@ -160,26 +160,30 @@ export const MeteredPriceSelector = ({ description={t`Number of new credits allocated every ${recurringInterval}`} /> - - {isChanged && ( - + - + +
+