Skip to content

[codex] Fix Safari grid horizontal scrolling#1512

Open
gregory-boch-prisma wants to merge 1 commit intomainfrom
codex/fix-safari-grid-horizontal-scroll
Open

[codex] Fix Safari grid horizontal scrolling#1512
gregory-boch-prisma wants to merge 1 commit intomainfrom
codex/fix-safari-grid-horizontal-scroll

Conversation

@gregory-boch-prisma
Copy link
Copy Markdown

Summary

Fixes horizontal scrolling in Prisma Studio wide grids on Safari by keeping the shared table wrapper as a plain overflow scroller instead of making the scroll container itself a flex formatting context.

Root Cause

The grid table already pins its width to the computed column sizes. The wrapper around that table also had display: flex, which Chromium tolerated, but Safari can fail to expose the expected horizontal scroll range for wide table content inside an overflow flex container.

Changes

  • Remove flex items-start from the shared table wrapper.
  • Add min-w-0 so the overflow container can shrink inside Studio's flex layout while preserving horizontal overflow.
  • Add a DataGrid layout regression test asserting the wrapper remains a plain overflow-auto scroller.
  • Add a localStorage mock in that test file so it runs reliably in this Node/happy-dom setup.

Validation

  • pnpm test:ui ui/studio/grid/DataGrid.layout.test.tsx
  • Manual browser check with pnpm demo:ppg at http://localhost:4310 using the seeded public.all_data_types table.
  • Captured screenshots at the left edge and after horizontal scroll; the later screenshot shows the grid successfully scrolled to later columns (double_col, inet_col).

Note: pnpm test:ui ui/studio/grid/DataGrid.virtualization.test.tsx currently fails before assertions in this checkout because globalThis.localStorage lacks getItem in that test environment. The focused layout test includes a local mock and passes.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Compute preview deployed.

Branch: codex/fix-safari-grid-horizontal-scroll
Service: codex-fix-safari-grid-horizontal-scroll
Preview: https://cmou2cw020fmryhdx8pgyytdt.cdg.prisma.build
Version: https://cv-ceaf5651dfde.cdg.prisma.build

@gregory-boch-prisma gregory-boch-prisma marked this pull request as ready for review May 6, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant