(Go: >> BACK << -|- >> HOME <<)

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 support presets #38249

Merged
merged 16 commits into from
Oct 28, 2022
Merged

feat: DatePicker support presets #38249

merged 16 commits into from
Oct 28, 2022

Conversation

zombieJ
Copy link
Member
@zombieJ zombieJ commented Oct 27, 2022

[中文版模板 / 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
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Adjust DatePicker style and support presets prop.
🇨🇳 Chinese 调整 DatePicker 布局并且支持 presets 属性。

☑️ 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 Oct 27, 2022

@github-actions
Copy link
Contributor
github-actions bot commented Oct 27, 2022

Size Change: +1.8 kB (0%)

Total Size: 897 kB

Filename Size Change
./dist/antd-with-locales.min.js 477 kB +992 B (0%)
./dist/antd.min.js 420 kB +811 B (0%)

compressed-size-action

@gabschne
Copy link
Contributor

While I like this list style more than the current tag one, I think the fact that the text can be dynamic might be problematic, especially if it's a longer one:

image

This means that, depending on the (length of the) preset texts, the calendar section of the picker is sometimes further to the left and sometimes further to the right, which is not really good for the user experience.

Have you thought about putting the list on the right side of the calendar part or below it (below would likely require to truncate the text using text-overflow: ellipsis if it's longer than the width of the picker popup) or even making this configurable?

Below could also be better for smaller screen sizes.

@codecov
Copy link
codecov bot commented Oct 28, 2022

Codecov Report

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

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

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #38249   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          542       541    -1     
  Lines         9281      9279    -2     
  Branches      2606      2606           
=========================================
- Hits          9281      9279    -2     
Impacted Files Coverage Δ
components/menu/style/vertical.tsx 100.00% <ø> (ø)
components/select/style/dropdown.tsx 100.00% <ø> (ø)
components/steps/style/nav.ts 100.00% <ø> (ø)
components/table/style/ellipsis.tsx 100.00% <ø> (ø)
components/upload/style/list.tsx 100.00% <ø> (ø)
components/upload/style/picture.tsx 100.00% <ø> (ø)
components/date-picker/generatePicker/index.tsx 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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@afc163
Copy link
Member
afc163 commented Oct 28, 2022

覆盖率掉了

@zombieJ
Copy link
Member Author
zombieJ commented Oct 28, 2022

While I like this list style more than the current tag one, I think the fact that the text can be dynamic might be problematic, especially if it's a longer one:

image

This means that, depending on the (length of the) preset texts, the calendar section of the picker is sometimes further to the left and sometimes further to the right, which is not really good for the user experience.

Have you thought about putting the list on the right side of the calendar part or below it (below would likely require to truncate the text using text-overflow: ellipsis if it's longer than the width of the picker popup) or even making this configurable?

Below could also be better for smaller screen sizes.

Thanks for feedback. Let me bring this to designer.

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