Skip to content

[material-ui][Pagination] Hide ellipses with zero boundary and sibling counts - #49090

Open
lprnmns wants to merge 3 commits into
mui:masterfrom
lprnmns:codex/fix-pagination-zero-boundaries
Open

[material-ui][Pagination] Hide ellipses with zero boundary and sibling counts#49090
lprnmns wants to merge 3 commits into
mui:masterfrom
lprnmns:codex/fix-pagination-zero-boundaries

Conversation

@lprnmns

@lprnmns lprnmns commented Sep 4, 2026

Copy link
Copy Markdown

Closes #24749

When both boundaryCount and siblingCount are zero, the pagination body currently contains the current page plus start and end ellipses. Those ellipses do not expose any page and make the opt-in compact configuration wider than necessary.

This uses the compact behavior proposed in the issue when both counts are zero and the normal output would contain an ellipsis. Empty or invalid ranges and small page counts that already fit continue through the existing item generation, preserving valid and reachable page items.

Tests:

  • pnpm test:unit packages/mui-material/src/usePagination/usePagination.test.js packages/mui-material/src/Pagination/Pagination.test.js --run (94 passed, 6 skipped across Node and Chromium)
  • pnpm exec eslint packages/mui-material/src/usePagination/usePagination.js packages/mui-material/src/usePagination/usePagination.test.js
  • pnpm exec prettier --check packages/mui-material/src/usePagination/usePagination.js packages/mui-material/src/usePagination/usePagination.test.js
  • pnpm -F @mui/material typescript
  • pnpm release:build
  • Full @mui/material unit run after the upstream tests merged: 8,720 passed and 838 skipped. Two unrelated Select timing tests failed, and four browser files hit runner import timeouts; focused reruns passed 6/6 and 204/204 respectively.

@code-infra-dashboard

code-infra-dashboard Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-49090--material-ui.netlify.app/
QR code for https://deploy-preview-49090--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 🔺+52B(+0.01%) 🔺+26B(+0.02%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@Janpot Janpot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get #49118 merged first.

The newly added tests fail under this PR.

@lprnmns

lprnmns commented Sep 9, 2026

Copy link
Copy Markdown
Author

Addressed the new #49118 coverage. The compact path now applies only when the current page is valid and the normal zero-boundary/zero-sibling output would contain an ellipsis. Empty/invalid ranges and small counts continue through the established range generation, so the new validity and reachability checks pass. I intentionally updated the count=4 expectation to the compact previous/current/next output. Local validation: focused Pagination suites 94 passed/6 skipped across Node and Chromium; ESLint, Prettier, package TypeScript, and the 18-project release build pass. The full Material UI run reached 8,720 passes; its two Select timing failures and browser import timeouts all passed on focused reruns (6/6 and 204/204).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: pagination Changes related to the pagination.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Pagination] unexpected behavior when setting boundaryCount and siblingCount

3 participants