-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Keyboard shouldn't be active/enabled automatically for request details #29086
Conversation
@allroundexperts 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/VideosWebScreen.Recording.2023-09-08.at.4.26.27.AM.movMobile Web - ChromeScreen.Recording.2023-09-08.at.4.29.10.AM.movMobile Web - SafariScreen.Recording.2023-09-08.at.4.27.27.AM.movDesktopScreen.Recording.2023-09-08.at.4.34.34.AM.moviOSScreen.Recording.2023-09-08.at.4.27.56.AM.movAndroidScreen.Recording.2023-09-08.at.4.34.34.AM.mov |
Hi! Is this no longer able to be reproduced? |
@srikarparsi This bug was supposed to be fixed on native platforms only. |
Could you point me to where it says that? The original video has a recording of mobile web safari. |
I see in the video from the testing team that it is not focusing on the mount of the component but input gets focused when we refocus to the screen based on this logic. Only for natives, we are not refocusing but for rest we are refocusing bcoz of the App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js Lines 474 to 482 in 477c630
b1.mp4 |
hey, will take a look into this tomorrow |
Hm, so I believe for all platforms, we should only "refocus" the keyboard once the modal is closed if the keyboard was originally focussed. @allroundexperts what do you think? |
bump @allroundexperts |
@srikarparsi Ideally, it should work on all platforms. However, mweb seems to be very tricky. There's a lot of discussion about autofocus logic for mweb available in Slack as well. |
Got it @allroundexperts do you think you could point me to the discussions in slack when you have a chance? Also @JmillsExpensify what do you think about this functionality not working perfectly as a part of this fix because of this bug |
Got it, thanks @allroundexperts! This looks good to me then |
✋ 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/srikarparsi in version: 1.3.91-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.91-8 🚀
|
@@ -110,7 +110,8 @@ function ComposerWithSuggestions({ | |||
const maxComposerLines = isSmallScreenWidth ? CONST.COMPOSER.MAX_LINES_SMALL_SCREEN : CONST.COMPOSER.MAX_LINES; | |||
|
|||
const isEmptyChat = useMemo(() => _.size(reportActions) === 1, [reportActions]); | |||
const shouldAutoFocus = !modal.isVisible && (shouldFocusInputOnScreenFocus || isEmptyChat) && shouldShowComposeInput; | |||
const parentAction = ReportActionsUtils.getParentReportAction(report); | |||
const shouldAutoFocus = !modal.isVisible && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentAction))) && shouldShowComposeInput; |
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.
Probably a design issue as we did not notice that the keyboard display on mobile platforms would cover the task description and cause UX issue #50346
Details
#26702
Fix again due to false revert here.
Fixed Issues
$ #26702
PROPOSAL: #26702 (comment)
Tests
Offline tests
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
Screen.Recording.2023-09-07.at.18.07.30.mov
Mobile Web - Chrome
p2.mp4
Mobile Web - Safari
Simulator.Screen.Recording.-.iPhone.11.-.2023-09-07.at.18.19.17.mp4
Desktop
iOS
Simulator.Screen.Recording.-.iPhone.11.-.2023-09-07.at.18.02.35.mp4
Android
p1.mp4