Fix composer not focused when pressing key after coming from WS share code page#46855
Conversation
|
@ZhenjaHorbach Please 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] |
Reviewer Checklist
Screenshots/VideosAndroid: Native2024-08-06.12.22.01.movAndroid: mWeb Chrome2024-08-06.11.54.29.moviOS: Native2024-08-06.11.40.50.moviOS: mWeb Safariweb-ios.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
@bernhardoj 2024-08-06.11.42.19.mov |
|
And it's strange |
That's because we dismiss the modal. It's a common pattern to dismiss the RHP when going to report screen. App/src/libs/actions/Report.ts Lines 2083 to 2097 in 290a9d9 Otherwise, the App/src/libs/Navigation/AppNavigator/AuthScreens.tsx Lines 181 to 191 in 3775dae
That's weird, the keyboard opens just fine from my side android.mp4 |
Sorry 2024-08-06.11.54.29.movBut as far as I can see in your video |
This actually sounds like a good idea ! |
Do you mean the auto focus? It'll only auto focus if the chat is empty. From your video, looks like the chat isn't loaded yet, so perhaps it's detected as an empty chat.
Updated. I didn't remove the beforeRemove to reduce risk of regressions. Please check! |
|
Yes |
| return isFocused; | ||
| } | ||
|
|
||
| if (route.name === NAVIGATORS.FULL_SCREEN_NAVIGATOR) { |
There was a problem hiding this comment.
Can you add a bit comment as in other conditions?
There was a problem hiding this comment.
I just retested after not dismissing the RHP, this fix isn't needed anymore, so I remove it.
There was a problem hiding this comment.
I confirm, everything works
Thanks for cleaning the code
|
LGTM |
|
✋ 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/techievivek in version: 9.0.18-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.18-10 🚀
|
Details
The composer will be focused if there is no modal visible anymore, but when we open the share code page and go to #admins, the RHP is not dismissed. This PR fix it.
Fixed Issues
$ #46206
PROPOSAL: #46206 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
(For web/desktop)
5. Click anywhere to remove focus from composer
6. Press any key
7. Verify the composer is focused with the green outline and the key character is added to the composer
(For iOS/Android/mWeb)
8. Press the composer
9. Verify the composer is focused with the green outline
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: Native
android.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4