-
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
Fix: Auto focus on mWeb when open report with enough chat history #18699
Fix: Auto focus on mWeb when open report with enough chat history #18699
Conversation
@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. |
@@ -197,9 +198,10 @@ class ReportActionCompose extends React.Component { | |||
// 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>
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
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 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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
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