Skip to content

fix(Pagination): the ellipsis grows with a larger text size - #10567

Merged
cixzhang merged 10 commits into
mainfrom
lane4/pagination-buttons-grow
Nov 8, 2026
Merged

cixzhang merged 10 commits into
mainfrom
lane4/pagination-buttons-grow

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

People who use large text see Pagination's "…" stay as tall as the page numbers beside it. #10588 made every labelled Button grow 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) takes minHeight instead of height. Pagination adds no page-button override; Button grows them.
  • component:Pagination FR3: the delegated Buttons carry only component:Button's press-scale gap. Page number buttons grow with their label as component:Button FR4 says, and the Ellipsis takes its size as a minimum height (spec:AST-102 FR4). 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.
  • Changeset: core patch, [fix].

Writing rubric results

  • R1 narration: none; FR3 is present tense.
  • R2 research in the record: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: none.
  • R5 pull request or issue references: none in the record.

… 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%.
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 8, 2026 2:25pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 7, 2026
@astracat-bot

astracat-bot Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 8, 2026, 2:38 PM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 7, 2026
@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 7c68eff

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 5b97abb

Storybook · Sandbox · built from this PR's head

Modified components

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
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 2026
@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 3501318

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 2026

@astracat-bot astracat-bot Bot left a comment •

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.

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 the spec:AST-102 FR4 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: main never wraps the row, so no release had a wrapped page number covering the Previous arrow; describe the fix against main, 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:46 says "Builder impact: None.", but callers who put Pagination beside other content in a flex row now choose flexShrink: 0 through xstyle to 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]

Comment thread .changeset/pagination-buttons-grow.md Resolved
…tion-buttons-grow

# Conflicts:
#	docs/specs/components/Pagination/Pagination.spec.md
#	packages/core/src/Pagination/__tests__/PaginationTextSize.interaction.browser.spec.ts
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 2026
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 7, 2026
@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 9244d22

@astracat-bot astracat-bot Bot left a comment

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.

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 the spec:AST-102 FR4 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]

…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.
@cixzhang cixzhang changed the title fix(Pagination): page buttons grow with a larger text size fix(Pagination): the ellipsis grows with a larger text size Nov 8, 2026
@cixzhang

cixzhang commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 05e51e4

@astracat-bot astracat-bot Bot left a comment

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.

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, against spec:AST-102 FR4.
  • 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, but component:Button already stops that scale under reduced motion and records no such gap, so drop the press-scale sentence and clause.
  • .changeset/pagination-ellipsis-grows.md:5 says 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 at sm), 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]

Comment thread .changeset/pagination-ellipsis-grows.md Resolved
@cixzhang
cixzhang marked this pull request as ready for review November 8, 2026 13:57
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%.
@cixzhang
cixzhang marked this pull request as draft November 8, 2026 14:18
@cixzhang

cixzhang commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 5b97abb

@astracat-bot astracat-bot Bot left a comment

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.

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.md still lists design:reduced-motion DR1, which no claim cites now.
  • The header of PaginationTextSize.interaction.browser.spec.ts still names only 165% and 194% and FR15.

[Automated review]

@cixzhang
cixzhang marked this pull request as ready for review November 8, 2026 14:52
@cixzhang
cixzhang merged commit a1b0cd9 into main Nov 8, 2026
128 checks passed
@github-actions
github-actions Bot deleted the lane4/pagination-buttons-grow branch November 9, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 5b97abb0 Deployed Nov 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant