Skip to content

fix(components): DataTable has layout prop for fixed or auto#2883

Merged
taylorvnoj merged 8 commits intomasterfrom
TAYLOR/datatable-fixed
Feb 12, 2026
Merged

fix(components): DataTable has layout prop for fixed or auto#2883
taylorvnoj merged 8 commits intomasterfrom
TAYLOR/datatable-fixed

Conversation

@taylorvnoj
Copy link
Copy Markdown
Contributor

@taylorvnoj taylorvnoj commented Jan 20, 2026

Motivations

Previously, table-layout: auto sized columns from content, making it hard to create consistent layouts. Switching to table-layout: fixed lets consumers control column widths (e.g. via percentages), with more predictable layouts across different data sets.
To keep flexibility, we expose an optional layout prop so tables can use either fixed or auto (default) layout as needed.

Changes

Changed

DataTableTable.tsx

  • Added optional layout prop ("auto" | "fixed")
  • default is auto

DataTableNotes.mdx

  • Added new "Column Widths" section explaining:
    • The layout prop and when to use each value
    • How to set widths on DataTable.HeaderCell via the style prop
    • Example using TanStack Table’s column sizing API

Composable.stories.tsx

  • Added new ColumnWidths story demonstrating percentage-based column widths

Testing

Go to ColumnWidths Story http://localhost:6005/?path=/story/components-lists-and-tables-datatable-web-composable--column-widths

  • see that the Service column has a different width

You can go to the Basic example and apply the layout prop, seeing the slight differences between auto and fixed

Changes can be
tested via Pre-release


In Atlantis we use Github's built in pull request reviews.

@taylorvnoj taylorvnoj self-assigned this Jan 20, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jan 20, 2026

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: d962d78
Status: ✅  Deploy successful!
Preview URL: https://9540cfe1.atlantis.pages.dev
Branch Preview URL: https://taylor-datatable-fixed.atlantis.pages.dev

View logs

@taylorvnoj taylorvnoj force-pushed the TAYLOR/datatable-fixed branch from bae19ca to afaa309 Compare February 9, 2026 20:21
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference here is the equal column sizing we're now getting from using fixed.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 9, 2026

Published Pre-release for 913588d with versions:

  - @jobber/components@6.110.2-TAYLORdat-913588d.6+913588da8

To install the new version(s) for Web run:

npm install @jobber/components@6.110.2-TAYLORdat-913588d.6+913588da8

@taylorvnoj taylorvnoj marked this pull request as ready for review February 9, 2026 23:35
@taylorvnoj taylorvnoj requested a review from a team as a code owner February 9, 2026 23:35
</Cluster>
</Stack>
),
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mobile content is duplicated. It causes weird rendering

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes! Fixed here 80633ab

Comment on lines +78 to +79
<DataTable.HeaderCell>Description</DataTable.HeaderCell>{" "}
{/* Takes remaining space */}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<DataTable.HeaderCell>Description</DataTable.HeaderCell>{" "}
{/* Takes remaining space */}
{/* Takes remaining space */}
<DataTable.HeaderCell>Description</DataTable.HeaderCell>

Minor change to make it clear which cell is taking the remaining space

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that makes more sense, thank you! Fixed here 3e20a50

Copy link
Copy Markdown
Contributor

@MichaelParadis MichaelParadis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestions. Main one is the storybook rendering. I am fine either way with the docs ordering but I found it was more clear to me

@taylorvnoj taylorvnoj changed the title fix(components): DataTable has fixed layout fix(components): DataTable has layout prop for fixed or auto Feb 12, 2026
Copy link
Copy Markdown
Contributor

@MichaelParadis MichaelParadis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great job

@taylorvnoj taylorvnoj merged commit 07f110c into master Feb 12, 2026
16 checks passed
@taylorvnoj taylorvnoj deleted the TAYLOR/datatable-fixed branch February 12, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants