Skip to content

feat(Pagination): support classNames and styles for component and ConfigProvider#52893

Merged
zombieJ merged 4 commits intonextfrom
cp-pagination
Feb 20, 2025
Merged

feat(Pagination): support classNames and styles for component and ConfigProvider#52893
zombieJ merged 4 commits intonextfrom
cp-pagination

Conversation

@thinkasany
Copy link
Member

@thinkasany thinkasany commented Feb 19, 2025

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature

📝 Change Log

Language Changelog
🇺🇸 English feat: ConfigProvider support classnames and styles for pagination
🇨🇳 Chinese feat: ConfigProvider support classnames and styles for pagination

@bolt-new-by-stackblitz
Copy link

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2025

👁 Visual Regression Report for PR #52893 Failed ❌

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

Expected (Branch next) Actual (Current PR) Diff
input-number-debug-token.compact.png input-number-debug-token.compact.png input-number-debug-token.compact.css-var.png input-number-debug-token.compact.css-var.png
input-number-debug-token.dark.png input-number-debug-token.dark.png input-number-debug-token.dark.css-var.png input-number-debug-token.dark.css-var.png
input-number-debug-token.default.png input-number-debug-token.default.png input-number-debug-token.default.css-var.png input-number-debug-token.default.css-var.png

Important

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

  • Visual diff is acceptable

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2025

Preview is ready

@petercat-assistant
Copy link

Walkthrough

This pull request introduces a new feature to the ConfigProvider component, allowing it to support class names and styles for the Pagination component. This enhancement provides more flexibility in customizing the appearance of pagination elements.

Changes

Files Changed Summary
components/config-provider/context.ts Updated PaginationConfig to include classNames and styles.
components/config-provider/index.en-US.md, components/config-provider/index.zh-CN.md Updated documentation to reflect new classNames and styles support for Pagination.
components/pagination/Pagination.tsx Added classNames and styles properties to PaginationProps and integrated them into the component logic.
components/pagination/tests/index.test.tsx Added tests to verify the new classNames and styles functionality.
components/pagination/demo/_semantic.tsx Added a new demo file to showcase the semantic DOM usage.
components/pagination/index.en-US.md, components/pagination/index.zh-CN.md Added a section for Semantic DOM in the documentation.
package.json Updated the version of @rc-component/pagination.

@thinkasany thinkasany mentioned this pull request Feb 19, 2025
@socket-security
Copy link

