-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pickers] Replace the Picker
prefix in the view component by Calendar
(eg: MonthPicker
=> MonthCalendar
)
#6389
[pickers] Replace the Picker
prefix in the view component by Calendar
(eg: MonthPicker
=> MonthCalendar
)
#6389
Conversation
… / YearPicker into DateCalendar / DayPickerCalendar / MonthCalendar / YearCalendar
These are the results for the performance tests:
|
CalendarPicker
/ CalendarPickerSkeleton
/ MonthPicker
/ YearPicker
into DateCalendar
/ DayPickerCalendar
/ MonthCalendar
/ YearCalendar
Picker
prefix in the view component by Calendar
(eg: MonthPicker
=> MonthCalendar
)
Sounds great! I think we're all solid on the use of Calendar as a prefix. As for DateCalendar => Calendar. On the other hand, I think RangeCalendar sounds like a better name for its situation. Another thought regarding this naming: If we're ever to implement a scheduler component, would it use this calendar component (obviously with some customizations) ? or would it have its own implementation? |
For me our current naming differentiate the date (day + month + year) and the day
Hard to say, maybe our DayPicker could be flexible enough at some point but I'm not sure. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also include breaking changes mention in the PR description so it would be picked up by release script? 🤔
packages/x-date-pickers/src/DateCalendar/tests/validation.CalendarPicker.test.tsx
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/DayCalendarSkeleton/dayCalendarSkeletonClasses.ts
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/internals/models/props/baseToolbarProps.ts
Outdated
Show resolved
Hide resolved
Sure, I just waited for a confirmation on the nomenclature, I'll write those |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, great result! 👍
Part of #4484
I'll add the detailed breaking changes later.
But here is the list of the renaming:
CalendarPicker
=>DateCalendar
(we can discuss naming it simplyCalendar
if you want, in which case the range version would beRangeCalendar
and notDateRangeCalendar
which would match Spectrum's naming)CalendarPickerSkeleton
=>DayCalendarSkeleton
MonthPicker
=>MonthCalendar
YearPicker
=>YearCalendar
Follow up:
ClockPicker
=>Clock
Changelog
Breaking changes
The view components allowing to pick a date or parts of a date without an input have been renamed to better fit their usage:
Component names in the theme have changed as well: