Skip to content

[pagination] Use compact layout when counts are zero - #48954

Open
Boulea7 wants to merge 3 commits into
mui:masterfrom
Boulea7:boulea7/mui-24749-pagination
Open

[pagination] Use compact layout when counts are zero#48954
Boulea7 wants to merge 3 commits into
mui:masterfrom
Boulea7:boulea7/mui-24749-pagination

Conversation

@Boulea7

@Boulea7 Boulea7 commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • render only the current page between navigation buttons when both boundaryCount and siblingCount are zero
  • preserve the existing range for zero-count and out-of-range pages, including when an uncontrolled count decreases
  • cover first, middle, last, zero-count, stale uncontrolled, and out-of-range controlled pages with regression tests

Fixes #24749

Test plan

  • pnpm test:unit usePagination (40 passed)
  • pnpm test:unit Pagination (320 passed, 21 skipped)
  • pnpm -F @mui/material typescript
  • targeted ESLint and Prettier checks for both changed files
  • git diff --check origin/master...HEAD

Additional validation

  • The full Node package run completed 4,687 tests with 740 skipped; one unrelated Select pointer-timing assertion failed and then passed on a focused rerun.
  • The full browser package run encountered unrelated dynamic-import and iframe connection failures; all affected files passed a focused rerun (279 passed, 43 skipped).
  • The package build transpiled all 656 ESM and 656 CommonJS files. Declaration emission requires prebuilt workspace dependencies in this checkout; the package-level TypeScript check passed.

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy preview

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

Bundle size

Bundle Parsed size Gzip size
@mui/material 🔺+85B(+0.02%) 🔺+48B(+0.03%)
@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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ef83118d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/mui-material/src/usePagination/usePagination.js
@Boulea7

Boulea7 commented Aug 12, 2026

Copy link
Copy Markdown
Author

Update: subsequent CircleCI browser runs, including the latest run for cf66cfed, passed. No rerun is needed. The original failure was limited to the unrelated Tooltip timing assertion; the changed usePagination tests passed in every run.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8cec9209b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/mui-material/src/usePagination/usePagination.js
Change-Id: I899a187b211702ec415758944ff1ed0404944470
Change-Id: I70f691e4bde221894729693c969445e3d9690a9a
Change-Id: I5a8878cfe3d843f444ad7d2b2c754b31e5badd78
@Boulea7
Boulea7 force-pushed the boulea7/mui-24749-pagination branch from 8cec920 to cf66cfe Compare August 12, 2026 10:37
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.

[Pagination] unexpected behavior when setting boundaryCount and siblingCount

1 participant