Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rewrite renderSeparator to FC #52841

Merged
merged 4 commits into from
Feb 19, 2025
Merged

refactor: rewrite renderSeparator to FC #52841

merged 4 commits into from
Feb 19, 2025

Conversation

li-jia-nan
Copy link
Member

中文版模板 / 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
  • ❓ 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

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English refactor: rewrite renderSeparator to FC
🇨🇳 Chinese refactor: rewrite renderSeparator to FC

Copy link

stackblitz bot commented Feb 15, 2025

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

Copy link
Contributor

github-actions bot commented Feb 15, 2025

👁 Visual Regression Report for PR #52841 Failed ❌

🎯 Target branch: master (2149450)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 6 changed

Expected (Branch master) Actual (Current PR) Diff
input-otp.compact.png input-otp.compact.png input-otp.compact.png input-otp.compact.png
input-otp.compact.png input-otp.compact.png input-otp.compact.css-var.png input-otp.compact.css-var.png
input-otp.dark.png input-otp.dark.png input-otp.dark.png input-otp.dark.png
input-otp.dark.png input-otp.dark.png input-otp.dark.css-var.png input-otp.dark.css-var.png
input-otp.default.png input-otp.default.png input-otp.default.png input-otp.default.png
input-otp.default.png input-otp.default.png input-otp.default.css-var.png input-otp.default.css-var.png

Important

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

  • Visual diff is acceptable

Copy link
Contributor

github-actions bot commented Feb 15, 2025

Preview is ready

Copy link

Walkthrough

This pull request refactors the renderSeparator function into a functional component (FC) named Separator. The change involves moving the separator rendering logic into a separate component, enhancing modularity and readability.

Changes

File Summary
components/input/OTP/Separator.tsx Introduces a new functional component Separator to handle separator rendering logic.
components/input/OTP/index.tsx Replaces inline separator rendering logic with the new Separator component.
components/input/demo/otp.tsx Updates demo to reflect changes in separator handling, showcasing different separator types.
components/input/index.en-US.md, components/input/index.zh-CN.md Updates documentation to reflect changes in the separator prop type.

Copy link
Contributor

github-actions bot commented Feb 15, 2025

size-limit report 📦

Path Size
dist/antd.min.js 447.46 KB (+26 B 🔺)
dist/antd-with-locales.min.js 533.05 KB (+30 B 🔺)

Copy link

pkg-pr-new bot commented Feb 15, 2025

Copy link

codecov bot commented Feb 15, 2025

Bundle Report

Changes will decrease total bundle size by 6.25MB (-64.93%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.38MB -6.25MB (-64.93%) ⬇️

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 (New) 1.84MB 1.84MB 100.0% 🚀
antd.min.js (New) 1.54MB 1.54MB 100.0% 🚀
antd-with-locales.js (Deleted) -5.07MB 0 bytes -100.0% 🗑️
antd.js (Deleted) -4.56MB 0 bytes -100.0% 🗑️

Copy link

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

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 676681c
Status: ✅  Deploy successful!
Preview URL: https://592a9116.ant-design.pages.dev
Branch Preview URL: https://separator-update.ant-design.pages.dev

View logs

@li-jia-nan li-jia-nan changed the title refactor: [WIP] rewrite renderSeparator to FC refactor: rewrite renderSeparator to FC Feb 15, 2025
Copy link

codecov bot commented Feb 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2149450) to head (676681c).
Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #52841   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          767       767           
  Lines        13845     13849    +4     
  Branches      3628      3629    +1     
=========================================
+ Hits         13845     13849    +4     

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

@li-jia-nan li-jia-nan requested a review from afc163 February 18, 2025 14:17
@afc163 afc163 merged commit c3777d2 into master Feb 19, 2025
45 checks passed
@afc163 afc163 deleted the Separator-update branch February 19, 2025 01:19
@PeachScript PeachScript mentioned this pull request Feb 24, 2025
16 tasks
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