socket-security bot commented Feb 19, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@ant-design/colors@7.2.0 None 0 32.7 kB afc163
npm/@ant-design/compatible@5.1.4 environment 0 390 kB afc163
npm/@ant-design/cssinjs-utils@1.1.3 environment 0 92 kB yumoimer
npm/@ant-design/cssinjs@1.23.0 environment 0 290 kB zombiej
npm/@ant-design/fast-color@2.0.6 None 0 43.9 kB zombiej
npm/@ant-design/happy-work-theme@1.0.0 None 0 30.9 kB zombiej
npm/@ant-design/icons@5.6.1 environment 0 8.77 MB zombiej
npm/@ant-design/react-slick@1.1.2 environment 0 832 kB afc163
npm/@ant-design/tools@18.0.3 filesystem 0 66.5 kB zombiej
npm/@ant-design/v5-patch-for-react-19@1.0.3 None 0 9.33 kB zombiej
npm/@antfu/eslint-config@4.3.0 None 0 837 kB antfu
npm/@antv/g6@4.8.24 None 0 7.99 MB iaaron
npm/@babel/runtime@7.26.9 None 0 248 kB existentialism, hzoo, jlhwung, ...1 more
npm/@biomejs/biome@1.9.4 shell 0 210 kB dominionl
npm/@codecov/webpack-plugin@1.9.0 None 0 81.4 kB codecov-devops
npm/@codesandbox/sandpack-react@2.20.0 None 0 1.21 MB danilowoz
npm/@dnd-kit/core@6.3.1 environment 0 1.07 MB clauderic
npm/@dnd-kit/modifiers@9.0.0 environment 0 49 kB clauderic
npm/@dnd-kit/sortable@10.0.0 environment 0 234 kB clauderic
npm/@dnd-kit/utilities@3.2.2 environment 0 88.5 kB clauderic
npm/@emotion/css@11.13.5 None 0 273 kB emotion-release-bot
npm/@emotion/react@11.14.0 None 0 817 kB emotion-release-bot
npm/@emotion/server@11.11.0 environment 0 48.7 kB emotion-release-bot
npm/@eslint-react/eslint-plugin@1.26.2 None 0 306 kB rel1cx
npm/@ianvs/prettier-plugin-sort-imports@4.4.1 environment, unsafe 0 115 kB ianvs
npm/@inquirer/prompts@7.3.2 None 0 23.3 kB sboudrias
npm/@madccc/duplicate-package-checker-webpack-plugin@1.0.0 None 0 19 kB madccc
npm/@microflash/rehype-figure@2.1.3 None 0 6.71 kB naiyer
npm/@npmcli/run-script@9.0.2 environment 0 18.3 kB npm-cli-ops
npm/@octokit/rest@21.1.1 None 0 8.28 kB gr2m, kfcampbell, nickfloyd, ...1 more
npm/@qixian.cs/github-contributors-list@2.0.2 network 0 19.6 kB chenshuai2144
npm/@rc-component/collapse@1.0.1 None 0 44.8 kB zombiej
npm/@rc-component/color-picker@2.0.1 environment 0 83.1 kB afc163
npm/@rc-component/dialog@1.1.0 environment 0 16.5 MB zombiej
npm/@rc-component/form@1.0.0 environment 0 250 kB zombiej
npm/@rc-component/input-number@1.0.0 environment 0 74.4 kB zombiej
npm/@rc-component/input@1.0.0 None 0 61.9 kB zombiej
npm/@rc-component/mentions@1.0.0 environment 0 68.5 kB zombiej
npm/@rc-component/motion@1.1.4 None 0 88.8 kB zombiej
npm/@rc-component/mutate-observer@2.0.0 environment 0 13.1 kB zombiej
npm/@rc-component/pagination@1.1.1 environment 0 159 kB zombiej
npm/@rc-component/qrcode@1.0.0 None 0 146 kB zombiej
npm/@rc-component/resize-observer@1.0.0 environment 0 33.4 kB zombiej
npm/@rc-component/segmented@1.1.0 environment 0 41.3 kB zombiej
npm/@rc-component/switch@1.0.0 None 0 20 kB zombiej
npm/@rc-component/table@1.1.1 environment 0 356 kB zombiej
npm/@rc-component/tabs@1.1.0 environment 0 149 kB zombiej
npm/@rc-component/textarea@1.0.0 environment 0 52.8 kB zombiej
npm/@rc-component/tooltip@1.0.0 None 0 50.7 kB zombiej
npm/@rc-component/tour@1.15.1 None 0 68.3 kB afc163
npm/@rc-component/trigger@2.2.6 environment 0 184 kB zombiej
npm/@rc-component/util@1.2.1 environment 0 178 kB zombiej
npm/@size-limit/file@11.2.0 None 0 3.43 kB ai
npm/@stackblitz/sdk@1.11.0 None 0 186 kB tsulkowski
npm/@testing-library/dom@10.4.0 environment 0 2.43 MB testing-library-bot
npm/@testing-library/jest-dom@6.6.3 None 0 282 kB testing-library-bot
npm/@testing-library/react@16.2.0 None 0 337 kB brrianalexis, cmckinstry, dfcook, ...13 more
npm/@testing-library/user-event@14.6.1 None 0 438 kB brrianalexis, cmckinstry, dfcook, ...13 more
npm/@types/adm-zip@0.5.7 None 0 24.6 kB types
npm/@types/ali-oss@6.16.11 None 0 42.2 kB types
npm/@types/cli-progress@3.11.6 None 0 13.1 kB types
npm/@types/fs-extra@11.0.4 None 0 36.8 kB types
npm/@types/gtag.js@0.0.20 None 0 9.1 kB types
npm/@types/http-server@0.12.4 None 0 4.58 kB types
npm/@types/isomorphic-fetch@0.0.39 None 0 2.77 kB types
npm/@types/jest-axe@3.5.9 None 0 6.62 kB types
npm/@types/jest-environment-puppeteer@5.0.6 None 0 6.09 kB types
npm/@types/jest-image-snapshot@6.4.0 None 0 9.68 kB types
npm/@types/jest@29.5.14 None 0 78.8 kB types
npm/@types/jquery@3.5.32 None 0 1.12 MB types
npm/@types/jsdom@21.1.7 None 0 21.9 kB types
npm/@types/minimist@1.2.5 None 0 6.27 kB types
npm/@types/node@22.13.4 None 0 2.31 MB types
npm/@types/nprogress@0.2.3 None 0 4.83 kB types
npm/@types/pixelmatch@5.2.6 None 0 7.87 kB types
npm/@types/pngjs@6.0.5 None 0 5.47 kB types
npm/@types/prismjs@1.26.5 None 0 19.4 kB types
npm/@types/progress@2.0.7 None 0 6.51 kB types
npm/@types/react-copy-to-clipboard@5.0.7 None 0 4.36 kB types
npm/@types/react-dom@19.0.4 None 0 20.8 kB types
npm/@types/react-highlight-words@0.20.0 None 0 5.75 kB types
npm/@types/react-resizable@3.0.8 None 0 7.36 kB types
npm/@types/react@19.0.10 None 0 801 kB types
npm/@types/spinnies@0.5.3 None 0 8.22 kB types
npm/@types/tar@6.1.13 None 0 30.8 kB types
npm/@types/throttle-debounce@5.0.2 None 0 6.48 kB types
npm/@types/warning@3.0.3 None 0 2.71 kB types
npm/adm-zip@0.5.16 filesystem 0 121 kB cthackers
npm/ali-oss@6.22.0 filesystem 0 2.74 MB fengmk2
npm/antd-img-crop@4.24.0 None 0 47.9 kB nanxiaobei
npm/antd-style@3.7.1 environment 0 191 kB arvinxx
npm/antd-token-previewer@2.0.8 None 0 1.22 MB madccc
npm/axios@1.7.9 network 0 2.13 MB jasonsaayman
npm/cheerio@1.0.0 None 0 1.25 MB feedic
npm/circular-dependency-plugin@5.2.2 None 0 10.5 kB theron
npm/classnames@2.5.1 None 0 23.6 kB jedwatson
npm/cli-progress@3.12.0 None 0 62.2 kB andidittrich
npm/copy-to-clipboard@3.3.3 None 0 15.1 kB sudodoki
npm/cross-env@7.0.3 environment 0 29.1 kB kentcdodds
npm/cross-fetch@4.1.0 network 0 93.3 kB lquixada
npm/cypress-image-diff-html-report@2.2.0 filesystem 0 587 kB kienht.dev
npm/dekko@0.2.1 filesystem 0 8.91 kB benjycui
npm/dotenv@16.4.7 environment, filesystem 0 75.8 kB motdotla
npm/dumi-plugin-color-chunk@1.1.2 None 0 38.7 kB wxh16144
npm/dumi@2.4.18 environment, eval, filesystem 0 2.92 MB yifankakaxi
npm/env-paths@3.0.0 None 0 9.81 kB sindresorhus
npm/eslint-plugin-compat@6.0.2 filesystem +1 202 kB amilajack
npm/eslint-plugin-jest@28.11.0 None 0 350 kB aaronabramov, jeysal, jsonp, ...6 more
npm/eslint-plugin-jsx-a11y@6.10.2 None 0 753 kB ljharb
npm/eslint-plugin-react-hooks@5.2.0-canary-ff628334-20250205 environment 0 180 kB react-bot
npm/eslint-plugin-react-refresh@0.4.19 None 0 18.2 kB arnaud-barre
npm/eslint@9.20.1 None +1 3.45 MB eslintbot, openjsfoundation
npm/fast-glob@3.3.3 filesystem 0 98.4 kB mrmlnc
npm/fetch-jsonp@1.3.0 None 0 12.4 kB camsong
npm/fs-extra@11.3.0 None 0 55.3 kB ryanzim
npm/gh-pages@6.3.0 filesystem, shell 0 39.8 kB tschaub
npm/glob@11.0.1 None 0 475 kB isaacs
npm/html2sketch@1.0.2 network 0 1.87 MB arvinxx
npm/http-server@14.1.1 environment, filesystem, network 0 124 kB thornjad
npm/husky@9.1.7 None 0 4.04 kB typicode
npm/identity-obj-proxy@3.0.0 None 0 8.38 kB keyanzhang
npm/immer@10.1.1 environment 0 627 kB mweststrate
npm/is-ci@4.1.0 Transitive: environment +1 32.9 kB sibiraj-s
npm/isomorphic-fetch@3.0.0 Transitive: network +1 169 kB mattandrews
npm/jest-axe@9.0.0 None 0 21 kB nickcolley
npm/jest-canvas-mock@2.5.2 None 0 112 kB atool
npm/jest-environment-jsdom@29.7.0 None 0 9.21 kB simenb
npm/jest-environment-node@29.7.0 unsafe 0 9.37 kB simenb
npm/jest-image-snapshot@6.4.0 environment, filesystem, shell 0 84.9 kB amexopensource
npm/jest-puppeteer@11.0.0 None 0 3.72 kB neoziro
npm/jest@29.7.0 None 0 5.01 kB simenb
npm/jquery@3.7.1 None 0 1.25 MB timmywil
npm/jsdom@26.0.0 None 0 3.11 MB domenic, joris-van-der-wel, sebmaster, ...3 more
npm/jsonml-to-react-element@1.1.11 None 0 21.2 kB benjycui
npm/jsonml.js@0.1.0 None 0 28.3 kB benjycui
npm/lint-staged@15.4.3 Transitive: environment +1 329 kB okonet
npm/lunar-typescript@1.7.7 None 0 1.35 MB 6tail
npm/node-fetch@3.3.2 network 0 107 kB node-fetch-bot
npm/node-notifier@10.0.1 environment, filesystem, network, shell +1 5.69 MB mikaelb
npm/open@10.1.0 environment 0 55.2 kB sindresorhus
npm/ora@8.2.0 None 0 27.5 kB sindresorhus
npm/p-all@5.0.0 None 0 5.42 kB sindresorhus
npm/package-manager-detector@0.2.9 environment 0 39.6 kB antfu
npm/pixelmatch@6.0.0 None 0 16 kB mourner
npm/rc-cascader@3.33.0 environment 0 180 kB zombiej
npm/rc-checkbox@3.5.0 None 0 20.5 kB zombiej
npm/rc-drawer@8.0.0 environment 0 59.6 kB zombiej
npm/rc-dropdown@4.2.1 None 0 43.1 kB zombiej
npm/rc-image@7.11.0 environment 0 159 kB afc163
npm/rc-menu@9.16.1 environment 0 256 kB zombiej
npm/rc-notification@5.6.3 None 0 89.3 kB afc163, benjycui, madccc, ...5 more
npm/rc-picker@4.11.2 environment 0 899 kB zombiej
npm/rc-progress@4.0.0 environment 0 52.3 kB afc163
npm/rc-rate@2.13.1 None 0 40.6 kB afc163, benjycui, madccc, ...5 more
npm/rc-select@14.16.6 None 0 347 kB afc163, chenshuai2144, madccc, ...6 more
npm/rc-slider@11.1.8 None 0 173 kB afc163, benjycui, jljsj33, ...6 more
npm/rc-steps@6.0.1 None 0 48.3 kB zombiej
npm/rc-tree-select@5.27.0 environment 0 179 kB zombiej
npm/rc-tree@5.13.0 None 0 359 kB zombiej
npm/rc-upload@4.8.1 None 0 80.3 kB afc163
npm/rc-util@5.44.4 None 0 243 kB afc163, benjycui, dahong, ...6 more
npm/react-dom@19.0.0 None 0 0 B
npm/scroll-into-view-if-needed@3.1.0 None 0 44.8 kB stipsan
npm/throttle-debounce@5.0.2 None 0 68.6 kB niksy

