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

[pickers] Refactor TimeClock value management #17016

Open
LukasTy opened this issue Mar 18, 2025 · 0 comments
Open

[pickers] Refactor TimeClock value management #17016

LukasTy opened this issue Mar 18, 2025 · 0 comments
Labels
component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. design This is about UI or UX design, please involve a designer enhancement This is not a bug, nor a new feature mobile Targets mobile platform

Comments

@LukasTy
Copy link
Member

LukasTy commented Mar 18, 2025

Created from #16853 (comment).

The current behavior is slightly strange, because it is "optimized" solely for touch users.
This optimization creates an exception for value management.
If we could avoid this behavior, the code could be simplified.

When the Time Clock value is being dragged - you no longer get a preview of the current selected value, only what you are trying to change the value to.
This behavior reveals inconsistency between Digital and Analog clocks, because on digital when navigating with keyboard, the currently selected value remains selected, only confirming the selection changes the selection.
The same can be said about date range calendar range dragging - the currently selected value is always visible.

We have discussed a few options for this behavior/DX:

  1. Keep it as is
  2. Refactor value management to no longer update the toolbar value as the analog clock is being dragged.
    This could create the need to have the above-mentioned selected and selecting states visually.
    This behavior has a con that it differs from the Material spec/design.
  3. Fire onChange on every hour/minute step change.
    Currently, the onChange is fired only after touch ends.
@LukasTy LukasTy added component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. design This is about UI or UX design, please involve a designer enhancement This is not a bug, nor a new feature mobile Targets mobile platform labels Mar 18, 2025
@github-actions github-actions bot changed the title [TimePicker] Refactor TimeClock value management [pickers] Refactor TimeClock value management Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! component: TimePicker The React component. design This is about UI or UX design, please involve a designer enhancement This is not a bug, nor a new feature mobile Targets mobile platform
Projects
None yet
Development

No branches or pull requests

1 participant