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

Support "empty" value in pickers' UX #1770

Merged
merged 13 commits into from
May 17, 2020
Merged

Support "empty" value in pickers' UX #1770

merged 13 commits into from
May 17, 2020

Conversation

dmtrKovalenko
Copy link
Member

@dmtrKovalenko dmtrKovalenko commented May 13, 2020

This PR closes #1613

User facing changes

Breaking changes

  • [UI] DatePicker and TimePicker will not render anything if value={null} and the user didn't take any action. (previously it has been rendering defaultHighlight or now)
  • Remove defaultHighlight prop

Features

  • DatePicker and TimePicker will not render anything if value={null} and the user didn't take any action. (previously it has been rendering defaultHighlight or now)
  • Add new toolbarPlaceholder prop that will be displayed instead of day text when value is null. By default "––"

@vercel
Copy link

vercel bot commented May 13, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mui-org/material-ui-pickers/ptsgd8bwd
✅ Preview: https://material-ui-pickers-git-feature-empty-dates.mui-org.now.sh

@cypress
Copy link

cypress bot commented May 13, 2020



Test summary

77 0 1 0


Run details

Project material-ui-pickers
Status Passed
Commit f360596
Started May 17, 2020 11:58 AM
Ended May 17, 2020 12:02 PM
Duration 03:34 💡
OS Linux Debian - 9.11
Browser Chrome 78

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #1770 into next will increase coverage by 0.41%.
The diff coverage is 97.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1770      +/-   ##
==========================================
+ Coverage   90.74%   91.15%   +0.41%     
==========================================
  Files          77       77              
  Lines        2333     2364      +31     
  Branches      439      457      +18     
==========================================
+ Hits         2117     2155      +38     
+ Misses        174      169       -5     
+ Partials       42       40       -2     
Impacted Files Coverage Δ
lib/src/views/Calendar/CalendarView.tsx 100.00% <ø> (+6.34%) ⬆️
lib/src/TimePicker/TimePickerToolbar.tsx 94.44% <83.33%> (-1.56%) ⬇️
lib/src/DateTimePicker/DateTimePickerToolbar.tsx 95.23% <91.66%> (+4.61%) ⬆️
lib/src/DatePicker/DatePickerToolbar.tsx 96.87% <100.00%> (+0.32%) ⬆️
lib/src/DateRangePicker/DateRangePicker.tsx 100.00% <100.00%> (ø)
lib/src/DateTimePicker/DateTimePickerTabs.tsx 84.84% <100.00%> (ø)
lib/src/Picker/Picker.tsx 95.74% <100.00%> (+0.09%) ⬆️
lib/src/Picker/makePickerWithState.tsx 100.00% <100.00%> (ø)
lib/src/_helpers/date-utils.ts 100.00% <100.00%> (ø)
lib/src/_helpers/time-utils.ts 95.71% <100.00%> (+0.25%) ⬆️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a1b6b0...f360596. Read the comment docs.

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement

lib/src/TimePicker/TimePickerToolbar.tsx Outdated Show resolved Hide resolved
@dmtrKovalenko dmtrKovalenko changed the title Support "empty" dates in picker UX Support "empty" value in picker UX May 17, 2020
@dmtrKovalenko dmtrKovalenko changed the title Support "empty" value in picker UX Support "empty" value in pickers' UX May 17, 2020
@dmtrKovalenko dmtrKovalenko merged commit b87e674 into next May 17, 2020
@dmtrKovalenko dmtrKovalenko deleted the feature/empty-dates branch May 17, 2020 12:04
@oliviertassinari oliviertassinari added the bug 🐛 Something isn't working label May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DatePicker - leave value blank/empty until user takes action?
2 participants