Repository navigation
fix(data-table): keep the footer usable at phone widths - #685
Merged
Merged
Conversation
DataTable.Pagination now wraps its controls instead of letting the table frame clip them, so Next and Last stay tappable at 375px. Below a 480px footer width, the "Rows per page" label and the "Page" word become sr-only, and the bulk-action bar moves every action into the More actions menu so the table rows stay visible. Refs tailor-inc/platform-planning#2209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rrow Make the row count, page-size switcher and page controls siblings in one wrapping row, so a narrow footer breaks between them rather than inside the controls group. Drop the bar's separators when every action has collapsed into the menu, so Clear stays on the count's line. Refs tailor-inc/platform-planning#2209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The "Rows per page" label is now tied to the select with aria-labelledby, so the select keeps an accessible name when a narrow footer hides the label. Also test that the short "1 / 5" page text is hidden from assistive tech. Refs tailor-inc/platform-planning#2209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Code Metrics Report
Details | | main (923933d) | #685 (cdc0b72) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 62.9% | 62.9% | +0.0% |
| Files | 294 | 294 | 0 |
| Lines | 13483 | 13513 | +30 |
+ | Covered | 8485 | 8505 | +20 |
- | Test Execution Time | 4m3s | 4m24s | +21s |Code coverage of files in pull request scope (9.8% → 10.2%, patch 95.4%)
Reported by octocov |
When the footer is narrow, every bulk action moves into the More actions menu. The menu button now uses the outline style of the inline actions, so it stands out more than the Clear button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-narrow # Conflicts: # docs-manifest.json
…to fix/data-table-footer-narrow
interacsean
approved these changes
Nov 17, 2026
interacsean
left a comment
Contributor
There was a problem hiding this comment.
This is an improvement, but I think we can still have a more efficient use of space for the footer on smaller screens. 3 rows, which we see used when there's a selection, is still quite a lot of space
AG Grid actually just starts horizontal-scrolling.
If we don't want to use scrolling, some ideas:
- we can get back a small amount of pixels by using (numRows === 1 ? "row" : "rows") for the row count, rather than always ("row(s)")
- again only a few pixels but '2/240 selected" instead of "2 of 240 selected"
- can we collapse 'clear' into the [...] button; or replace it with an icon button (would have to be obvious it is 'clear' and not 'delete'
- I note MUI hides the rows-per-page control at smaller screen widths
- We could still indicate the total number of pages without having "1 / 10" if we used page numbers on the buttons. E.g.
- 1 [2] [3] [4] [10] // page 1
- [1] 2 [3] [4] [10] // page 2
- [1] [3] 4 [5] [10] // page 4
- [1] [7] [8] 9 [10] // page 10
- (However it seems like this is no longer preferred UX based on other libraries)
- Or at least remove spaces between "1 / 10" => "1/10"
- Reduce button size of the << < > >> buttons to 24px — a more compact look may help
added 2 commits
November 18, 2026 09:33
# Conflicts: # docs-manifest.json
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> # Conflicts: # docs-manifest.json
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.
Summary
Fixes tailor-inc/platform-planning#2209. Part of the mobile umbrella tailor-inc/platform-planning#2207.
At phone widths, the DataTable footer pushed the page buttons outside the table frame, and the frame cut them off. With rows selected, the bulk-action bar wrapped onto three lines, and only about one table row stayed visible.
Changes
DataTable.Pagination: the row count, the page-size switcher, and the page controls now wrap as separate units. The page text and the four buttons stay together on one line.DataTable.Footeris now a named container (@container/data-table-footer). When it is narrower than 480 px, "Rows per page" is hidden, and "Page 1 / 10" is shown as "1 / 10". Screen readers still get both texts. The full "Page 1 / 10" stays one text node, so existing text queries still work.ResizeObserver. A CSS-only version would leave hidden buttons in the toolbar's arrow-key order.aria-labelledby), so the select keeps an accessible name when the label is hidden.Nothing changes when the footer is 480 px or wider.
How to reproduce
/showcase/data-table-selection.Results
Measured with Playwright (Chrome, touch, device scale 2) on
/showcase/data-table-selection.Without a selection, the footer is 20 px taller at 375 px. This is because the page buttons now have their own line and are no longer cut off.
The SidebarLayout numbers come from a local switch in the example. It is not part of this PR.
Screenshots
375 px,
GlobalHeaderLayout, no selection:375 px,
GlobalHeaderLayout, 2 rows selected:375 px,
SidebarLayout, 2 rows selected:768 px, 2 rows selected (no change expected):
Checks
pnpm type-check,lint,test,check-dts,docs:check,fmt:check, andbuildpass.Review notes (not changed in this PR)
Toolbar.Rowarrow-key focus does not skip items hidden with CSS. Fixing that inToolbarwould allow a CSS-only version. That is a separate change.NARROW_FOOTER_WIDTHand in the Tailwind class strings, which must be literal. Comments link them.@containeron the footer means its content no longer widens the table in a shrink-to-fit parent (for example,w-fit). The pagination wraps instead.🤖 Generated with Claude Code