-
Notifications
You must be signed in to change notification settings - Fork 470
Feature/rangeslider #2983
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
base: main
Are you sure you want to change the base?
Feature/rangeslider #2983
Conversation
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.
Pull request overview
This PR introduces a new RangeSlider control to the .NET MAUI Community Toolkit, allowing users to select a range of values using two adjustable thumbs. The implementation uses two standard Slider controls to ensure proper keyboard navigation and accessibility support.
Key Changes:
- Added
RangeSlidercontrol with dual-thumb functionality for range selection - Implemented customizable properties for track colors, thumb colors, sizes, and step increments
- Added focus mode handling to improve usability when interacting with either thumb
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| RangeSlider.shared.cs | Core implementation of the RangeSlider control with bindable properties, layout logic, and event handlers |
| RangeSliderFocusMode.cs | Enum defining focus modes (Default, Lower, Upper) for thumb interaction |
| RangeSliderDefaults.shared.cs | Default values and styling constants for RangeSlider properties |
| RangeSliderViewModel.cs | ViewModel with observable properties for sample page demonstrations |
| RangeSliderPage.xaml.cs | Code-behind for the RangeSlider sample page |
| RangeSliderPage.xaml | XAML markup demonstrating various RangeSlider configurations |
| ViewsGalleryViewModel.cs | Registration of RangeSlider sample in the views gallery |
| MauiProgram.cs | Service registration for RangeSliderPage and RangeSliderViewModel |
| AppShell.xaml.cs | Navigation routing registration for RangeSliderPage |
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Primitives/Defaults/RangeSliderDefaults.shared.cs
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/Pages/Views/RangeSlider/RangeSliderPage.xaml.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/Pages/Views/RangeSlider/RangeSliderPage.xaml.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/Pages/Views/RangeSlider/RangeSliderPage.xaml
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Primitives/RangeSliderFocusMode.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Views/RangeSliderViewModel.cs
Show resolved
Hide resolved
pictos
left a comment
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.
Hey, thanks for this feature, I leave a couple of comments
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
src/CommunityToolkit.Maui.Core/Primitives/Defaults/RangeSliderDefaults.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Primitives/Defaults/RangeSliderDefaults.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
samples/CommunityToolkit.Maui.Sample/ViewModels/Views/RangeSliderViewModel.cs
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Views/RangeSliderViewModel.cs
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
src/CommunityToolkit.Maui.UnitTests/Views/RangeSlider/RangeSliderTests.cs
Outdated
Show resolved
Hide resolved
…MinimumMaximumValues_ShouldStickToContract.
|
@stephenquan , from our CI
|
|
Thanks @pictos, I had a look at the failing unit test, but I don't understand. I cannot see any connection between this new RangeSlider feature and the ValidationBehavior errors. |
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.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Views/RangeSlider/RangeSlider.shared.cs
Outdated
Show resolved
Hide resolved
…lue (based on Copilot feedback)
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.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Description of Change
New Feature: Introduced a
RangeSlidercontrol in the CommunityToolkit.Maui library.Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information
RangeSlidercontrol in the CommunityToolkit.Maui library.RangeSliderusing two standardSlidercontrols to leverage built-in keyboard navigation and accessibility features.RangeSliderDefaultsfor default values and styling.RangeSliderFocusModeenum for thumb focus handling.RangeSliderPageandRangeSliderViewModelinAppShell.xaml.csandMauiProgram.cs.RangeSliderPage.xaml) demonstrating different configurations:RangeSliderViewModelwith observable properties for binding.