[Composite] Support RTL navigation, Home/End keys#825
Merged
mj12albert merged 12 commits intomui:masterfrom Nov 19, 2024
Merged
[Composite] Support RTL navigation, Home/End keys#825mj12albert merged 12 commits intomui:masterfrom
mj12albert merged 12 commits intomui:masterfrom
Conversation
Netlify deploy preview |
6cbc53d to
769a89d
Compare
mj12albert
commented
Nov 15, 2024
Comment on lines
-181
to
-184
| // Wait for FocusManager `returnFocus` to execute. | ||
| queueMicrotask(() => { | ||
| elementsRef.current[nextIndex]?.focus(); | ||
| }); |
Member
Author
There was a problem hiding this comment.
@atomiks This broke a RadioGroup test... https://app.circleci.com/pipelines/github/mui/base-ui/4867/workflows/dbe5234b-0110-4b20-8b7e-d8dfd310df29/jobs/34622/parallel-runs/0/steps/0-106
Any idea why?
Member
Author
There was a problem hiding this comment.
The test breaks but it still works in the browser, I've separated this for now
769a89d to
af7ac7f
Compare
25940ee to
7f7132b
Compare
2b4dc8d to
a3a3554
Compare
This reverts commit 64661e9.
c575bdf to
6a4217b
Compare
atomiks
approved these changes
Nov 19, 2024
atomiks
reviewed
Nov 19, 2024
Comment on lines
+175
to
+185
| const toEndKeys = isRtl | ||
| ? { | ||
| horizontal: [ARROW_LEFT], | ||
| vertical: [ARROW_DOWN], | ||
| both: [ARROW_LEFT, ARROW_DOWN], | ||
| }[orientation] | ||
| : { | ||
| horizontal: [ARROW_RIGHT], | ||
| vertical: [ARROW_DOWN], | ||
| both: [ARROW_RIGHT, ARROW_DOWN], | ||
| }[orientation]; |
Contributor
There was a problem hiding this comment.
This could be a bit simpler by assigning const horizontalEndKey = isRtl ? ARROW_LEFT ? ARROW_RIGHT and same for start
ee60c98 to
3b05773
Compare
2351003 to
c65d478
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split from #763 to unblock #751
Closes #824
directionproperty that could be inherited from the HTMLdirattributeenableHomeAndEndKeysprop