Skip to content

feat(Pagination): three size#56009

Merged
zombieJ merged 22 commits intoant-design:featurefrom
guoyunhe:pagination-size
Jan 4, 2026
Merged

feat(Pagination): three size#56009
zombieJ merged 22 commits intoant-design:featurefrom
guoyunhe:pagination-size

Conversation

@guoyunhe
Copy link
Contributor

@guoyunhe guoyunhe commented Dec 1, 2025

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

Pagination 实际上和 Button/Input/Select 等输入控件更接近,于是此变更也让它拥有了大中小三种尺寸。

📝 Change Log

Language Changelog
🇺🇸 English feat(Pagination): three size
🇨🇳 Chinese feat(Pagination): 三种大小

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Preview is ready

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

👁 Visual Regression Report for PR #56009 Failed ❌

🎯 Target branch: feature (3d152a7)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 40 changed

Expected (Branch feature) Actual (Current PR) Diff
config-provider-size.compact.png config-provider-size.compact.png config-provider-size.compact.png config-provider-size.compact.png
config-provider-size.dark.png config-provider-size.dark.png config-provider-size.dark.png config-provider-size.dark.png
config-provider-size.default.png config-provider-size.default.png config-provider-size.default.png config-provider-size.default.png
list-vertical.dark.png list-vertical.dark.png list-vertical.dark.png list-vertical.dark.png
pagination-component-token.compact.png pagination-component-token.compact.png pagination-component-token.compact.png pagination-component-token.compact.png
pagination-component-token.dark.png pagination-component-token.dark.png pagination-component-token.dark.png pagination-component-token.dark.png
pagination-component-token.default.png pagination-component-token.default.png pagination-component-token.default.png pagination-component-token.default.png
pagination-mini.compact.png pagination-mini.compact.png pagination-mini.compact.png pagination-mini.compact.png

Warning

There are more diffs not shown in the table. Please check the Full Report for details.


Important

There are 40 diffs found in this PR: 🔄 40 changed.
Please check all items:

  • Checked all diffs in the full report
  • Visual diff is acceptable

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @guoyunhe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the Pagination component by adding a large size option. This change aims to standardize the sizing behavior of Pagination with other interactive UI elements like Button, Input, and Select, providing greater flexibility for developers to integrate the component seamlessly into various design contexts. The update involves modifying the component's type definitions and class application logic to support the new size, while also deprecating an older size-related class.

Highlights

  • Pagination Size Enhancement: The Pagination component now supports a large size option, expanding its sizing capabilities beyond default and small.
  • Type Definition Update: The size prop in PaginationProps has been updated to include 'large' as a valid type.
  • Dynamic Class Application: A new class, ${prefixCls}-${mergedSize}, is dynamically applied to the Pagination component, ensuring proper styling based on the selected size.
  • Deprecation Notice: The prefixCls-mini class has been marked as deprecated, indicating it will be removed in a future major version (v7).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

这个 PR 旨在为 Pagination 组件添加大、中、小三种尺寸,使其与其他输入组件保持一致。目前已经更新了 PaginationPropssize 类型定义,并添加了根据 size 生成相应 CSS class 的逻辑。这是一个很好的改进。不过,我发现 mergedSize 的计算逻辑存在一些问题,可能会导致 bug,具体请看我的评论。另外,作为 WIP 的 PR,目前只添加了 class name,相关的 CSS 样式还未实现,期待后续的更新。

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 1, 2025

@codecov
Copy link

codecov bot commented Dec 1, 2025

Bundle Report

Changes will decrease total bundle size by 72 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.86MB -72 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js -36 bytes 2.12MB -0.0%
antd.min.js -36 bytes 1.74MB -0.0%

Files in antd-with-locales.min.js:

  • ./components/pagination/style/index.ts → Total Size: 16.66kB

  • ./components/input/style/index.ts → Total Size: 17.28kB

Files in antd.min.js:

  • ./components/pagination/style/index.ts → Total Size: 16.66kB

  • ./components/input/style/index.ts → Total Size: 17.28kB

@guoyunhe guoyunhe changed the title WIP: feat(Pagination): three size feat(Pagination): three size Dec 2, 2025
@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3d152a7) to head (27300e0).
⚠️ Report is 33 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #56009   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          805       805           
  Lines        14848     14854    +6     
  Branches      3927      3926    -1     
=========================================
+ Hits         14848     14854    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guoyunhe guoyunhe requested a review from zombieJ December 19, 2025 09:29
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 4, 2026
@zombieJ zombieJ merged commit 9123bbb into ant-design:feature Jan 4, 2026
37 checks passed
@zombieJ zombieJ mentioned this pull request Jan 13, 2026
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants