forked from mattieha/slider-button-card
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix slider tap mobile #14
Draft
lizsugar
wants to merge
74
commits into
custom-cards:main
Choose a base branch
from
lizsugar:fix_slider_tap_mobile
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
Makes it more visually distinguishable
Just uses the switch controller to toggle the automation on and off
Mouse or touch event can now continue outside of card bounds to continue adjusting the slider by relative position change. This is incredibly helpful on small mobile displays.
Just uses the switch controller to toggle the automation on and off
Mouse or touch event can now continue outside of card bounds to continue adjusting the slider by relative position change. This is incredibly helpful on small mobile displays.
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).
…ement inherited abstract member" error
…ream Animate speedless fans upstream
GUI and YAML options added, english translation added Current bugs: if attribute value is too long, then state and attribute will not stay on the same line.
Outstanding bug: Rounding error when input_number step is set to certain values (observed easily with step set to 2 or 3)
the step and the max of an input_number entity. Appears that at this time applyStep() is unnecessary, and was in fact causing the problem I have tested stepped sliders of both input_number entities as well as light and climate entities, and stepping still works as expected when applyStep() is not called at all. This does not resolve the issue where step count results in "illegal" values on certain input_number entities.
Modified all git URLs to point to this repo as appropriate Table formatting Updated and added config options Added new examples and example screenshots where appropriate Credited myself where appropriate Clarify credit to @rohankapoorcom
A little bit of a dirty fix, but it works
Makes this work more reliably on mobile where touch always has some movement behind it
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.
Resolves an issue on mobile where tapping needed to be incredibly precise (only my android phone, tapping on my surface worked fine - the touch interfaces must interpret interaction slightly differently).
Fixes a bug in #10 but is a separate branch because it needed features from #5 to implement the fix.
Submitting as a draft PR because this is also doing that thing where a million commits from main branch are being included. The only commits needed are da8a4ec and d0b744f