feat(Table): add configurable column widths - #2682
Merged
Merged
Conversation
Add a `layout` prop ("auto" | "fixed", default "auto") to Table and CSS-based
`width` / `minWidth` props to TableColumn. React Aria already renders a native
table, so widths are applied as plain CSS on the column instead of relying on
ResizableTableContainer. The consumer API and remote contract stay backwards
compatible.
Includes a story, a docs example + overview section, and a visual test
(with darwin baselines) covering fixed widths and minWidth.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… docs Document two conventions in the agent guides: new or changed rendered behavior must come with a visual test in remote-react-components (runs Local + Remote), and docs example content must use neutral mittwald-domain data instead of pop-culture / Star Wars references. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lisa18289
requested review from
Jan-Eimertenbrink,
ins0,
maaaathis and
mfal
as code owners
July 22, 2026 06:16
Contributor
Coverage Report for ./packages/components/
File CoverageNo changed files found. |
Contributor
🚀 Preview DeploymentPreview environments are ready:
Images:
|
Co-authored-by: Lisa18289 <84317589+Lisa18289@users.noreply.github.com>
Add a `minWidth` prop to Table. When space is tight the table keeps this width and the container scrolls horizontally instead of squeezing its columns. The width is applied to an inner block wrapper inside the scroll container, since `min-width` is honored reliably on a block element but not on the `<table>` element itself. Column `width`/`minWidth` are typed as `number | string` (instead of indexed CSSProperties access) to avoid a csstype portability error in the inferred type of List's `typedList`. Includes a docs example update, an overview note, and a visual test with darwin baselines. Linux baselines are produced in CI via the update-screenshots label. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Warn that the Remote visual-test environment resolves the built dist of the remote packages, so changing @flr-generate props requires rebuilding the remote chain before updating snapshots — otherwise the Remote render silently uses a stale dist and produces a misleading baseline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Widen the ID column to 110px and add minWidth=550 so the story demonstrates horizontal scrolling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Lisa18289 <84317589+Lisa18289@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mfal
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Users want to give
Tablecolumns a fixed width. This was not possible with the previous React Aria wiring: RAC's<Column width>only takes effect inside aResizableTableContainer. But React Aria already renders a native<table>, so we now simply apply the width as CSS on the column — React Aria stays in place.Changes
Table: newlayout="auto" | "fixed"prop (default"auto") → controlstable-layout.TableColumn: newwidthandminWidthprops (CSSProperties[...]), applied as inline CSS on the rendered column (not forwarded to RAC's resize-only width props).layoutadded).FixedColumnWidthsstory, docs example + overview section (neutral content), and aTable Column Widthsvisual test (fixed widths + minWidth) including darwin baselines.Intentionally omitted
maxWidth— browsers ignoremax-widthon table cells, so it has no effect and is not part of the API.Screenshots
layout="fixed"withwidth={80}/width="40%"/ no width; a long name wraps inside the 40% column. Second table:minWidthkeeps a column with short content wide.To do before merge
update-screenshotslabel (darwin baselines are committed locally).🤖 Generated with Claude Code