Skip to content

refactor: rewrite renderSeparator to FC#52841

Merged
afc163 merged 4 commits intomasterfrom
Separator-update
Feb 19, 2025
Merged

refactor: rewrite renderSeparator to FC#52841
afc163 merged 4 commits intomasterfrom
Separator-update

Conversation

@li-jia-nan
Copy link
Copy Markdown
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

@bolt-new-by-stackblitz
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown
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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 15, 2025

Preview is ready

@petercat-assistant
Copy link
Copy Markdown

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.

Comment thread components/input/OTP/Separator.tsx Outdated
@github-actions
Copy link
Copy Markdown
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 🔺)

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 15, 2025

@codecov
Copy link
Copy Markdown

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% 🗑️

@cloudflare-workers-and-pages
Copy link
Copy Markdown

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
@codecov
Copy link
Copy Markdown

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
@afc163 afc163 deleted the Separator-update branch February 19, 2025 01:19
@PeachScript PeachScript mentioned this pull request Feb 24, 2025
16 tasks
renny-ren pushed a commit to renny-ren/ant-design that referenced this pull request Apr 14, 2025
* refactor: rewrite renderSeparator to FC

* refactor: rewrite renderSeparator to FC

* refactor: rewrite renderSeparator to FC

* fix: fix
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