-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Add new DigitalClock
desktop time picking experience
#7958
Conversation
Localization writing tips ✍️Seems you are updating localization 🌍 files. Thank you for contributing to the localization! 🎉 To make your PR perfect, here is a list of elements to check: ✔️
Netlify deploy previewNetlify deploy preview: https://deploy-preview-7958--material-ui-x.netlify.app/ Updated pages
These are the results for the performance tests:
|
@gerdadesign Could you have a look at the live time picker and date time picker examples and comment on the UX behavior? The main I see:
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@@ -1,10 +1,12 @@ | |||
import { PickersLocaleText } from './utils/pickersLocaleTextApi'; | |||
import { getPickersLocalization } from './utils/getPickersLocalization'; | |||
import { TimeViewWithMeridiem } from '../internals/models'; |
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.
Do you think that it still makes sene in keeping this type internal if we are adding it into locale files? 🤔
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.
Nothing to add, great work ! 🥳
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.
Nice work, @LukasTy!
I really appreciate the effort in pushing the boundaries on polishment and customization-abilities with these components.
It looks and feels great, and just looking at the sheer number of files this PR required to change and create is a signal of how big this task was. All the kudos!
There're always improvements to be done, but I believe none of them should block the release. I'll create issues for them as follow-ups.
-
The auto-closing strategy might still need some tweaks, but we can try improving it after user validation. I think that handling the last selector as an "OK" button may create some unwanted situations.
-
Maybe it's good to have at least one visual customization example, like, changing the columns or action buttons design. Does it have any particular slots?
On an unrelated note, the readOnly examples for the pickers could display a value.
|
||
You can force a desired interval using the `timeStep` prop. | ||
|
||
{{"demo": "DigitalClockTimeStep.js"}} |
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.
On one side, it makes a lot of sense to have different properties since they ultimately produce a different behavior.
But I imagine this will likely create some confusion/friction for the users, which makes me realize we aren't releasing these new components as unstable, so changing its API before v7 can become a pain.
I wish we could somehow warn the user they are using the wrong property. Based on type only, the IDE will only say that DigitalClock doesn't have timeSteps property and vice versa.
That is a good idea. It was not that big of an issue until we introduced the |
DigitalClock
desktop time picking experience
Fixes #4483
Preview: https://deploy-preview-7958--material-ui-x.netlify.app/x/react-date-pickers/time-picker/
Changes
digital
view renderer onDesktopTimePicker
andDesktopDateTimePicker
MultiSectionDigitalClock
andDigitalClock
Open compromise questions for initial implementation
TimePicker
and leaveDateTimePicker
for a later time/PR after the design has been finalized and DateTimeRange behavior is possibly explored and decided on?MobileTimePicker
? If we don't finalize usage of theDigitalClock
on mobile, then maybe it makes sense to not have the props on that component as well? But no one would stop users from specifying the new digitaltimeViewRenderers
for theMobileTimePicker
, hence, some users might be in a problem, where they insist on using the renderer, but TS does not allow for the new expected props to be passed to it... 🤷StaticTimePicker
behavior as is (usingTimeClock
) for the time renderer regardless of thedisplayStaticWrapperAs
prop value?accept
button and not close by default after selection (unlesscloseOnSelect
is true)?meridiem
view or ugly code to handleampm="true"
case.My answers to questions:
TimePicker
initially.What are your opinions on these questions @flaviendelangle @joserodolfofreitas @alexfauquette?