Skip to content

Conversation

@taylorvnoj
Copy link
Contributor

@taylorvnoj taylorvnoj commented Jan 19, 2026

Motivations

Updates DataTable.Footer to support two usage patterns by making the colSpan prop optional. This enables column-aligned footer content (like totals rows) in addition to the existing full-width footer content (like pagination).

Changes

Added

DataTableFooter.tsx

  • Made colSpan prop optional
  • When colSpan is provided: wraps children in a single <td> spanning all columns (existing behavior)
  • When colSpan is omitted: renders children directly, allowing custom <Row>/<Cell> structures

DataTableNotes.mdx

  • Added new "Footer" documentation section explaining both usage patterns
  • Updated examples to include colSpan where appropriate
  • Fixed Footer placement in basic structure example (moved inside Table)

Composable.stories.tsx

  • Added WithTotalsFooter story demonstrating column-aligned totals with pagination spans the entire table

Testing

Visual testing in Storybook:

  • verify the WithTotalsFooter story renders with totals under appropriate columns, while pagination
Screenshot 2026-01-19 at 5 36 38 PM

Changes can be
tested via Pre-release


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

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

cloudflare-workers-and-pages bot commented Jan 19, 2026

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4c61b96
Status: ✅  Deploy successful!
Preview URL: https://d922447a.atlantis.pages.dev
Branch Preview URL: https://taylor-datatable-footer.atlantis.pages.dev

View logs

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Published Pre-release for e1926a2 with versions:

  - @jobber/components@6.107.3-TAYLORdat-e1926a2.4+e1926a2cc

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

npm install @jobber/components@6.107.3-TAYLORdat-e1926a2.4+e1926a2cc

@taylorvnoj taylorvnoj marked this pull request as ready for review January 20, 2026 16:54
@taylorvnoj taylorvnoj requested a review from a team as a code owner January 20, 2026 16:54
@jdeichert jdeichert self-requested a review January 20, 2026 17:15
* directly, allowing custom row/cell structures.
*/
readonly colSpan: number;
readonly colSpan?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to see a visual integration test verifying this behaviour! Would prevent future breakage. Not sure if DataTable has visual tests already though, so we might be missing more than just this feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to my knowledge it doesn't have visual integration tests but that is something I can absolutely do in a separate PR, if that's ok with you! I've been meaning to

Copy link
Contributor

Choose a reason for hiding this comment

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

Up to whether you have time. Visual tests are very much appreciated and ideally we've been trying to make sure all PRs have them.

Worth emphasizing that this being a change, ideally the visual test is written first to confirm that after the change, the screenshots don't change for existing cases. And then add a new test verifying the new functionality as well.

I'm not holding this PR up on that. Will approve after I'm done testing here 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood! Thanks Jacob. I will fast follow

</DataTable.Footer>

{/* Totals footer - omits colSpan for column-aligned content */}
<DataTable.Footer>
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that this Footer is below the pagination Footer above. However, it's rendered in the opposite order? I'm not familiar with this, so I'm curious why that's happening/if it's expected. I briefly checked the Pagination docs and I don't see this Footer order documented, maybe I'm missing something?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants