-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix: Auto focus on mWeb when open report with enough chat history #18699
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
Fix: Auto focus on mWeb when open report with enough chat history #18699
Conversation
|
@flodnv @0xmiroslav 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] |
|
@0xmiroslav Bump, could you help to check this PR |
|
reviewing now @dukenv0307 please pull from main |
|
@0xmiroslav Updated. |
|
@dukenv0307 I understand it's known issue that focus not working well on mSafari but still you should add screenshot. |
And the title is wrong. |
I created a screenshot but I forgot to update it in comment. I just updated, please check again |
|
Desktop, iOS, Android screenshots are part of mSafari. please fix |
|
@0xmiroslav I fixed it. |
| // React Native will retain focus on an input for native devices but web/mWeb behave differently so we have some focus management | ||
| // code that will refocus the compose input after a user closes a modal or some other actions, see usage of ReportActionComposeFocusManager | ||
| this.willBlurTextInputOnTapOutside = willBlurTextInputOnTapOutside(); | ||
| this.shouldFocusInputOnScreenFocus = canFocusInputOnScreenFocus(); |
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.
Let's add comment what's this for, similar to willBlurTextInputOnTapOutside comment
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.
@0xmiroslav I just updated.
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.
We want consistent auto focus behavior on input between native and mWeb so we have some auto focus management code that will prevent auto focus on existing chat for mobile devices
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.
@0xmiroslav Thanks for suggestion, I updated.
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.movThere are still inconsistency issues on autofocus behavior:
This is will be improved after navigation refactor which swaps drawer for stack navigator, so out of scope. |
Co-authored-by: Miroslav Stevanovic <97473779+0xmiroslav@users.noreply.github.com>
0xmiroslav
left a comment
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!
All yours @flodnv
flodnv
left a comment
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.
Thanks! Can you also please do all the same tests as what we did in #14230? 🙇
|
I did full test in #14230 and work as expected. Especially:
|
|
Excellent, thanks! |
|
✋ 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/flodnv in version: 1.3.14-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.14-14 🚀
|
Details
The cursor absent in the chat input field
Fixed Issues
$ #17187
PROPOSAL: #17187 (comment)
Tests
Offline tests
Same above
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
Screencast.from.10-05-2023.11.06.07.webm
Mobile Web - Chrome
Record_2023-05-10-11-07-51.mp4
Mobile Web - Safari
original-5DFFE1FB-23BE-4212-9720-E22D8EB736EE.1.mp4
Desktop
Screen.Recording.2023-05-10.at.17.05.27.mov
iOS
Screen.Recording.2023-05-10.at.17.22.45.mov
Android
17187.mp4