-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Prevent autofocus/refocus on small screen on the report page #56396
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
Prevent autofocus/refocus on small screen on the report page #56396
Conversation
@jayeshmangwani 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: NativeAndroid.movAndroid: mWeb Chromemweb-chrome.moviOS: NativeiOS.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@bernhardoj, can we please update the QA step and add a note that after this PR, we are updating all cases where the composer for mobile devices should not be auto-focused? I believe some TestRail tests expect the input to auto-focus on mobile devices, which may lead to deployment blockers. |
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 🚀
Done. Btw, can we hold until #56358 is solved? That issue is only reproducible when the composer is refocused after sending a password-protected PDF. This PR hasn't fixed the refocus behavior when sending attachment yet. After that issue is fixed, I'll try to fix the refocus behavior after sending an attachment. |
While waiting for the other PR, I tried to find the root cause of why the composer was focused after sending an attachment. This is because we focus on the composer every time the app comes from the background. App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx Lines 741 to 748 in 5ddef34
In our case, when selecting an attachment, the app goes to the background, and when we back to the app, the app goes to the foreground (active) again. Do we want to keep this behavior? android.mp4 |
IMHO, composer shouldn't be the focus, but I'll defer to @shawnborton and @marcochavezf. |
Thanks for the update! I'll re-review this PR once the other PR is merged. |
Agree, we shouldn't auto focus for the user there. |
👋🏽 This is the PR we're waiting for, right? |
👋🏽 This is the #56748 we're waiting for, right? Yes, correct |
I've bumped the other PR for review. |
#56748 has been merged 🎉 |
@bernhardoj please merge main and resolve the conflicts. Since other PR has been merged, we can retest this PR and proceed with the merge. |
@jayeshmangwani done |
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, thanks guys!
✋ 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/marcochavezf in version: 9.1.3-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.1.3-4 🚀
|
Explanation of Change
Fixed Issues
$ #55485
PROPOSAL: #55485 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite: have a workspace chat with unsettled expense
NOTE: This PR changes the autofocus behavior of composer. Mobile screen won't have autofocus anymore.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
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