-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat: implement useArrowKeyFocusManager in EmojiPickerMenu #34581
feat: implement useArrowKeyFocusManager in EmojiPickerMenu #34581
Conversation
309f463
to
773787f
Compare
Thanks, the fix works nicely! Can you fix the lint error too?
Ah yeah I see the same too now (asked on Slack about it). I don't think it's really within scope of this PR to fix unless you find something obvious! |
Following up, there's an open issue #34522 for the Android layout bug I reported, so no need to fix that here! |
great to hear there is already a ticket for a layout bug 🙌 I just pushed an update that should fix the linting error |
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.
LGTM!
@MariaHCD I think we're good to merge this as @gedu and @adhorodyski already reviewed? |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
👋 this is causing this deploy blocker: #35720 Summary: In mobile, now the Search input inside the emoji popup gets focused automatically causing the keyboard to open. The autofocus did only happen in big screens in the past. |
I prepared a revert here in case this is the path you want to follow: #35737 (comment), but didn't merged it yet in case you want to try to fix this. |
hi @aldo-expensify trying to fix it now, so hopefully we'll avoid reverting |
opened a PR with a fix #35796 |
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.36-5 🚀
|
Coming from #36059, we missed a case for allowing navigation with left/right arrow keys within the search input whilst it is focused. |
let newFocusedIndex = currentFocusedIndex; | ||
|
||
while (disabledIndexes.includes(newFocusedIndex)) { | ||
newFocusedIndex = newFocusedIndex > 0 ? newFocusedIndex - 1 : maxIndex; | ||
newFocusedIndex -= allowHorizontalArrowKeys ? itemsPerRow : 1; | ||
if (newFocusedIndex < 0) { |
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.
}); | ||
}, [allowHorizontalArrowKeys, disableCyclicTraversal, disabledIndexes, maxIndex]); | ||
|
||
useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.ARROW_LEFT, arrowLeftCallback, arrowConfig); |
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.
This cause a regression #38076
FYI, This PR caused this issue: #47272. You can find more info in this comment: #47272 (comment) |
Details
Fixed Issues
$ #30911
$ #32644
PROPOSAL:
Tests
Offline tests
n/a
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
ANDROID.mov
Android: mWeb Chrome
ANDROID.WEB.mov
iOS: Native
IOS.mov
iOS: mWeb Safari
IOS.WEB.mov
MacOS: Chrome / Safari
WEB.mov
MacOS: Desktop
DESKTOP.mov