Skip to content

Table frame refactor - #3456

Open
benjaminleonard wants to merge 4 commits into
mainfrom
table-frame-refactor
Open

benjaminleonard wants to merge 4 commits into
mainfrom
table-frame-refactor

Conversation

@benjaminleonard

@benjaminleonard benjaminleonard commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Some of the previous table logic was pretty awkward. In particular the outer border was drawn by the edge cells, with ::after overlays faking the rounded corners.. The downside of that is for tables without a sticky leading and trailing cell we were missing a border at the overflow.

Before:
image

After:
CleanShot 2026-11-24 at 11 21 17

The outer border is now a sticky element sized to the scroller's visible width (100cqw), so it stays closed at any scroll position. Edge cells keep 1px transparent borders under it so column widths don't change.

Other refactoring

  • Native scrollbar: simplebar-react is removed and replaced with a styled native scrollbar. The space below the table stays the same whether or not it overflows. There's a small padding discrepancy if you have "always" turned on for scrollbars on Mac in Firefox but I tried to choose a value that works for both.
  • Simpler table.css: the corner overlays and !important overrides are gone.
  • Remove unused row selection: the singleSelect/multiSelect props, select columns, Table.Row's selected prop, the selection CSS, and their tests. Nothing has used them since More table conversions #2115.
  • Tables with no actions column get a matching shadow at the right edge while there's more to scroll.
  • className on Table now applies to the outer box, so max-w-lg (silo quotas) sizes the frame too.
  • Visual tests: added narrow-viewport overflow cases for the sleds and instances tables.

Overscroll

I adjusted because the overscroll behaviour messes with sticky table cells and the surrounding border. Should feel a bit more "app-like" now.

  • Page: set overscroll-behavior-y: none on html, not just body, so the app shell no longer rubber-bands.
  • Modals, side modals and sidebar: changed from overscroll-none to overscroll-contain. They keep their own bounce at the ends where the browser supports it (mainly Safari and iOS), without the scroll passing through to the page.
  • Scrolling menus and pickers: overscroll-behavior: none on .ox-menu (listbox, combobox, subscriptions field) and on the date picker popover. A small floating panel bouncing looks broken.
  • Tables: overscroll-behavior-x: none on the table scroller. A rubber-band would slide the table out from under the frame. This also blocks trackpad back-swipe while the pointer is over a table that overflows.

If we want to keep this PR more pure, we could probably just include the table overscroll behaviour?


@david-crespo I have dropped the shadow a little, I think we pushed it a little too far in #3440 but I'm open to being convinced otherwise since this is sort of screen dependant.

The table's outer border used to be painted by the edge cells, with ::after
overlays faking the rounded corners. When a table without a sticky actions
column overflowed, its right edge scrolled away and the border was left open.

- Draw the border with a frame element pinned to the visible part of the
  scroller (sticky, sized with 100cqw), so it stays closed at any scroll
  position. Edge cells keep transparent 1px borders so column widths match.
- Replace simplebar-react with a native scrollbar styled to match
  (::-webkit-scrollbar, scrollbar-color in Firefox), keeping 16px below the
  table whether or not it overflows.
- Remove the corner overlays and !important overrides from table.css.
- Draw row selection as one outline per row, merging adjacent rows with
  :has(), instead of box-shadow hacks on every cell. Removes the
  cloneElement pass in Table.Body.
- Fade sticky column shadows in and out with scroll-state container queries
  where supported, falling back to the scroll-driven animations. Tables with
  no actions column get a matching shadow at the right edge while there's
  more to scroll to.
- Table's className now applies to the outer box, so sizing classes like
  max-w-lg size the frame too.
- Add narrow-viewport overflow cases to the visual regression suite.

Not pixel-identical to before: two old quirks (no left border on the
bottom-left cell, -m-px on last-column cells) skewed column widths, so some
columns shift by a fraction of a pixel, and two-column tables are 1px taller.
- Set overscroll-behavior-y: none on html as well as body so the app shell
  never rubber-bands, whichever element the browser treats as the viewport
- Use overscroll-contain on side modal, modal and sidebar scrollers so they
  keep their native end-of-content bounce without chaining to the page
- Disable overscroll entirely on menus, dropdowns and popovers, where a
  bounce on a small floating panel looks broken
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Nov 24, 2026 12:20pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — f28dc53a Deployed Nov 24, 2026 by vercel[bot]
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