From fecf699bc52198f00a84114d00ccd3bbfeba741a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Fri, 19 Jun 2026 18:10:12 +0200 Subject: [PATCH] Fix broken CSV import grid layout (#21867) ## What Import `react-data-grid/lib/styles.css` in `SpreadsheetImportTable`, the single component that renders the import grid (used by the Validate Data and Select Header steps). ## Why The React 19 migration (#21531) bumped `react-data-grid` from `7.0.0-beta.13` to `7.0.0-beta.59`. The old beta auto-injected its layout CSS; beta.59 ships it as a separate `react-data-grid/lib/styles.css` export that must be imported manually. It was never imported, so the grid lost its base layout (grid template, row heights, cell positioning): rows stacked at full height and columns no longer aligned. The library scopes its styles under `@layer rdg`, so the existing Linaria theme overrides still take precedence. Review in cubic ## Before CleanShot 2026-06-19 at 17 43
58@2x ## After CleanShot 2026-06-19 at 18 02
36@2x --- .../spreadsheet-import/components/SpreadsheetImportTable.tsx | 1 + .../steps/components/ValidationStep/components/columns.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx index 81966def3d..920a3c4d9b 100644 --- a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx +++ b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx @@ -1,6 +1,7 @@ import { styled } from '@linaria/react'; import { useContext } from 'react'; import { DataGrid, type DataGridProps } from 'react-data-grid'; +import 'react-data-grid/lib/styles.css'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal'; import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants'; diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsx index b36873472b..11e0381466 100644 --- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsx +++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsx @@ -56,10 +56,12 @@ const StyledInputContainer = styled.div` `; const StyledDefaultContainer = styled.div` + align-content: center; min-height: 100%; min-width: 100%; overflow: hidden; text-overflow: ellipsis; + white-space: nowrap; `; const StyledSelectReadonlyValueContianer = styled.div`