🚮 Removed packages: npm/prettier@3.5.1, npm/regenerator-runtime@0.14.1, npm/typescript@5.7.3

View full report↗︎

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2025

size-limit report 📦

Path Size
dist/antd.min.js 510.81 KB (+79 B 🔺)
dist/antd-with-locales.min.js 598.68 KB (+86 B 🔺)

@codecov
Copy link

codecov bot commented Feb 19, 2025

Bundle Report

Changes will increase total bundle size by 1.93kB (0.02%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 11.64MB 1.93kB (0.02%) ⬆️

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.js 967 bytes 6.07MB 0.02%
antd.js 967 bytes 5.57MB 0.02%

Files in antd-with-locales.js:

  • ./components/config-provider/context.ts → Total Size: 1.51kB

Files in antd.js:

  • ./components/config-provider/context.ts → Total Size: 1.51kB

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 19, 2025

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 19, 2025

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 16312f3
Status: ✅  Deploy successful!
Preview URL: https://4041c9cb.ant-design.pages.dev
Branch Preview URL: https://cp-pagination.ant-design.pages.dev

View logs

@codecov
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (40c11ee) to head (16312f3).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52893   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          767       767           
  Lines        13811     13811           
  Branches      3620      3620           
=========================================
  Hits         13811     13811           

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

@zombieJ
Copy link
Member

zombieJ commented Feb 19, 2025

最好全一点,这里其实有好多需要定制的:

截屏2025-02-19 16 47 26

<SemanticPreview
semantics={[
{ name: 'root', desc: locale.root, version: '6.0.0' },
{ name: 'item', desc: locale.item, version: '6.0.0' },
Copy link
Member

Choose a reason for hiding this comment

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

Prev / Next 的层级不对:

截屏2025-02-20 14 15 06

@zombieJ zombieJ merged commit efe6c51 into next Feb 20, 2025
42 checks passed
@zombieJ zombieJ deleted the cp-pagination branch February 20, 2025 09:32
@Wxh16144 Wxh16144 changed the title feat: ConfigProvider support classnames and styles for pagination feat(Pagination): support classNames and styles for component and ConfigProvider Nov 28, 2025
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