Skip to content

Conversation

@cyyynthia
Copy link
Contributor

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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 24, 2025

Open in StackBlitz

npm i https://pkg.pr.new/reka-ui@1751

commit: 14edd30

@zernonia
Copy link
Member

Yo @cyyynthia ! I'm not sure what's the issue here?

The inverted vertical slider seems working fine for me. The pageDown is decreasing value, thus it's going up correctly. Do you mind clarify more the issue?

@cyyynthia
Copy link
Contributor Author

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.

@zernonia
Copy link
Member

It's by design that PageUp increase the value, thus in the case of inverted, min at top, max at bottom, PageUp will cause the thumb to go down.

image

@cyyynthia
Copy link
Contributor Author

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.

@zernonia
Copy link
Member

zernonia commented Mar 28, 2025

Ahhh you are right @cyyynthia , that is indeed confusing.
Perhaps ArrowUp/ArrowDown should be updated Increments/decrements by the step value depending on orientation.

@cyyynthia
Copy link
Contributor Author

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.

@cyyynthia cyyynthia force-pushed the fix/page-up-down-slider-inverted branch from 48ed7c4 to d51ba39 Compare April 2, 2025 15:19
@cyyynthia
Copy link
Contributor Author

Well, the typo doesn't come from my changes >:)

I added a bit of clarification for keyboard controls, as discussed.

@cyyynthia cyyynthia force-pushed the fix/page-up-down-slider-inverted branch from d51ba39 to 14edd30 Compare April 30, 2025 19:04
@cyyynthia
Copy link
Contributor Author

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 😄

Copy link
Member

@zernonia zernonia left a 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! 😁

@zernonia zernonia merged commit 570c587 into unovue:v2 May 19, 2025
5 checks passed
@cyyynthia cyyynthia deleted the fix/page-up-down-slider-inverted branch May 19, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants