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

refactoring: use hook replace LocaleReceiver #40870

Merged
merged 8 commits into from
Feb 22, 2023
Merged

Conversation

li-jia-nan
Copy link
Member

@li-jia-nan li-jia-nan commented Feb 22, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English refactoring: use hook replace LocaleReceiver
🇨🇳 Chinese refactoring: 使用 useLocale 代替 LocaleReceiver 组件,删除 LocaleReceiver 组件

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 368.13 KB (-169 B 🔽)
./dist/antd-with-locales.min.js 424.34 KB (-200 B 🔽)

@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (f9218c6) compared to base (f9a38af).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #40870   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          606       606           
  Lines        10298     10372   +74     
  Branches      2791      2833   +42     
=========================================
+ Hits         10298     10372   +74     
Impacted Files Coverage Δ
components/calendar/generateCalendar.tsx 100.00% <100.00%> (ø)
components/config-provider/index.tsx 100.00% <100.00%> (ø)
...date-picker/generatePicker/generateRangePicker.tsx 100.00% <100.00%> (ø)
...ate-picker/generatePicker/generateSinglePicker.tsx 100.00% <100.00%> (ø)
components/empty/index.tsx 100.00% <100.00%> (ø)
components/form/FormItemLabel.tsx 100.00% <100.00%> (ø)
components/locale/useLocale.ts 100.00% <100.00%> (ø)
components/modal/ConfirmDialog.tsx 100.00% <100.00%> (ø)
components/modal/Modal.tsx 100.00% <100.00%> (ø)
components/modal/PurePanel.tsx 100.00% <100.00%> (ø)
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@li-jia-nan li-jia-nan changed the title chore: rename useLocaleReceiver => useLocale refactoring: use hook replace LocaleReceiver Feb 22, 2023
@MadCcc
Copy link
Member

MadCcc commented Feb 22, 2023

少了 200B,舒服了

@MadCcc
Copy link
Member

MadCcc commented Feb 22, 2023

Changelog 都写一下

@li-jia-nan
Copy link
Member Author

为啥会少这么多,两个方法内部实现都基本一样

@yoyo837
Copy link
Contributor

yoyo837 commented Feb 22, 2023

多个文件的相同导入路径缩短了

@li-jia-nan
Copy link
Member Author

Changelog 都写一下

done~

@li-jia-nan li-jia-nan merged commit 288b10b into master Feb 22, 2023
@li-jia-nan li-jia-nan deleted the useLocaleReceiver branch February 22, 2023 10:18
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 4, 2023
* chore: rename useLocaleReceiver => useLocale

* refactoring: use hook replace LocaleReceiver

* fix

* update snap

* fix

* update snap

* fix

* rename
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
* chore: rename useLocaleReceiver => useLocale

* refactoring: use hook replace LocaleReceiver

* fix

* update snap

* fix

* update snap

* fix

* rename
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
* chore: rename useLocaleReceiver => useLocale

* refactoring: use hook replace LocaleReceiver

* fix

* update snap

* fix

* update snap

* fix

* rename
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.

3 participants