Add ability to tap on slider and trigger custom command whether slider is enabled or disabled#10
Open
lizsugar wants to merge 9 commits intocustom-cards:mainfrom
Open
Add ability to tap on slider and trigger custom command whether slider is enabled or disabled#10lizsugar wants to merge 9 commits intocustom-cards:mainfrom
lizsugar wants to merge 9 commits intocustom-cards:mainfrom
Conversation
Plus some default settings based on card type
FIX: No longer triggers the tap_action when sliding! BUG: does not trigger tap_action unless slider is disabled It is supposed to trigger tap_action at all times. The goal is that this change will eventually result in "Act as a toggle (disable sliding)" being removed. A toggle for disabling slider will remain, but it will no longer add a tap action for toggle when enabled, as that will be attached to the slider anyway (and can be defined as 'none' action if desired).
Remove all references to hasToggle/has_toggle and replace appropriately with disableSliding/disable_sliding. Added default configs for the controller types tap_action works with both mouse and touch when sliding is disabled current bugs, now better described after further testing: - tap_action with sliding enabled works with touch but not mouse click - tap_action with sliding enabled sometimes jumps to the value your finger is at
It's in a good place except still does not work with mouse click while slider is active. Probably SQUASH this commit...
A little bit of a dirty fix, but it works
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This one is a pretty big change and most of my PRs submitted after this one (e.g., scene domain support) work best if this is already merged.
This change is not backwards compatible. The previous
slider.has_toggleoption is replaced byslider.disable_sliding.This allows the user to define a tap_action on the slider element independent of action button and icon. The tap_action fires whether slider can move or not and does not fire when the slider has moved.
Examples:
For switches
For lights
For media players
For scenes