Live data from Hacker News

Native dual-range input

muffinman.io

21–30 of 51 posts

Re: Native dual-range input

#21
post #19

This kind of slider should ALWAYS have the middle part movable; IE grabbing it would move both handles at the same time. For reference this is how Unity does it: https://docs.unity3d.com/StaticFiles/ScriptRefImages/EditorG...

As a counterpoint, i would never have clicked the middle part, the current view in my mind was that this was a modified slider, not another new widget entirely.

"ALWAYS" might be a bit of an overstatement.

Re: Native dual-range input

#22
post #15
post #13

Earlier quoted context omitted.

> does anyone like these inputs? We've A/B tested a slider against a textbox with plus and minus buttons (banking, on mobile) and the latter seemed to work better (as in fewer users cancelled the flow). I'm not pretending this finding can be generalised, though.

I can't imagine a banking interaction where the amount of money is not a precise value. What use cases motivated the testing of a slider?

Wonga.com was (briefly) a huge success story with their "two slider" interface. Perhaps because it made it easy to see how the output changed with the input.

Re: Native dual-range input

#23

Very clever! Totally unrelated to this project, just a general UI question: does anyone like these inputs? Every time there is a number input next to one, I use that instead. Seems the upper limit of “ticks” you can have on one before it becomes unusable is like… 10? Proper number inputs support all the same features (min, max, arrow keys to increment/decrement), but you can also just input an exact number. The range…

[deleted]

Re: Native dual-range input

#24
for my local install of codemirror I styled a (single) range control as the drag-to-resize border between my editor iframe (on the left) and my preview iframe (on the right) and was about to get into doing the same for the individual html, css and javascript editor iframes within the editor iframe. so I'm looking forward to seeing whether this component will be a one stop shop for that solution. thanks for this, OP

Re: Native dual-range input

#25

Very clever! Totally unrelated to this project, just a general UI question: does anyone like these inputs? Every time there is a number input next to one, I use that instead. Seems the upper limit of “ticks” you can have on one before it becomes unusable is like… 10? Proper number inputs support all the same features (min, max, arrow keys to increment/decrement), but you can also just input an exact number. The range…

I almost never use them. In sd webui I change resolution often, so I patched some divs to contain [512, 640, 768, …] and click these instead. Not sure if this slider control should even exist in a flow context, because it cannot be made scrollable like a volume range.

I also somewhat like unix style numeric inputs because you can grab a bar between the arrows and drag it to change the value. No long range required.

Ranges with sticky points are somewhat okay, e.g. Virtualbox settings stick to 2^n values for RAM and some integer disk GBs. But these intermediate values are just nonsense and nobody ever selected 7527MB of RAM by non-mistake.

Bonus points for Ubuntu keyboard repeat/delay settings which don’t show the numeric values at all. You set delay to 178 or maybe 223 or maybe 202. Who cares about muscle memory, right?

Re: Native dual-range input

#26

The native slider is hideous as f and further offends me by being called a range. Why are stupid simple things missing like display the value? We could even have a same name number input that displays the set value or an html forms in general got very little love. They should be taken to the drawing board along with sql and get some relation therapist to blame the earlier for the endless fighting. over the years of g…

And then some wonder why people resort to js-controlled spas and tend to forget how they cursed after their “simple html form” deleted input due to navigation or accidental refresh. Input is the most valuable data in a program because it cannot he recalculated and usually reqiures work to produce. Anything that doesn’t get this principle sucks.

That said, I don’t think src=form.json would help. Some type of a local permanent storage is basically required for app-level interaction, because the page state is so transient and fragile. I’d say it should be and all controls would be saved as foo. into localStorage. With received from backend to reset it explicitly if needed.

Re: Native dual-range input

#28
post #14

Hey, author here, glad to see it popping up on HN. I see people started opening issues and leaving bug reports here. I’ll try to go through them tomorrow (it is getting late here). I created it because I needed it for my generative drawings. I prefer dragging a slider and seeing how the image changes, more than typing in a number. I really tried to keep it minimal.

Goshdarn I love this post. I enjoyed my morning coffee while looking at the calculations, and the description of the debugging mode. It's a clever usage of native components. Currently my experience is with SwiftUI and it's almost too easy to make your own components. However that doesn't make it the best option as you described, native components are often very full-featured. I checked your post on Firefox on iOS, which is arguably an obscure browser, and it worked fine.

Very well done.

Re: Native dual-range input

#29
This is cool! I have always thought that the HTML input needed a dual-value implementation because that makes a lot of sense. Consider the use case "I want to filter products with at least X widgets but no more than Y".

However, I found a bug in Firefox I want to highlight:

Any time I click on a min or max handle they change change the value one step up or down.

If I make an effort to click in the dead center of the handle it does not change. If I click slightly to the left the selected value will decrease one step. If I click slightly on the right side of the handle it will increase.

I would expect the value to _only_ change when I make an actual action to change it by moving my mouse pointer with the button held down.

Post reply on HN