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

ux improvement for range selector #964

Merged
merged 3 commits into from
Feb 23, 2017
Merged

ux improvement for range selector #964

merged 3 commits into from
Feb 23, 2017

Conversation

liakamp
Copy link
Contributor

@liakamp liakamp commented Feb 17, 2017

The RangeSlider on a touchscreen (mobile/tablet) was extremely difficult to use, because you had to drag the two thumbs who were very small for touch. I added a grid containing the thumb border in the thumb template, a bit bigger with a transparent background. Now it is a lot easier to manipulate the thumbs using touch.
Also I modified the slider's sample page a bit because now the control requires more height and I had to adjust the alignment of the min/max indicators.

@dnfclas
Copy link

dnfclas commented Feb 17, 2017

Hi @liakamp, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

Copy link
Contributor

@deltakosh deltakosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
while I'm understanding the change, I would recommend to only change the template in your app.

@@ -8,7 +8,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:RangeSelector">
<Grid Height="24">
<Grid Height="40">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello unfortunately this is a breaking change.
People who developed applications using this control don't expect this to change suddenly.

@skendrot
Copy link
Contributor

I see this as a bug. If it is difficult to use via touch, then it needs to be fixed. It should be more aligned with the Slider control which has a MinHeight of 44. And it you want to change it you need to restyle the control.

I tested this today and can confirm that it's difficult to use the control on a touch device

@deltakosh
Copy link
Contributor

I agree with the difficulty but I won't flag it as bug. It is better with than without for sure.
I do not want to introduce breaking change if we are not really force to do it.

To avoid issue, we can either think about having a Boolean to control this behavior for instance

@liakamp
Copy link
Contributor Author

liakamp commented Feb 17, 2017

I also think it is a bug, but @deltakosh I understand your concerns. I could add a dependency property, something like "IsTouchOptimized" to control this height, but still at some point shouldn't this be default behavior?

@deltakosh
Copy link
Contributor

For sure. But one of the promise of the toolkit is that you can trust it to build your app. Every time a braking change is introduced we break this promise.
When moving to 2.0, we will be able to introduce breaking changes.

For now I would not like to as this one is easy to fix by changing the style.

But we can at least introduced the DP and when moving to 2.0 just flag it as deprecated and fix the control for good

Thoughts?

@liakamp
Copy link
Contributor Author

liakamp commented Feb 17, 2017

@deltakosh you are right. I have once used a library that broke at some point, it was frustrating. I will add the DP and then it will be easy to set this as default in 2.0 or any other release, when the time is right.

@deltakosh
Copy link
Contributor

Thank you!

@liakamp
Copy link
Contributor Author

liakamp commented Feb 17, 2017

@skendrot thanks for the info, I will also set this to 44 instead of 40 like the native Slider

@liakamp liakamp changed the title ux improvement for range slider ux improvement for range selector Feb 18, 2017
{
_outOfRangeContentContainer.Height = _minThumb.Height = _maxThumb.Height = 24;
_minThumb.Width = _maxThumb.Width = 8;
_minThumb.Margin = _maxThumb.Margin = new Thickness(-8, 0, 0, 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not think of a more elegant solution here, there is no relation between the two cases (44-> 24, 20->8), any thoughts?

@liakamp
Copy link
Contributor Author

liakamp commented Feb 18, 2017

I added the DP, default is false so no breaking changes if someone already has it


if (IsTouchOptimized)
{
_outOfRangeContentContainer.Height = _minThumb.Height = _maxThumb.Height = 44;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just check if these properties are not null

@deltakosh deltakosh merged commit cc87da1 into CommunityToolkit:dev Feb 23, 2017
@liakamp liakamp deleted the rangeslider-improvements branch February 23, 2017 19:16
@liakamp liakamp mentioned this pull request Feb 20, 2018
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants