Changed HTML output to number input for Brightness, Speed, Intensity and Custom Sliders#4254
Changed HTML output to number input for Brightness, Speed, Intensity and Custom Sliders#4254
Conversation
…and Custom Sliders
|
Thanks for your proposal! personally I'm not an expert on html and JS, but I can answer one question
Ranges for all sliders (global brightness, effect sliders) are generally 0..255. The only exception is the "custom3" slider which has a reduced resolution of 0..31. |
Okay, then the inputs are fine. |
|
Will fix #3019 but I would recommend restoring tabs which were replaced by spaces in JS file. EDIT: I'd also try to reuse range from existing (hidden) input fields instead of introducing new ones. |
|
Thanks for your recommendations! > I would recommend restoring tabs which were replaced by spaces in JS file. > EDIT: I'd also try to reuse range from existing (hidden) input fields instead of introducing new ones.
If you have a simpler solution in mind that I may have overlooked, please let me know. Given the required work and the limited benefits, this approach seems impractical, especially since the inputs don’t share the same parent element. |
|
Hey! This pull request has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. |
WalkthroughThis change updates the slider UI in the WLED web interface by replacing the tooltip-style slider value bubble with a visible numeric input field adjacent to each slider. The CSS is revised to remove the Changes
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🔇 Additional comments (16)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
what is the status here? |
|
I would much prefer #3170 as it is simpler and universal. |
|
Hey! This pull request has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. |
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_15esp32devWhat Have I Changed
index.html
this.valueas an argument for the Effects/Brightness setter functions.index.css
.sliderbubbleclass to.sliderInputand adjusted styles accordingly..sliderwrapclass width to display the number input properly.index.js
valas an argument for the Effects/Brightness setter functions, allowing both range and number inputs to function.updateTrailto update the input instead of the output.slider bubbleevent.toggleBubblefunction.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
Summary by CodeRabbit
New Features
Style
Bug Fixes