Changed HTML output to number input for Brightness, Speed, Intensity and Custom Sliders #4254
+46
−68
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.
Enhancement: Convert HTML Output Elements to Number Inputs for Improved Precision
Sometimes, I struggled to input specific values using the range sliders for effects and brightness. To improve precision, I changed the HTML output elements for Brightness, Speed, Intensity, and Custom Sliders to number inputs. I kept changes minimal to fit within the current code structure.
Tested with
0_15
esp32dev
What Have I Changed
index.html
this.value
as an argument for the Effects/Brightness setter functions.index.css
.sliderbubble
class to.sliderInput
and adjusted styles accordingly..sliderwrap
class width to display the number input properly.index.js
val
as an argument for the Effects/Brightness setter functions, allowing both range and number inputs to function.updateTrail
to update the input instead of the output.slider bubble
event.toggleBubble
function.Issues
Questions
I couldn't find functions that redefine min/max values for the range inputs. Is this correct, or is there something specific to handle min/max values that I may have overlooked?
Android
Firefox
WLED-Native
WLED-Standard
Windows
Chrome
Firefox
Invalid value