material-components / material-components/material-components-android
[Slider] Allow null value
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
We don't want the slider to always have a selected value -- we're using it in a context where the end user could choose to leave it blank.
**Describe the solution you'd like**
When the slider has a `null` value, don't display the handle. Display the slider itself as though the bottom of the range were selected (none of it shaded in).
**Describe alternatives you've considered**
We previously extended the slider to hide the handle when the backing value is `null` but it's a brittle approach that broke with the latest version of the component: https://github.com/getodk/collect/pull/6987
Thanks for the consideration!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named in the issue. Start by locating the Android Slider component and its existing value and handle-rendering tests. Confirm the null-value behavior and run the relevant slider tests to verify that the handle is hidden and the track is unshaded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100