-
-
Notifications
You must be signed in to change notification settings - Fork 463
fix: correct direction for PageUp/PageDown when slider is vertical inverted #1751
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
fix: correct direction for PageUp/PageDown when slider is vertical inverted #1751
Conversation
commit: |
|
Yo @cyyynthia ! I'm not sure what's the issue here? The inverted vertical slider seems working fine for me. The |
|
In an inverted vertical slider, the min value is at the top and the maximum value at the bottom. The directional arrows correctly reflect this direction change, however the PageUp/Down don't. |
|
Then the doc for the arrow up & down is incorrect too, as they do properly invert controls in this scenario. It is very confusing that the arrows behave as expected and make the slider correctly go up, when the page up control does not, while they should for the same reason that the controls are inverted for the horizontal bar. |
|
Ahhh you are right @cyyynthia , that is indeed confusing. |
|
Nonetheless, I do think PageUp and PageDown should match the behavior of ArrowUp and ArrowDown ; especially considering the fact that the APG describes these two by referencing them to ArrowUp and ArrowDown. Also, the documentation of the keys is unfortunately quite vague ; horizontal sliders have Left/Right arrows inverted but Up/Down are intact, and vertical sliders have Up/Down inverted but not Left/Right. Clearly explaining the cases in which it's inverted might be beneficial for clarity. |
48ed7c4 to
d51ba39
Compare
|
Well, the typo doesn't come from my changes >:) I added a bit of clarification for keyboard controls, as discussed. |
d51ba39 to
14edd30
Compare
|
Hi there, are there any updates on this? Either positive or negative, I'd be happy to change things or further discuss anything that might be a blocker for this PR 😄 |
zernonia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yoo @cyyynthia ! Apology for the delayed review 🙏🏼 Yeah after your changes I think it brings much more clarity, and anticipated behavior. Happy to merge this! 😁

Also added relevant tests, made useForwardProps a tad bit more robust when props are added (which I think is only affecting testing QoL), and made Slider able to react to prop changes.