Comfy-Org / Comfy-Org/ComfyUI_frontend
[Feature Request]: Dragging on `float`/`int` field with `min`/`max` set should behave like invisible `slider`
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues and checked the recent builds/commits
### What would your feature do ?
Currently, I believe, dragging on numeric fields increments by the specified `step` value by each pixel dragged. It's great to have this drag-to-tweak at all, but such a drastic change makes this feature unusable, unless the node author set `step` to a REALLY small value (and they probably did not, since they want something bigger for the arrow clicks).
When min/max are specified for the input, this effectively shrinks the draggable range to a tiny fraction of the actual widget width.
https://github.com/user-attachments/assets/dce15cc9-13f6-42a6-901e-725ef42c87fe
### Proposed workflow
In such case (when both `min` and `max` are set), the much better solution would be completely ignoring the step for dragging and instead utilizing the entire width of the widget between arrows - basically turning every such field into an invisible slider. So, we reach minimum value only when we drag all the way to the left arrow, and we reach max only when we drag to the right end.
https://github.com/user-attachments/assets/e1ed913f-344c-458e-9c2b-7a570ead83d0
Such a widget might become even more convenient than the slider itself - if the actual drag-range is determined dynamically, from the click start position to both ends.
This way, a user can interactively get wider range (and higher precision) for dragging by starting closer to the other end.
In this ^ example, we get more precision for tweaking the value up - by starting closer to the left side.
### Additional information
Related issues:
- https://github.com/Comfy-Org/ComfyUI_frontend/issues/188
- https://github.com/Comfy-Org/ComfyUI_frontend/issues/4477 (if this one would be implemented, that one would be unnecessary since the entire `slider` display-style would probably become obsolete)
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-4478-Feature-Request-Dragging-on-float-int-field-with-min-max-set-should-behave--2356d73d365081798af2d44c16c13ec3) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.