-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pickers] Fix keyboard navigation with yearsOrder="desc"
and direction="rtl"
#14682
[pickers] Fix keyboard navigation with yearsOrder="desc"
and direction="rtl"
#14682
Conversation
Deploy preview: https://deploy-preview-14682--material-ui-x.netlify.app/ |
Thanks for the quick fix !
The next release is next Thursday, so we should be able to have 1-2 tests by then 👍 |
Thank you for the super quick fix! 🙏 As Flavien has said, by default, we would release at the end of next week. |
I got the coverage added. The tests may not be the most beautiful, but the two cases of left and right in RTL mode definitely break in the previous version, so this could do the job! There weren't that many keyboard nav tests in the project to take a model from but this is surely a good addition. Happy to hear any feedback about the approach. One interesting thing I ran into was that an additional Enter keyboard press would not trigger the onChange as expected, but it wasn't actually needed here because the focus change can be tested just by checking the active element. Now that I said that I realize I can remove that event from the tests. |
yearsOrder="desc"
and direction="rtl"
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.
Looks good to me
Thanks for taking care of it!
yearsOrder="desc"
and direction="rtl"
yearsOrder="desc"
and direction="rtl"
…irection="rtl"` (mui#14682)
Hi @LukasTy @MBilalShafi ,
A thousand apologies, I had tested this during development but when yearsOrder was changed from a boolean to
asc
|desc
the RTL horizontal direction check got borken.Still works fine with the default settings but if
yearsOrder='desc'
is used with rtl now the left/right navigation is backwards when the theme is right to left.Finally found a good place to test these under the localization docs page and this small change should make everything right (/x/react-date-pickers/adapters-locale/).
I will work on an update to the automated tests too that would catch this, but this quick fix for now.