vaadin / flow-components

Java counterpart of Vaadin Web Components
82 stars 63 forks source link

TimePicker should allow Steps less than 900 Seconds #6326

Open dwlabcube opened 1 month ago

dwlabcube commented 1 month ago

Describe your motivation

Currently TimePicker does not allow Steps of i.e. 5 Minutes. For our Reporting Tool we need this.

Describe the solution you'd like

A Method to bypass the 900Seconds minimum.

Describe alternatives you've considered

Using a Comboxbox but this is just not fun...

Additional context

No response

rolfsmeds commented 1 month ago

The purpose of the TimePicker dropdown is to make it quick and easy for the user to select the desired value. This benefit is affected by the number of items in the dropdown: the fewer items, the easier it is to select the desired one. With a 900s interval, you have 96 items in the dropdown, which is already a lot. With a 5 minute interval you would have 288 items, which would make the dropdown kind of useless.

Note that you can still set the step to <900s, but the dropdown will not be displayed then.

We could still consider removing this limit, but from a UX point of view, I would not recommend it.

dwlabcube commented 1 month ago

I understand your Point of View, but it does not take into account other use cases such as Reporting how much Time you spent for a Task etc. In 90% of the cases the user will pick a value between 5 Minutes and 1h:30minutes. They should be all there within one click. You might be right, that hardly ever someone will choose 23:45 as his desired value, nonetheless, the first 10-20 entries are mostly used.

image

This is now made with a SelectBox. Which of course is not what we want, right? ;-) Do you understand what i mean?

sissbruecker commented 3 weeks ago

That's not a point in time though, but a duration. Your select solution actually sounds like it could be more useful here in terms of UX, as you have better control over which durations you provide as a shortcut for the user to select. Instead of having a hard increment of 5 minutes for every entry, you could use a logarithmic scale increasing the increment to half an hour for example if the duration is over 1:30 hours or something.