-
Notifications
You must be signed in to change notification settings - Fork 1.4k
RangeSelector: Moving past second handle #4031
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
RangeSelector: Moving past second handle #4031
Conversation
Thanks stephtr for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
FYI @RosarioPulella you've been looking at RangeSelector a lot, so want to take an initial look? |
Yep, I was thinking maybe we should hold this until the UI tests #4007 are merged, and see if this breaks any of them and if we can add more UI test. I will try to get the UI tests done soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @stephtr for the work. As of now, it looks good to me 🚀 Will test again once Rosario's PR is merged.
@stephtr so my UITest PR had to go more in the direction of fixing the UITests infra. I have yet to add more significant tests for the control, but there is a space to do that now. While I am going to add more tests for this control, do you want to add any more specifically around this behavior? Since there are not many other UITests, if you need help with writing UITests just let me know. A few tests right now will serve as good examples for the rest of the community. |
I don't know whether this behavior wouldn't be too specific (and anyway not specified) for being included in UI tests. If you wish, I could give it a try somewhen in the next few days. |
@stephtr never hurts to have more tests. It also means that it helps protect your contribution from regression if other logic in the control is updated or refactored. That way your feature can be tested and ensure that it's still working now and in the future! |
@stephtr wanted to check if you were still planning to add a test or if we should finish a review? Thanks! |
I gave it a look, but besides not being able to run the existing tests for the RangeSelector, due to lacking time and not being sufficiently familiar with programmatically spoofing the drag events, I wasn't able to do it (yet). |
@RosarioPulella just want to take a look at this one when you're back? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With everything going on I was not able to to make UITests for this, but from my manual testing, it works well. We might want to consider making this behavior configurable in the future though, I think that having the handles stop each other might be desired in some cases.
Thanks @stephtr for the fix! Sorry it took a while to get merged in. |
Fixes #4029
When grabbing one thumb of the
RangeSelector
, its movement was restricted by the position of the other thumb; this PR makes it move beyond, automatically moving also the second thumb.PR Type
Feature
What is the current behavior?
When grabbing one thumb of the
RangeSelector
, its movement was restricted by the position of the other thumb.What is the new behavior?
When moving for example the
RangeStart
thumb beyond theRangeEnd
one, the latter gets also moved. This is also more consistent with the keyboard arrow key behaviour when operating the control.PR Checklist
Please check if your PR fulfills the following requirements:
Other information
One might also think about getting rid of the
min
andmax
argument ofDragThumb
;SyncThumbs
, when being called from RangeSelector.Input.Key is the only one relying on those arguments, even though I don't know, whether that's actually necessary.