-
Notifications
You must be signed in to change notification settings - Fork 3.2k
chore: remove shouldDelayFocus prop from text input #59087
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
chore: remove shouldDelayFocus prop from text input #59087
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
95a12f1
to
00142ba
Compare
0859cff
to
71b0797
Compare
@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] |
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!
@allroundexperts What is your eta for the review? thanks! |
@@ -46,7 +46,6 @@ function BaseTextInput( | |||
containerStyles, | |||
inputStyle, | |||
forceActiveLabel = false, | |||
autoFocus = false, |
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.
why is this prop removed for native?
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.
It's still there, just not destructured anymore. Goes into the rest of the inputProps.
🚧 @mountiny has triggered a test app build. You can view the workflow run here. |
@wgsquayson Congrats for your first PR! Please check the failing TS and ESLint checks. Also, for future PRs, numbered testing/QA steps are preferred as they have better readability. I have fixed it for you. Although it might be even better to break down the example case you have into numbered steps |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
@mountiny thank you! I will consider that on my next PR :) |
@mountiny TS/Lint errors fixed! |
@allroundexperts Are you able to get to this one? |
On it now! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-04-01.at.12.54.22.AM.movAndroid: mWeb ChromeScreen.Recording.2025-04-01.at.12.52.36.AM.moviOS: NativeScreen.Recording.2025-03-31.at.11.33.24.PM.moviOS: mWeb SafariScreen.Recording.2025-03-31.at.11.26.44.PM.movMacOS: Chrome / SafariScreen.Recording.2025-03-31.at.11.19.43.PM.movScreen.Recording.2025-03-31.at.11.20.31.PM.movMacOS: DesktopScreen.Recording.2025-03-31.at.11.24.51.PM.mov |
I wasn't able to reproduce the following on staging: Screen.Recording.2025-03-31.at.11.30.22.PM.movThe cursor seems to be moving along the transition. |
@allroundexperts looking into it |
@allroundexperts i am not being able to reproduce the autoFocus behavior on mSafari on my physical device ScreenRecording_03-31-2025.16-56-20_1.MP4 |
@wgsquayson Can you please resolve conflicts? |
05d64ad
to
8bb1cd5
Compare
@allroundexperts done! |
9063782
to
176309b
Compare
@mountiny can this be merged? 🙌🏼 |
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! Lets be on a look out for regressions after the deploy @chrispader @allroundexperts @wgsquayson
✋ 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/mountiny in version: 9.1.30-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.1.30-4 🚀
|
Explanation of Change
This PR removes the prop shouldDelayFocus from the base and native input components, since the delay behavior implemented to avoid bugs on mobile devices (as @hannojg described in #54759) isn't necessary anymore, and the bugs aren't reproducible.
It also removes implementations of this logic in other parts of the app, since those parts point to the same components.
The issue linked above also points to two other issues where iOS Safari is failing to autoFocus on some text inputs. These issues are under investigation and the problem is not targeted on this PR.
Fixed Issues
$ #54759
PROPOSAL: #54759 (comment)
Tests
QA Steps
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.compressed.mov
Android: mWeb Chrome
chrome.android.compressed.mov
iOS: Native
ios.480p.mov
iOS: mWeb Safari
safari.ios.compressed.mov
MacOS: Chrome / Safari
safari.mac.compressed.mov
MacOS: Desktop
desktop.compressed.mov