-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Slider] Two Handles Defining the Range ποΈ #6337
Comments
I would like to take up this issue. |
Thanks for the suggestion. We have some past explorations with this range functionality @jeanservaas Could you share the past work and what you're exploring for data viz? |
I am extremely interested in such a component. I am especially curious about how it will be handled for smaller screens (e.g. 320px width)? The current single slider still shows the value right of the slider itself in such small formats. I wonder how this would be handled for a range slider as it would probably not work out the same way. |
Hey @designertyler! |
@janhassel I'm not aware of any dev/design efforts for this enhancement. I think "generally wanted but open for help" fits the bill, we see the value but don't have any current plans to implement. If your team has any extra bandwidth to contribute an enhancement for this, we'd be happy to work with you to get it in π |
Hi @tw15egan , |
Hi there @harsha0609, there has been no new development on this enhancement. |
@tay1orjones There has been discussion of such a range selection component for carbon charts, and @DianaStanciulescu and I have written an article on accessibility considerations for it. |
I've done some explorations for a range selector meant for a heatmap (in dataviz). Not finalized, and a bit of a different use case, but I attach it here in case it comes in handy at some point. |
For what it's worth, I've been able to build a seemingly fine working implementation (it's obviously not been extensively tested yet) on https://github.com/tajo/react-range. |
Hi all, it seems like many of us have built potential versions of this enhancement. This is my exploration for adding range to @janhassel, I know this is a pretty old issue, however; if you have some extra bandwidth I know the Cloud PAL team is looking to get this in soon. Morgana mentioned you regularly contribute to Cloud PAL. Thank you for that! Perhaps we could work together to contribute this back to Carbon? Update: We're doing it! π |
Update: I've created some documentation for the |
Please can anyone confirm is this implemented..do we have slider range component available in Carbon? |
Not yet @akanshag26βΒ we ran into some accessibility considerations that needed some additional design work and then I ran into a backlog of other work. Ideally once I can get back to a sprint where I can explore the issue further, we'll update on this thread. π |
@KevinCamelo Hi there :) |
Updates for everyone paying attention to this thread.
Stay tuned! |
Hello all. I presented an updated solution today at Carbon Design Office Hours. This solution offers an update to accessibility related issues that existed with the first iteration of range slider. Documentation: Following the meeting, a few changes were requested:Error States
Number Labels
Icons
Additional work to be done on this soon before! @mbgower might request your eyes on this soon just for an additional check based on the changes made today! Thank you all. |
Hi all π . Looking ahead to the implementation, questions for you all as I get familiar with the existing Would we be open to using an open source library for the implementation? I've been looking at noUiSlider which a co-worker has used successfully in the past. It does a great job with multiple handles, has many other features which we could expand into for future feature requests (more than two handles, connected handles, pips, etc.). Looks like there is precedent for this approach in the Would love to get some thoughts on this. |
@m4olivei Yes, but adding a dependency needs to be really thoughtfully considered. In the case of both flatpickr and downshift we have a tenuous relationship with these dependencies. In many ways they have outlived their usefulness and migrating to/away from implementations relying on third party dependencies (and keeping the dependencies up to date) has been a significant time sink. Additionally, many of them rely on inline styles which we cannot use to be compatible with CSP requirements of various teams using Carbon. I'm not sure in this case if the usage of a library would provide enough benefit to outweigh the maintenance concerns, but I think yes it's worth considering. |
Thanks @tay1orjones! That makes a lot of sense to me, expecially having just gone through some struggles with flatpickr, which is also used in the C4IBM repo (we ended up needing to patch it π¬). After considering it, playing with noUiSlider in the context of Carbon and working towards an in place enhancement, I feel that an in place enhancement is reasonable to accomplish without incorporating a third party library. Especially given that we're constrained here to only having to support two handles. Here is a very early draft of a range slider enhancement to the Slider component: #14297 Have not implemented any of the proposed design just yet, as it's still not finalized. In the meantime, I have been working on the underlying mechanics, using the existing design language. I have been able to get all the mouse and keyboard UX mostly working as expected. For anyone following along with, if you have early feedback on direction of the implementation, I'm totally open to that. |
Good morning all. We have some excellent updates on the status of range slider in #14297. @m4olivei has made some excellent development strides in translating the design to working code! I will be presenting this version of Range Slider to the Design System Adoption Guild on August 17th. If you're interested in attending, please sign up here for the meeting (IBMer only). Any feedback is appreciated here as well. |
Notes from DSAG on August 17, 2023Presentationβ Mural Looking for use cases and need and ensuring we have everything covered that we need to cover. Took WCAG minimum and maximum using arrows (thumbs). Airbnb never overlaps the thumbs. Autocorrection feedback options
Feedback and commentsAre handles same size or smaller than the original handles? From @thyhmdo Could add focus to the autocorrected range input when error message shows Any plans for fixed value step slider? Number preview addition adds something β not really focused on the min/max values. Handles are keyboard operable with same shortcuts that the slider already has. Difference from slider style but following WCAG β evaluated several examples. When you're focused on an input, is there a way to also switch the arrow to blue? Was just a thought to reinforce the connection between the input and the slider Next stepsVoting on the potential options ... voting with fluid/number etc. |
Hi all. @m4olivei and I met today and decided that the version currently in experimental should move forward βΒ with additional enhancements coming down the pipeline once we can get to it. I have made an issue for the tooltip enhancement that you can find in #14549. Thus, the last thing needed past moving forward in the coded experimental phase is providing design guidance in #14050. Will coordinate with Carbon for the creation of this design documentation. |
I think this is a really nice series of iterations towards an improved outcome. Awesome! |
PS, it looks like the heuristic for the mid-point for the 'move closest slider' may be a little off? It seems like it's biasing to the maximum slider being adjusted, even when the position is somewhat closer to the starting position. Maybe you have a factor where once one side is set the bias is to adjust the other one? I think that's fine (and maybe an improvement). Just wanted to point it out. |
Thanks for catching this @mbgower ! I had been errantly adjusting by the size of the handle favoring the upper handle. It should now be fixed. Note that in the case where the distance to each handle is the same, the algorithm picks the lower handle to break the tie. Also note that the preview link has changed: |
Summary
It would be of great if the slider component would support two handles to enable the user to define a range instead of just one value.
Desired UX and success metrics
If the developer enabled it, the user has two handles instead of one to control two numbers, presumedly minimum and maximum (to define a range).
Available extra resources
This is an example created by the WH team
Tasks
The text was updated successfully, but these errors were encountered: