Skip to content

feat(Pagination): add pageNumberMode prop - #1315

Merged
EvandroLG merged 6 commits into
mainfrom
feat/pagination-read-only-page-number
Nov 18, 2026
Merged

EvandroLG merged 6 commits into
mainfrom
feat/pagination-read-only-page-number

Conversation

@EvandroLG

@EvandroLG EvandroLG commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • Add a pageNumberMode prop to Pagination, 'input' by default. With 'text', the page number shows as text ("3 of 10") instead of an input, so the page changes only through the previous and next buttons.
  • Off by default, so existing consumers are unchanged.

Checklist

  • Breaking changes? (add migration notes in changesets)
  • Visual changes? (specify in changesets)
  • Design review needed?

Contribution

  • Sufficient research before PR
  • Self-reviewed the PR
  • Manually tested the changes (when applies - visual confirmation in Storybook)
  • build and build-storybook work locally
  • Tests and Stories are aligned with the changes

Accessibility

  • Keyboard - every action works with Tab / Enter / Space / Esc; focus is visible and returns to the trigger on close
  • Names — every control has a name that includes its visible label; icon-only controls take aria-label
  • Vision — colors come from tokens, focus ring shows, targets are at least 24×24 px

Covered by unit tests: by default the page number is an input, with the prop it's plain text and there's no input, and the previous and next buttons still change the page. With the prop there's one less Tab stop, and screen readers read the page number as text. The text uses the existing Text component and its tokens. Not done yet: a manual keyboard pass and the Storybook axe panel.

Screenshots

New visual baselines for the TextPageNumber story (light and dark) are in tests/display/pagination.spec.ts-snapshots/. The existing Pagination snapshots are unchanged.

🤖 Generated with Claude Code


Note

Low Risk
Backward-compatible optional UI prop with default unchanged; limited to Pagination presentation and a11y behavior for consumers who opt into 'text'.

Overview
Adds optional pageNumberMode ('input' | 'text', default 'input') to Pagination, exported as PaginationPageNumberMode. With 'text', the editable NumberField is replaced by formatted page text plus the existing “of N” label; a visually hidden “Page” prefix keeps screen readers announcing e.g. “Page 3”. Page changes in that mode happen only via prev/next; onPageNumberFocus / onPageNumberBlur are not used.

Ships a TextPageNumber Storybook story, unit tests (default input, text mode, sr-only label, button navigation), a minor changeset for @clickhouse/click-ui, and a new visual-regression variant for text-page-number.

Reviewed by Cursor Bugbot for commit c28176a. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EvandroLG EvandroLG self-assigned this Nov 17, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c28176a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@EvandroLG
EvandroLG marked this pull request as ready for review November 17, 2026 09:38
@EvandroLG
EvandroLG requested a review from XOP November 17, 2026 09:49

@XOP XOP 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.

please check the notes

@EvandroLG EvandroLG changed the title feat(Pagination): add readOnlyPageNumber prop feat(Pagination): add pageNumberMode prop Nov 17, 2026
EvandroLG and others added 4 commits November 17, 2026 11:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… called in text mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@XOP
XOP self-requested a review November 18, 2026 09:31

@XOP XOP 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.

Thank you for updates 👍

@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Storybook Preview Deployed

✅ Preview URL: https://click-3x5q8agls-clickhouse.vercel.app

Built from commit: c98fdc6b429a37a3cb3252addae2237d578c93b2

@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Chromatic Storybook

Check Status Link
Storybook ✅ 671 stories published Open Storybook
UI Tests ✅ 671 tests unchanged Open build

Built from commit: c28176a7a743976080592fe473225eb746affed2 · Chromatic run

Statuses as of the end of the run. The build link shows the live review state.

@EvandroLG
EvandroLG merged commit 2d1d105 into main Nov 18, 2026
11 checks passed
@EvandroLG
EvandroLG deleted the feat/pagination-read-only-page-number branch November 18, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants