-
Notifications
You must be signed in to change notification settings - Fork 1.2k
useColorSlider should increment/decrement by channel pageSize using PageUp/PageDown #2664
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
Comments
majornista
added a commit
that referenced
this issue
Dec 9, 2021
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
5 tasks
majornista
added a commit
that referenced
this issue
Dec 9, 2021
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max. @trivial fix lint error
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Dec 9, 2021
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
majornista
added a commit
that referenced
this issue
Dec 9, 2021
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Dec 9, 2021
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
5 tasks
majornista
added a commit
that referenced
this issue
Jan 26, 2022
majornista
added a commit
that referenced
this issue
Jan 26, 2022
Per https://github.com/adobe/react-spectrum/pull/2666/files#r792201596, verify that Home/PageDown at 0 and End/PageUp at 255 won't cause onChange and onChangeEnd to be called.
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Feb 14, 2022
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Feb 18, 2022
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Feb 18, 2022
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
majornista
added a commit
to majornista/react-spectrum-v3
that referenced
this issue
Feb 24, 2022
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
majornista
added a commit
that referenced
this issue
Feb 24, 2022
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
majornista
added a commit
that referenced
this issue
Feb 28, 2022
majornista
added a commit
that referenced
this issue
Feb 28, 2022
- Omit change events when value doesn't change. - Refine snapValueToStep for incrementing or decrementing from max.
majornista
added a commit
that referenced
this issue
Feb 28, 2022
majornista
added a commit
that referenced
this issue
Mar 1, 2022
…Size If the channel range step is less than 1, like 0.01, and stepSize is not passed as a prop, the slider will always increment or decrement by 1.
majornista
added a commit
that referenced
this issue
Mar 3, 2022
majornista
added a commit
that referenced
this issue
Mar 3, 2022
…events Also, simplify snapValueToStep.
majornista
added a commit
that referenced
this issue
Mar 3, 2022
snapValueToStep always starts from minValue.
snowystinger
pushed a commit
that referenced
this issue
Mar 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug Report
useColorSlider PageUp/PageDown keys increment or decrement by (max-min) / 10, which is the default behavior for a native input. However, color channels have a
pageSize
that differs depending on the channel. For example, for RGB values the pageSize is16
, a factor of256
, and for Hue, thepageSize
is15
, a factor of360
.We also need to ensure that both onChange and onChangeEnd fire with PageUp/PageDown/Home/End
🤔 Expected Behavior
ColorSlider should increment by the pageSize, 16.
😯 Current Behavior
Instead it navigates by 255 / 10, which rounds to 26.
💁 Possible Solution
See #2661 and 4ce326f
🔦 Context
Related to #2570.
Depends on #2661
💻 Code Sample
🌍 Your Environment
🧢 Your Company/Team
Adobe/Accessibility
🕷 Tracking Issue (optional)
The text was updated successfully, but these errors were encountered: