piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.75k stars 341 forks source link

[Feature]: customize holdTime #593

Open usernein opened 2 years ago

usernein commented 2 years ago

Is your feature request related to a problem?

In my dashboard i don't use double click events at all: it's only clicks and holds. When i can, i always change the hold time to ~300ms to make it feel faster, but mushroom afaik doesn't allow you to change the holdTime

Also, in mobile, if i don't take the finger off the screen, the hold_action doesn't get called. This behavior also makes it feel slower

Describe the solution you'd like

An option to customize holdTime and an option to tell that i want to trigger hold_action even if i don't take the finger off the screen. e.g.

hold_action:
  action: more-info
  haptic: success
  holdTime: 300
  cancelThreshold: 1000 # cancel event only after this. If the option is undefined, trigger hold_action immediately after reached holdTime

Describe alternatives you've considered

No response

Additional context

No response

piitaya commented 2 years ago

The hold time is the default HA hold time for all cards. I do not prefer allow overriding this option from Mushroom to keep consistency between non mushroom card and mushroom card

usernein commented 2 years ago

What about allowing overriding but keeping the HA hold time as default, to keep the consistency? I think the users should have the power to choose about their own dashboards