From 77004016f42bbf30ce6b0ce643a27047b4328b02 Mon Sep 17 00:00:00 2001 From: Gildas Garcia <1122076+djhi@users.noreply.github.com> Date: Fri, 6 Mar 2026 08:01:22 +0100 Subject: [PATCH] fix: cannot resize table editor columns on safari (#43450) ## Problem On Safari, it's impossible to resize a column. ## Solution This is actually a bug in `react-data-grid` that has been fixed in more recent versions but we can't use them. Patch the package ## How to test - Open the any table in the _Table editor_ - Resize a column --- .github/workflows/ai-tests.yml | 1 + .../workflows/authorize-vercel-deploys.yml | 1 + .github/workflows/autofix_linters.yml | 1 + .github/workflows/dashboard-pr-reminder.yml | 1 + .github/workflows/docs-last-changed.yml | 1 + .github/workflows/docs-mgmt-api-update.yml | 1 + .../workflows/docs-sync-troubleshooting.yml | 1 + .github/workflows/docs-sync.yml | 1 + .github/workflows/docs-tests-smoke.yml | 1 + .github/workflows/docs-tests.yml | 1 + .github/workflows/pg-meta-tests.yml | 1 + .github/workflows/prettier.yml | 6 +++- .github/workflows/search.yml | 1 + .../studio-lint-ratchet-decrease.yml | 1 + .github/workflows/studio-lint-ratchet.yml | 3 +- .github/workflows/studio-unit-tests.yml | 3 ++ .github/workflows/ui-patterns-tests.yml | 1 + .github/workflows/ui-tests.yml | 1 + .github/workflows/www-tests.yml | 1 + patches/react-data-grid.patch | 32 +++++++++++++++++++ pnpm-lock.yaml | 11 +++++-- pnpm-workspace.yaml | 23 +++++++------ 22 files changed, 79 insertions(+), 15 deletions(-) create mode 100644 patches/react-data-grid.patch diff --git a/.github/workflows/ai-tests.yml b/.github/workflows/ai-tests.yml index 6e27f7e86a..8596d3eacd 100644 --- a/.github/workflows/ai-tests.yml +++ b/.github/workflows/ai-tests.yml @@ -36,6 +36,7 @@ jobs: with: sparse-checkout: | packages + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm with: diff --git a/.github/workflows/authorize-vercel-deploys.yml b/.github/workflows/authorize-vercel-deploys.yml index 6a72b23d7a..967dff10d7 100644 --- a/.github/workflows/authorize-vercel-deploys.yml +++ b/.github/workflows/authorize-vercel-deploys.yml @@ -29,6 +29,7 @@ jobs: # fetch only the root files and scripts folder sparse-checkout: | scripts + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm with: diff --git a/.github/workflows/autofix_linters.yml b/.github/workflows/autofix_linters.yml index 2ae0159afa..f86ce2e573 100644 --- a/.github/workflows/autofix_linters.yml +++ b/.github/workflows/autofix_linters.yml @@ -36,6 +36,7 @@ jobs: sparse-checkout: | packages apps + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/dashboard-pr-reminder.yml b/.github/workflows/dashboard-pr-reminder.yml index 76d464d0f4..d90bd6a0dc 100644 --- a/.github/workflows/dashboard-pr-reminder.yml +++ b/.github/workflows/dashboard-pr-reminder.yml @@ -21,6 +21,7 @@ jobs: with: sparse-checkout: | scripts + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/docs-last-changed.yml b/.github/workflows/docs-last-changed.yml index 1ec0774bba..7760a24f32 100644 --- a/.github/workflows/docs-last-changed.yml +++ b/.github/workflows/docs-last-changed.yml @@ -28,6 +28,7 @@ jobs: fetch-depth: 0 sparse-checkout: | apps/docs + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/docs-mgmt-api-update.yml b/.github/workflows/docs-mgmt-api-update.yml index 26eb74756e..61c2a31bc3 100644 --- a/.github/workflows/docs-mgmt-api-update.yml +++ b/.github/workflows/docs-mgmt-api-update.yml @@ -20,6 +20,7 @@ jobs: ref: master sparse-checkout: | apps/docs + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/docs-sync-troubleshooting.yml b/.github/workflows/docs-sync-troubleshooting.yml index c3794079ec..ce1720cb0b 100644 --- a/.github/workflows/docs-sync-troubleshooting.yml +++ b/.github/workflows/docs-sync-troubleshooting.yml @@ -28,6 +28,7 @@ jobs: with: sparse-checkout: | apps/docs + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/docs-sync.yml b/.github/workflows/docs-sync.yml index 7d7761070c..437d32ce36 100644 --- a/.github/workflows/docs-sync.yml +++ b/.github/workflows/docs-sync.yml @@ -31,6 +31,7 @@ jobs: sparse-checkout: | apps/docs packages + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/docs-tests-smoke.yml b/.github/workflows/docs-tests-smoke.yml index 92c72f2502..0ac43ebcb0 100644 --- a/.github/workflows/docs-tests-smoke.yml +++ b/.github/workflows/docs-tests-smoke.yml @@ -24,6 +24,7 @@ jobs: sparse-checkout: | apps/docs packages + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/docs-tests.yml b/.github/workflows/docs-tests.yml index 94d1bd66c0..35ab7b6ef5 100644 --- a/.github/workflows/docs-tests.yml +++ b/.github/workflows/docs-tests.yml @@ -30,6 +30,7 @@ jobs: examples packages supabase + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/pg-meta-tests.yml b/.github/workflows/pg-meta-tests.yml index 23cc250212..2c5740b46f 100644 --- a/.github/workflows/pg-meta-tests.yml +++ b/.github/workflows/pg-meta-tests.yml @@ -29,6 +29,7 @@ jobs: sparse-checkout: | packages/pg-meta packages/tsconfig + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index ba815b105a..8f36d889f4 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -20,7 +20,9 @@ jobs: - name: Check out repo uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 with: - sparse-checkout: apps + sparse-checkout: | + apps + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm with: @@ -46,6 +48,7 @@ jobs: with: sparse-checkout: | i18n + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm with: @@ -71,6 +74,7 @@ jobs: sparse-checkout: | apps/docs/pages apps/docs/content + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm with: diff --git a/.github/workflows/search.yml b/.github/workflows/search.yml index e8f5671d8d..6ce4cdcbe5 100644 --- a/.github/workflows/search.yml +++ b/.github/workflows/search.yml @@ -48,6 +48,7 @@ jobs: examples packages supabase + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/studio-lint-ratchet-decrease.yml b/.github/workflows/studio-lint-ratchet-decrease.yml index 4598a0cf7f..d29b3721bc 100644 --- a/.github/workflows/studio-lint-ratchet-decrease.yml +++ b/.github/workflows/studio-lint-ratchet-decrease.yml @@ -20,6 +20,7 @@ jobs: .github apps/studio packages + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/studio-lint-ratchet.yml b/.github/workflows/studio-lint-ratchet.yml index 7e635ca754..9a3025584c 100644 --- a/.github/workflows/studio-lint-ratchet.yml +++ b/.github/workflows/studio-lint-ratchet.yml @@ -26,6 +26,7 @@ jobs: .github apps/studio packages + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm @@ -41,5 +42,5 @@ jobs: - name: Install deps run: pnpm install --frozen-lockfile - - name: Run ratchet script + - name: Run ratchet script run: pnpm --filter studio run lint:ratchet diff --git a/.github/workflows/studio-unit-tests.yml b/.github/workflows/studio-unit-tests.yml index f7e96718d5..fa95d79675 100644 --- a/.github/workflows/studio-unit-tests.yml +++ b/.github/workflows/studio-unit-tests.yml @@ -36,6 +36,8 @@ jobs: sparse-checkout: | apps/studio packages + patches + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: filter with: @@ -83,6 +85,7 @@ jobs: with: sparse-checkout: | apps/studio + patches - name: Download coverage artifact uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: diff --git a/.github/workflows/ui-patterns-tests.yml b/.github/workflows/ui-patterns-tests.yml index 2036b9d3f6..4638b4616a 100644 --- a/.github/workflows/ui-patterns-tests.yml +++ b/.github/workflows/ui-patterns-tests.yml @@ -23,6 +23,7 @@ jobs: with: sparse-checkout: | packages + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 8d78237348..0e8de49a0f 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -33,6 +33,7 @@ jobs: with: sparse-checkout: | packages + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 if: steps.filter.outputs.relevant == 'true' diff --git a/.github/workflows/www-tests.yml b/.github/workflows/www-tests.yml index e6b9aecfbb..74cc5c34fb 100644 --- a/.github/workflows/www-tests.yml +++ b/.github/workflows/www-tests.yml @@ -30,6 +30,7 @@ jobs: apps/www packages supabase + patches - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 name: Install pnpm diff --git a/patches/react-data-grid.patch b/patches/react-data-grid.patch new file mode 100644 index 0000000000..430742bf86 --- /dev/null +++ b/patches/react-data-grid.patch @@ -0,0 +1,32 @@ +diff --git a/lib/bundle.cjs b/lib/bundle.cjs +index 810cb878ffb394df9f17296995a838e08a7d6ccf..4ba752efe1b1de392c3254d1b0d12ab9a637362f 100644 +--- a/lib/bundle.cjs ++++ b/lib/bundle.cjs +@@ -1412,10 +1412,7 @@ function HeaderCell({ + hasDoubleClicked = true; + onColumnResize(column, 'max-content'); + } +- function onLostPointerCapture(event) { +- if (!hasDoubleClicked) { +- onPointerMove(event); +- } ++ function onLostPointerCapture() { + currentTarget.removeEventListener('pointermove', onPointerMove); + currentTarget.removeEventListener('dblclick', onDoubleClick); + currentTarget.removeEventListener('lostpointercapture', onLostPointerCapture); +diff --git a/lib/bundle.js b/lib/bundle.js +index ac667d97a43720d1f56995e63ad6556b80d4c4bf..42b6a17f382fffadbb8cdd2d7a6b42235af89ad0 100644 +--- a/lib/bundle.js ++++ b/lib/bundle.js +@@ -1408,10 +1408,7 @@ function HeaderCell({ + hasDoubleClicked = true; + onColumnResize(column, 'max-content'); + } +- function onLostPointerCapture(event) { +- if (!hasDoubleClicked) { +- onPointerMove(event); +- } ++ function onLostPointerCapture() { + currentTarget.removeEventListener('pointermove', onPointerMove); + currentTarget.removeEventListener('dblclick', onDoubleClick); + currentTarget.removeEventListener('lostpointercapture', onLostPointerCapture); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ecf699a56c..5988ae0e1f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -80,6 +80,11 @@ overrides: '@aws-sdk/core>fast-xml-parser': ^5.3.5 openapi-sampler>fast-xml-parser: ^5.3.5 +patchedDependencies: + react-data-grid: + hash: 803f02d6cede565990ab9675326b93195b98bcc6477a4811715405892c257488 + path: patches/react-data-grid.patch + importers: .: @@ -176,7 +181,7 @@ importers: version: 18.3.1 react-data-grid: specifier: 7.0.0-beta.47 - version: 7.0.0-beta.47(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 7.0.0-beta.47(patch_hash=803f02d6cede565990ab9675326b93195b98bcc6477a4811715405892c257488)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-day-picker: specifier: ^9.11.1 version: 9.11.1(react@18.3.1) @@ -1007,7 +1012,7 @@ importers: version: 5.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-data-grid: specifier: 7.0.0-beta.47 - version: 7.0.0-beta.47(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 7.0.0-beta.47(patch_hash=803f02d6cede565990ab9675326b93195b98bcc6477a4811715405892c257488)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-day-picker: specifier: ^9.11.1 version: 9.11.1(react@18.3.1) @@ -34849,7 +34854,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-data-grid@7.0.0-beta.47(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-data-grid@7.0.0-beta.47(patch_hash=803f02d6cede565990ab9675326b93195b98bcc6477a4811715405892c257488)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: clsx: 2.1.1 react: 18.3.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 02e31c3851..ee742a9c02 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -13,9 +13,9 @@ catalog: '@types/node': ^22.0.0 '@types/react': ^18.3.0 '@types/react-dom': ^18.3.0 - next: ^15.5.10 - lodash-es: ^4.17.23 lodash: ^4.17.23 + lodash-es: ^4.17.23 + next: ^15.5.10 react: ^18.3.0 react-dom: ^18.3.0 recharts: ^2.15.4 @@ -44,7 +44,7 @@ minimumReleaseAge: 10080 minimumReleaseAgeExclude: - '@ai-sdk/*' - '@supabase/*' - - 'next' + - next - '@next/*' - ai - js-yaml @@ -66,17 +66,20 @@ onlyBuiltDependencies: - supabase overrides: + '@aws-sdk/core>fast-xml-parser': ^5.3.5 + '@mapbox/node-pre-gyp>tar': ^7.5.8 '@redocly/respect-core>form-data': ^4.0.4 '@redocly/respect-core>js-yaml': ^4.1.1 + cacache>tar: ^7.5.8 esbuild: ^0.25.2 - nodemailer: ^7.0.11 - lodash-es: 'catalog:' lodash: 'catalog:' + lodash-es: 'catalog:' + node-gyp>tar: ^7.5.8 + nodemailer: ^7.0.11 + openapi-sampler>fast-xml-parser: ^5.3.5 payload>undici: ^7.18.2 refractor>prismjs: ^1.30.0 - cacache>tar: ^7.5.8 - node-gyp>tar: ^7.5.8 - '@mapbox/node-pre-gyp>tar': ^7.5.8 tmp: ^0.2.4 - '@aws-sdk/core>fast-xml-parser': ^5.3.5 - openapi-sampler>fast-xml-parser: ^5.3.5 + +patchedDependencies: + react-data-grid: patches/react-data-grid.patch