navigate to Search page after fully closing modal on keyboard shortcut#16381
Conversation
|
@hayata-suenaga @Santhosh-Sellavel One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@situchan The input doesn't seem to be focused on the EmojiPicker navigating using Screen.Recording.2023-03-22.at.1.13.28.AM.mov |
FABScreen.Recording.2023-03-22.at.1.28.45.AM.movAdd attachment modalScreen.Recording.2023-03-22.at.1.29.17.AM.movContext MenuScreen.Recording.2023-03-22.at.1.30.09.AM.movDelete ModalScreen.Recording.2023-03-22.at.1.31.48.AM.movStart a call modalScreen.Recording.2023-03-22.at.1.34.01.AM.movAttachment ModalScreen.Recording.2023-03-22.at.1.35.07.AM.movKeyboard shortcuts ModalScreen.Recording.2023-03-22.at.1.36.45.AM.mov |
|
I will continue testing... |
|
@situchan Mac/Chrome and cloned your branch |
We discussed here, found root cause and solution. @getusha please pull again from https://github.com/situchan/Expensify/tree/fix/15276-search-focus-shortcut |
|
@situchan Will test it again, thanks! |
I don't see any suggestions. Did you submit? |
|
@getusha good suggestions. pushed updates. please check |
|
@situchan I confirm this is fixed now Screenshots/VideosWeb DesktopScreen.Recording.2023-03-22.at.10.18.04.AM.movMobile Web - ChromeScreen.Recording.2023-03-22.at.6.23.49.AM.movMobile Web - SafariScreen.Recording.2023-03-22.at.6.25.46.AM.movAndroidScreen.Recording.2023-03-22.at.10.01.47.AM.mov |
|
@getusha thanks for testing. If you've done review, let's move to next step. So ping @Santhosh-Sellavel ready for review |
|
@Santhosh-Sellavel kindly bump for review |
I was just waiting for the ping from @getusha as you said above! |
|
@Santhosh-Sellavel go ahead please, tested on several modals and it was working well, also resolved some issues thanks! 👍 |
There was a problem hiding this comment.
Seems to be working well for most cases.
Steps
- Press CMD+K will open Search Page focus is set ✅
- Now Press CMD+Shift+K will New Group is set ✅
- Now Press CMD+K will open Search Page focus is not set ❌
Screen.Recording.2023-03-24.at.12.21.59.AM.mov
cc: @hayata-suenaga
|
@hayata-suenaga Let me know what should we do about this one #16381 (review), thanks! |
Adding my cents here: |
|
Also when the shortcut is used twice, it causes the focus be lost. Consequently, returning from the New group page does not trigger the focus, which means that this issue falls outside the scope of this. Screen.Recording.2023-03-23.at.12.18.40.PM.movIn my opinion, it would be better to handle the issue separately. This can be done by ensuring that the expected behavior is to close the previous page before opening a new one and preventing the navigation using the same shortcut twice or more, if it is decided that the issue is worth fixing. |
|
Yeah, I got that too. |
|
@Santhosh-Sellavel yes I agree that this issue seems to be out of scope of the original issue. |
|
@Santhosh-Sellavel do you have more feedback for us to address? |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-03-25.at.3.47.32.AM.movMobile Web - Chrome & Mobile Web - SafariScreen.Recording.2023-03-25.at.3.44.16.AM.movDesktopDesktop_short.moviOS & AndroidNative_Search.mov |
Santhosh-Sellavel
left a comment
There was a problem hiding this comment.
LGTM tests well. All you @hayata-suenaga!
|
✋ 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 https://github.com/hayata-suenaga in version: 1.2.90-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.90-7 🚀
|
| * @param {Boolean} isNavigating | ||
| */ | ||
| hideEmojiPicker(isNavigating) { | ||
| if (isNavigating) { this.onModalHide = () => {}; } |
There was a problem hiding this comment.
This clearing of function caused a bug when navigating to the search page. More details here #23959


Details
Navigate to new page only after modal is fully closed, which means focus is ready to be transferred.
Fixed Issues
$ #15276
PROPOSAL: #15276 (comment)
Tests
Same as QA step
Offline tests
Same as QA step
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
mchrome.mov
Mobile Web - Safari
msafari.mp4
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mov