Repository navigation
fix(ui): release 5.4.2 with Pagination that fits a phone - #225
Merged
Merged
Conversation
Below 32rem, Pagination keeps one line: the items-per-page select, a short count and previous, current page and next. The row wraps when even that doesn't fit, so it never runs off the screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The full row needs 543–639px with a three- or four-digit count, so at 32rem it wrapped to two lines between 512px and about 640px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Changelog and docs note that Pagination now fills its container's width - Wrapped page buttons stay on the right - Screen readers hear the narrow count as "41 to 50 of 95" - A currentPage past the last page shows as the last page - Doc comments on every prop, and "dropdown" in the changelog as in the docs - Tests share their props and scope their queries; the doubled selector carries a warning comment - The docs demo drops its now-redundant w-full Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dropdown The narrow row reads "41–50 of 95 [10 ▾] per page", so the page size no longer reads as part of the count. "per page" shows only where it fits beside the count: from a 21rem row under 100 items, 23rem under 1,000, never beyond. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The info read "Showing 51 to [25] of 146", with the page size where the range's end belongs. It now reads "51–75 of 146 agents [25 ▾] per page" at every width, with the count first in the markup so screen readers hear it in the order it's shown. Docs say to clamp page state alongside the component. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…low 1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Need
Guardian's list pages run off the screen on phones once a list has a second page. The Policy Library is 58px wider than a 320px screen with two pages, and with ten pages even a 430px phone scrolls sideways. Every Guardian list paginates through this component.
Its info line also reads wrong past page 1: "Showing 51 to [25] of 146 agents" puts the page size where the range's end belongs.
Problem
Paginationlays out its info line and page buttons in one row that never wraps, and the info line can't break. The info line alone is about 230px, and each page adds a button of about 29px. The page-size dropdown sits inside the sentence, in the spot of the last item's number.Change
51–75 of 146 agents [25 ▾] per page. Material UI, Ant Design and Gmail all keep the range as text and the page size as a separate control. The row is about as wide as before, as dropping "Showing … to" makes room for the label.Paginationis a full-width@container, so it measures the space it actually has, in a pane as on a page. A parent that sizes to its content (w-fit,inline-flex, a right-aligned flex row) now needs to give it a width; the changelog lists this under Changed.onPageChangeitself..wide-onlyis doubled to outrankButton's owndisplay, as.items-per-page-triggeralready is, so the result doesn't depend on CSS load order.currentPagerow) and 5.4.2.Screenshots
Guardian's Policy Library in dark mode, 95 policies on page 5, before | after.
320px

390px

1440px

Evidence
mainthe same page overflows by up to 232px.showInfo={false}, a page above and below the range, and the compiled CSS (the container, the wrap and its right-aligned buttons, the 42rem rules, the label tiers and their order, and the doubled class).Not covered
typenoun ("of 146"); screen readers still hear it. It wouldn't fit beside "per page", and two paginations on one page are rare.🤖 Generated with Claude Code