Skip to content

fix(ui): let resizable data tables fill their container - #567

Open
V3RON wants to merge 1 commit into
mainfrom
fix/sqlite-results-table-width
Open

V3RON wants to merge 1 commit into
mainfrom
fix/sqlite-results-table-width

Conversation

@V3RON

@V3RON V3RON commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Description

Resizable data tables now fill their container instead of stopping at the total width of their columns. This fixes the SQLite panel, where an empty result showed "No Results" squeezed into a narrow column and a populated result stopped short of the right edge of the results pane.

  • The table is width: 100%, with min-width set to its column total, so it is never narrower than its columns.
  • A trailing unsized <col> takes the spare width. Fixed layout gives leftover space to auto-width columns, so the resized columns keep their exact widths and resizing one column still does not stretch the others.
  • Applied in both DataTable and VirtualizedDataTable, since they share resizableTableStyle.

Related Issue

Closes #566

Context

The first attempt used width: max(<columns>px, 100%). jsdom drops max() values, so the unit tests could not assert them, which is why the helper now sets width: 100% and minWidth. Browsers honor min-width on tables, and the measured SQLite table width matched its pane (1074 CSS px).

The table is still exactly as wide as its columns when it is wider than the container, so horizontal scrolling is unchanged.

The version plan is a patch for @rozenite/ui: user-visible behavior changes in the shared table, and the SQLite panel inherits the fix.

Testing

Automated:

  • pnpm checks:affected: 106 tasks successful
  • pnpm test:affected: 72 tasks successful
  • pnpm release:plan: passes with the new changeset
  • packages/ui table tests: 24 passed (data-table, virtualized-data-table), including updated width assertions and a new trailing-column assertion

Manual, on the iPhone 17 Pro simulator with the playground running from this branch and React Native DevTools open through agent-browser:

  • SQLite, Query tab, SELECT * FROM projects on the empty table: "No Results / Run SQL to see rows here." is centered across the results pane.
  • SQLite, Query tab, SELECT name, type FROM sqlite_master: the results table spans the full pane (1074 CSS px, measured in the DOM).
  • SQLite, Data tab on the empty projects table: "No Rows On This Page" is centered across the pane.
  • SQLite, Data tab on wide_demo: columns scroll horizontally, and the footer spans the pane.
  • SQLite, Structure tab for projects and wide_demo (20+ columns): Columns table fills the width, Keys and Indexes empty states are centered.

The table was sized to exactly the sum of its column widths, so the
SQLite results pane stopped short of its right edge and an empty state
was squeezed into zero width. The table now fills the container and never
drops below its columns; a trailing unsized column absorbs the spare width
so resized columns keep their exact widths.

Adds a ColumnResizingEmpty story.

This branch has not been deployed

No deployments
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.

SQLite results and empty state don't fill the results pane

1 participant