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

feat: DatePicker & Calendar export generate function directly #41773

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Apr 12, 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

resolve #41749

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English DatePicker & Calendar export generate function directly now.
🇨🇳 Chinese DatePicker 与 Calendar 直接导出生成自定义日期库组件方法,不再需要通过 module 路径引入使用。

☑️ 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

🚀 Summary

🤖 Generated by Copilot at e1fff21

This pull request adds support for custom date libraries in the DatePicker and Calendar components. It introduces the generatePicker and generateCalendar methods as static properties on the components, which allow users to create custom components with different date libraries and configurations. It also updates the documentation and tests for these features.

🔍 Walkthrough

🤖 Generated by Copilot at e1fff21

  • Add generatePicker and generateCalendar methods as static properties of DatePicker and Calendar components respectively, to allow users to create custom components with different date libraries (link, link, link, link)
  • Update the import of the generatePicker and generateCalendar functions in the test files and the documentation files to use the methods from the DatePicker and Calendar components instead (link, link, link, link, link, link, link, link, link, link, link)
  • Update the import of the luxonGenerateConfig from the rc-picker library in the documentation files to use the lib directory instead of the es directory, for consistency with the other date library imports (link, link)
  • Reorder the import of the types from the generatePicker module in the components/date-picker/index.ts file, to group the types together and follow the alphabetical order (link)
  • Move the assignment of the _InternalPanelDoNotUseOrYouWillBeFired and _InternalRangePanelDoNotUseOrYouWillBeFired properties to the DatePicker component after the type casting, to avoid type errors (link)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 12, 2023

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 376.23 KB (+34 B 🔺)
./dist/antd-with-locales.min.js 435.11 KB (+41 B 🔺)

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (dd60a37) 100.00% compared to head (e1fff21) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #41773   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          614       615    +1     
  Lines        10514     10525   +11     
  Branches      2881      2881           
=========================================
+ Hits         10514     10525   +11     
Impacted Files Coverage Δ
components/button/style/index.ts 100.00% <ø> (ø)
components/button/IconWrapper.tsx 100.00% <100.00%> (ø)
components/button/LoadingIcon.tsx 100.00% <100.00%> (ø)
components/button/button.tsx 100.00% <100.00%> (ø)
components/calendar/index.ts 100.00% <100.00%> (ø)
components/date-picker/index.ts 100.00% <100.00%> (ø)

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zombieJ zombieJ merged commit 308f486 into feature Apr 12, 2023
94 checks passed
@zombieJ zombieJ deleted the date-export branch April 12, 2023 09:20
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
…sign#41773)

* feat: DatePicker.gen support

* test: update snapshot

* docs: update docs
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
…sign#41773)

* feat: DatePicker.gen support

* test: update snapshot

* docs: update docs
@MadCcc MadCcc mentioned this pull request May 4, 2023
20 tasks
@devuxer
Copy link

devuxer commented May 5, 2023

@zombieJ said features are released at the end of the month, but it's now 5 days into May, and I still don't see this. When will this be released?

I just want my theme to work properly in NextJS when using Date Picker and Calendar.

@zombieJ
Copy link
Member Author

zombieJ commented May 5, 2023

@devuxer, I still work with DatePicker changeOnBlur feature which may need additional days. Sorry for delay.

@devuxer
Copy link

devuxer commented May 5, 2023

@zombieJ, I understand. Thanks for the update!

@devuxer
Copy link

devuxer commented May 11, 2023

Hi @zombieJ ,

Sorry to message again, but do you think this feature will be released by the end of the month?

Or do you have a workaround?

This is a blocker for me.

Thank you!

@yoyo837
Copy link
Contributor

yoyo837 commented May 11, 2023

Hi @zombieJ ,

Sorry to message again, but do you think this feature will be released by the end of the month?

Or do you have a workaround?

This is a blocker for me.

Thank you!

#42276 It is on the way.

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.

None yet

4 participants