-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Components: update the rounding logic for shift
key increments in NumberControl
and RangeControl
#34817
Comments
Hey @stokesman , can you please check this issue's description and confirm it's in line with what you initially described in #34542 ? |
Thanks for making the issue @ciampo 👍 It captures the intent. I put in the minor edit to say the shift-step will be applied with the same rounding as the base step. |
Update: after #35020 and #34542, the situation is as follows:
We should now think about the next steps:
Tagging here a few folks that may want to share their opinion here: @jasmussen @diegohaz @mirka @jorgefilipecosta @ntsekouras @aaronrobertshaw @andrewserong |
Thanks for the ping and for writing up the current state of things!
Personally I'd prioritise these over following up with the shift-stepping behaviour in NumberControl. For next steps around shift-stepping, I'd lean toward keeping things as they currently are. I don't think it's worth the trouble adding it back into RangeControl (since it doesn't really seem that beneficial for that component), and if the behaviour is currently working okay in NumberControl, there probably isn't any urgency in removing it. That said, if it isn't something used by users, it's nice to remove unnecessary code and simplify things where we can. But I don't feel strongly about it if anyone has other preferences 🙂
That sounds like a good idea to me 👍 |
I personally agree with both opinions. Next steps then look like:
|
What
Update the rounding logic for when the user increments/decrements the value in
NumberControl
andRangeControl
components while holding theshift
key.Currently, the result of a
shift
increment/decrement is rounded to the nearest multiple of the shift step value.Why
Make the
shift
increment more predictable for theNumberControl
andRangeControl
components by applying the shift step increment/decrement with the same rounding as the base step operation.A/C
NumberControl
is the only component using theuseJumpStep
hook. We should consider removing that function, and replace it with a new utility that enables sharing the new shift-stepping, rounding logic betweenNumberControl
andRangeControl
The text was updated successfully, but these errors were encountered: