Repository navigation
fix(Pagination): the ellipsis grows with a larger text size - #10567
Conversation
… text At a larger text size on a narrow screen, Pagination's row kept one line and scrolled the page sideways, pushing Next off-screen. The landmark row and the controls row now wrap in reading order, so Previous stays first, Next stays last, and every control stays on screen. Pagination FR15 says so, and a browser spec checks a 402 px viewport at 100%, 165% and 194%.
Page buttons and the ellipsis took a fixed height, so at the largest text sizes a page number on a wrapped line spilled over the Previous arrow above it and swallowed its taps. They now take their size as a minimum height. FR3 says so, and the browser spec checks that no button covers another at 312%.
With Button's block padding a page button grew to 36 px at the default text size. Without it the label's line box decides the height above the minimum, so the default size is unchanged. The browser spec now checks that every page number stays inside its button at 312%.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 7c68eff |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Pagination · Storybook | 108.3 kB (−7 B) · 17.5 kB CSS (0) | 661 (0) | ✓ · ✓ · ✓ |
Package size: @astryxdesign/core 6.99 MB packed (+2 B); no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 29 rows, core 35 rows, theme-butter 1 row, theme-y2k 1 row; run pnpm api:report.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
… flex-row shrink The spec sets the default font size through a Chromium DevTools command, so it skips other browsers. FR15 and the changeset now say that beside other content in a flex row Pagination can shrink to its widest control and wrap at the default text size too. Two style comments say why.
…ns-grow # Conflicts: # docs/specs/components/Pagination/Pagination.spec.md
|
/approve-spec 3501318 |
There was a problem hiding this comment.
Requesting changes for three one-line text fixes; the wrap and the minimum-height fix work as described, and nothing changes at the default text size.
docs/specs/components/Pagination/Pagination.spec.md:283-285: the Current-state impact still says the page Buttons "hold a fixed height", which contradicts the rewritten FR3, so scope that clause to Previous, Next, First and Last and keep thespec:AST-102FR4 reference, because those buttons still hold a fixed height while their chevrons grow (this replaces the earlier suggestion to drop the clause)..changeset/pagination-buttons-grow.md:5:mainnever wraps the row, so no release had a wrapped page number covering the Previous arrow; describe the fix againstmain, for example "so at the largest text sizes a page number no longer spills out of its button."- Miss:
docs/specs/components/Pagination/Pagination.spec.md:46says "Builder impact: None.", but callers who put Pagination beside other content in a flex row now chooseflexShrink: 0throughxstyleto keep one line, so name that choice in the row.
Non-blocking: the comment at Pagination.tsx:185 would read better with its 27-word first sentence split, and the browser spec's file header still lists only 165% and 194%. After the next push, an engineering owner posts /approve-spec <full head SHA> again, and CI runs once the draft is marked ready for review.
[Automated review]
…tion-buttons-grow # Conflicts: # docs/specs/components/Pagination/Pagination.spec.md # packages/core/src/Pagination/__tests__/PaginationTextSize.interaction.browser.spec.ts
|
/approve-spec 9244d22 |
There was a problem hiding this comment.
Requesting changes for one record fix; the minimum-height change works as described: every page number now stays inside its button from 165% to 312% text size, and the default text size renders exactly as before.
docs/specs/components/Pagination/Pagination.spec.md:283-285: the Current-state impact still says the page Buttons "hold a fixed height", which contradicts the rewritten FR3, so scope that clause to Previous, Next, First and Last and keep thespec:AST-102FR4 reference, because those buttons still hold a fixed height (this replaces the older inline suggestion to drop the clause).
With the wrap now on main, the changeset's covered-Previous wording describes main correctly, and the "Builder impact" row is no longer this pull request's to fix. Non-blocking: the comment at Pagination.tsx:185-187 would read better with its 27-word first sentence split, and the browser spec's file header still lists only 165% and 194%. After the next push, an engineering owner posts /approve-spec <full head SHA> again, and CI runs once the draft is marked ready for review.
[Automated review]
…tion-buttons-grow
…needs a minimum Button now grows a labelled button with its label, page numbers included, so Pagination's own page-button override is removed. The ellipsis takes its size as a minimum height, so it stays as tall as the page buttons beside it. FR3 says the page buttons grow through Button and no longer lists a fixed height.
|
/approve-spec 05e51e4 |
There was a problem hiding this comment.
Requesting changes for three text fixes; the ellipsis change itself works: at 312% text the "…" now grows from a 32 px box to 65.6 px around its glyph, and the default text size renders exactly as before.
docs/specs/components/Pagination/Pagination.spec.md:283-285: the Current-state impact still says the page Buttons "hold a fixed height", which contradicts the rewritten FR3, so scope it to Previous, Next, First and Last, which stay 32 px while their chevrons grow, againstspec:AST-102FR4.- Miss: FR3 at
Pagination.spec.md:114(and the same Current-state bullet) says the delegated Buttons still scale on a press under reduced motion, butcomponent:Buttonalready stops that scale under reduced motion and records no such gap, so drop the press-scale sentence and clause. .changeset/pagination-ellipsis-grows.md:5says the ellipsis "stays the height of the page buttons beside it", but above the default size it does not (65.6 px beside 62.5 px page buttons at 312%, 56.3 px atsm), so say instead that the "…" stays inside its own box.
Non-blocking: the new 312% case also passes on main, so a check that the ellipsis box holds its glyph would guard this change. After the next push, an engineering owner posts /approve-spec <full head SHA> again, and CI runs once the draft is marked ready for review.
[Automated review]
Button already stops its press scale under reduced motion, so FR3 drops that clause. The current-state entry now names only what stays true: Previous, Next, First and Last keep a fixed square while their chevrons grow. The changeset says the ellipsis stays inside its own box, and the browser spec checks that box at 312%.
|
/approve-spec 5b97abb |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is still a draft; marking it ready for review starts the run.
The ellipsis now takes its element size as a minimum height, so at 312% text its box holds the "…" (65.6 px, where main keeps 32 px with the glyph spilling 14.8 px above it), and nothing changes at the default text size. The new 312% ellipsis case fails on main and passes here, and FR3, the Current-state entry and the changeset now match what ships.
Non-blocking:
- The description still says FR3 keeps a press-scale gap, that the record no longer lists a fixed button height, and that the "…" is as tall as the page numbers; it is worth refreshing.
- The "Governing rules" row of
Pagination.spec.mdstill listsdesign:reduced-motionDR1, which no claim cites now. - The header of
PaginationTextSize.interaction.browser.spec.tsstill names only 165% and 194% and FR15.
[Automated review]
Summary
People who use large text see Pagination's "…" stay as tall as the page numbers beside it. #10588 made every labelled
Buttongrow with its label, so Pagination's page buttons already grow. The ellipsis, which isn't a Button, still held a fixed height. It now takes its size as a minimum height. Pagination's record no longer lists a fixed button height as a gap. At the default text size nothing changes.What changes
Pagination.tsx: the ellipsis (ellipsis,ellipsisSm) takesminHeightinstead ofheight. Pagination adds no page-button override;Buttongrows them.component:PaginationFR3: the delegated Buttons carry onlycomponent:Button's press-scale gap. Page number buttons grow with their label ascomponent:ButtonFR4 says, and the Ellipsis takes its size as a minimum height (spec:AST-102FR4). The FR3/FR15 verification row covers 312%.PaginationTextSize.interaction.browser.spec.ts: at 312% default font size, every page number stays inside its button. Chromium only.[fix].Writing rubric results