-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement Spectrum slider components #1070
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
Labels
Comments
( |
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Oct 6, 2020
…layValue Pressing the displayValue should focus the corresponding input.
5 tasks
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Nov 3, 2020
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Nov 3, 2020
…layValue Pressing the displayValue should focus the corresponding input. fix(adobe#1070) A11y: updates per code review Co-Authored-By: Robert Snow <[email protected]>
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Nov 3, 2020
…pdate Slider (hook) stories Co-Authored-By: Robert Snow <[email protected]>
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Nov 4, 2020
…necessary Co-Authored-By: Robert Snow <[email protected]>
dannify
pushed a commit
that referenced
this issue
Dec 16, 2020
* fix(#1070) A11y: add minimum/maximum labels, use output for displayValue Pressing the displayValue should focus the corresponding input. fix(#1070) A11y: updates per code review Co-Authored-By: Robert Snow <[email protected]> * fix(#1070) refactor minimum/maximum labels into useSliderThumb/update Slider (hook) stories Co-Authored-By: Robert Snow <[email protected]> * fix(#1070) A11y: remove slider/intl/index.js which is no longer necessary Co-Authored-By: Robert Snow <[email protected]> * Slider refactoring * Fix translation files * fix(i18n): Apply suggestions from code review Co-authored-by: Daniel Lu <[email protected]> * refactor(per code review): remove duplicate style declaration Co-authored-by: Michael Jordan <[email protected]> Co-authored-by: Robert Snow <[email protected]> Co-authored-by: Michael Jordan <[email protected]> Co-authored-by: Daniel Lu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🙋 Feature Request
Implement the Spectrum
Slider
andRangeSlider
components using the existinguseSlider
anduseSliderThumb
hooks.💁 Possible Solution
The API should look like this:
The existing
useSlider
anduseSliderThumb
hooks can be used to implement this. These hooks allow an arbitrary number of thumbs per slider, but Spectrum will be more restricted. TheSlider
component will support only one thumb with avalue
prop that is a single number, and theRangeSlider
component will support two thumbs with avalue
prop that is a range object with astart
andend
property. This should be able to be normalized within the Spectrum components rather than creating new ARIA/Stately hooks, but we could move those out later if we find it a common shortcut people need.Intl.NumberFormat should be used for number formatting. The option in Spectrum to show the +/- sign is available in the
unitDisplay
format option, but it is not yet implemented in Safari so we may need to polyfill it (TBD). Also the unit options don't includepx
, so we will potentially need to find an alternate solution to that later on.💻 Examples
See https://spectrum.adobe.com/page/slider/ and contributions (internal) for design mocks, and https://opensource.adobe.com/spectrum-css/slider.html for the existing Spectrum CSS implementation.
🧢 Your Company/Team
RSP
The text was updated successfully, but these errors were encountered: