fix: Change emoji navigation with arrow keys#7127
Conversation
|
@rushatgabhane I've started with this PR. I have a question, can we use App/src/pages/home/report/EmojiPickerMenu/index.js Lines 373 to 383 in 913bd46 I need to be able to set the cursor to the end of the string. At the moment in |
|
Yeah sure, go ahead |
…oji-right-arrow-key
|
The I need this resolved because we want the emoji to be highlighted only if the cursor is at the end of the string. Once this is resolved rest is done. |
Just to clarify, we only wanna go to the first emoji when cursor is at the end of search query.
As mentioned in the issue description |
I think we should skip it then. React Native has an open issue on controlled selection react/react-native#29063 Alternative approachWhen search is refocused, we should highlight the search query, so it can be replaced by typing. This can be achieved by |
That is what is handled with ArrowUp that the whole string is selected. This can be done. |
@rushatgabhane Looks like I was wrong. This isn't how
While the second one is easy, I feel we might need the |
|
Gothu, but to verify.
Umm, I think you can check if cursor is at end using |
@rushatgabhane Yeah the updated PR covers the above cases. |
luacmartins
left a comment
There was a problem hiding this comment.
Just left a small comment. Otherwise LGTM and tests well. Great work @mananjadhav!
rushatgabhane
left a comment
There was a problem hiding this comment.
Nice work! Minor suggestions
rushatgabhane
left a comment
There was a problem hiding this comment.
LGTM! 🎉
cc: @luacmartins
|
Thanks! @mananjadhav and @parasharrajat! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by @luacmartins in version: 1.1.30-4 🚀
|
|
🚀 Deployed to production by @chiragsalian in version: 1.1.31-1 🚀
|
Details
Fixed Issues
$ #7035
Tests
ArrowRightto ensure that it selects the first emoji when the cursor is at the end of the stringArrowDownshould ensure that it goes to the first emoji irrespective of the cursor positionArrowUpandArrowLeftwould select the text in the input and rest of the cursor works fine.QA Steps
right arrowkeyleft arrow, it should focus the search input and select the textTested On
Screenshots
Web
web-emoji-arrow-keys.mov
Mobile Web
NA
Desktop
desktop-emoji-arrow-keys.mov
iOS
NA
Android
NA