Skip to content
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

[feature] a 'range gap' or similar property that maintains a gap between range slider handles #105

Open
ananmaysharan opened this issue Jun 1, 2023 · 2 comments
Labels
feature request under consideration A feature or request which is not decided on the validity or solution

Comments

@ananmaysharan
Copy link

Describe the feature
A 'range gap' or similar property that maintains a gap between range slider handles that prevents the handles from resting on top of each other.

Explain it's value / reasoning
Especially when working with the slider as a time slider, preventing users from being able to have both sliders rest on the same year / date has benefits in terms of filtering data associated with the slider values, and results in slightly more clear UX.

Additional context
For example, in the image below, a range gap of '1' would not allow the user to move the handle on '2014' any further back.
image

@ananmaysharan ananmaysharan added feature request investigating Not quite sure if it's valid, yet labels Jun 1, 2023
@simeydotme
Copy link
Owner

nice idea, need to sit down and think on the UX though for different scenarios ( steps, pips, etc )

@simeydotme simeydotme added under consideration A feature or request which is not decided on the validity or solution and removed investigating Not quite sure if it's valid, yet labels Jun 5, 2023
@simeydotme
Copy link
Owner

I had a quick go at this with as little effort as possible, but I ran into massive problems with step ... for example, if a rangeGap is set at 5, but the step is set at 3, it can never work

|--|--|--|--|--|--|--|--|
|--|--o===o-|--|--|--|--|
^^ see the second handle would not be on a step ..
I could restrict it so that the range-gap is divisible by the step value , but then it gets impossible at the max...

like if the step is 5, and rangeGap is 5 , but the max is 22

|----|----|----|----|-|
|----|----|----|--o===o <-- first handle not on step
|----|----|----|----o===o <-- second handle past end of slider

the max problem seems un-resolvable, because the way the slider currently designed. I would need to change the behaviour of the max setting for rangeGap sliders.

It's very complicated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request under consideration A feature or request which is not decided on the validity or solution
Projects
None yet
Development

No branches or pull requests

2 participants