[Feature] Snapping support for RangeSelector #4651
Replies: 10 comments
-
Hello, 'hansmbakker! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future! |
Beta Was this translation helpful? Give feedback.
-
@hansmbakker we have the existing |
Beta Was this translation helpful? Give feedback.
-
@michael-hawker My use case is that I want to have several of these range selectors below each other. When dragging a Thumb I would like it to snap when the value matches one of the other values.
|
Beta Was this translation helpful? Give feedback.
-
@hansmbakker Is this functionality available in any websites or apps to get an understanding of how it would be used? |
Beta Was this translation helpful? Give feedback.
-
@skendrot no I don't, but I updated the original post with more information about the use case and with a drawing that hopefully helps. By the way: If anybody has a better way of editing the timing schema of tasks within a project, I would be curious to hear about it :) |
Beta Was this translation helpful? Give feedback.
-
Looking at your drawing I'm still confused how this would be handled from the developer of the app. How are those "inside" snapping points determined? They seem to be random and not correlate to anything else. The first "inside" snapping point seems to be when Task 1 ends? But then from there how are they determined? And then how would they be determined for all four tasks? You would need to implement some custom logic to determine the points for all of the tasks. I'm sure there are N number of tasks so you couldn't bind the RangeMin and RangeMax values. You'd have to listen to the changed events. Your use case seems very niche which is why I asked if you had an example of this being done somewhere else. If this is something only your app would use it's hard to put work into it. But if others are asking for it, or even using it in other locations then it makes sense to put work in. I keep thinking of a calendar app where you don't want meetings to overlap, so your next meeting has a minimum of your previous meetings end time. But this use case is handled with the Minimum value of the RangeSelector and you can easily have meetings that overlap so even it doesn't quite fit. |
Beta Was this translation helpful? Give feedback.
-
Every The |
Beta Was this translation helpful? Give feedback.
-
Thanks, that makes more sense on how those are handled |
Beta Was this translation helpful? Give feedback.
-
I think the main thing here is that with I think we'd want to first mirror that behavior in RangeSelector and not deviate from it. So I think this is really just about adding the But @hansmbakker then it sounds like your scenario is even more specific than that? Do you think that'd be a common enough scenario that it should be something baked into the control? Is this something you've done today in your app already? Do you think there's a generalized solution? I think these would have to be a separate set of properties or something, right? Or almost something that could be abstracted for both |
Beta Was this translation helpful? Give feedback.
-
Thank you for getting back to this @michael-hawker! I believe I am not currently working on the app anymore and find it difficult to say from the top of my head what the solution should be - I think some discussion (including a possible solution) has taken place above already, and I'm not sure what to add at the moment. |
Beta Was this translation helpful? Give feedback.
-
Use case
I am looking for a way to edit the timing schema of tasks within a project (like a simple version of a Gantt chart). Some tasks should
Describe the problem this feature would solve
I thought to use the multiple
RangeSelector
instances below each other to configure theTimeSpan
s of task executions.In order to express the relations between start / end times of these tasks, I would like to have snapping support for the

RangeSelector
as in the drawing below:Suggested technical solution
Thumb
s comes within the configured distance from one of the snapping values, thatThumb
should snap to it (assume the closest snapping value).Thumb
becomes larger higher than the breaking distance), the draggedThumb
should assume the pointer position againDescribe alternatives you've considered
If anybody has a better way of editing the timing schema of tasks within a project, I would be curious to hear about it :)
If there is a way to make a simple, draggable, horizontal bar chart that would also help
Beta Was this translation helpful? Give feedback.
All reactions