-
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
[PAID] [$250] Profile - Phone number field is not auto focused #53030
Comments
Triggered auto assignment to @strepanier03 ( |
Edited by proposal-police: This proposal was edited at 2024-11-23 18:08:13 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - Phone number field is not auto focused What is the root cause of that problem?Auto focus is not implemented on relevant inputWrapper on PhoneNumberPage. App/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx Lines 96 to 111 in 3ebe852
What changes do you think we should make in order to solve the problem?Pass following props here... autoFocus
shouldDelayFocus
keyboardType={CONST.KEYBOARD_TYPE.NUMBER_PAD}
inputMode={CONST.INPUT_MODE.TEL} App/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx Lines 96 to 111 in 3ebe852
Explanation for each prop - Additionally we should check on other similar pages and and fix there too. ResultsmacOS chromeScreen.Recording.2024-11-25.at.7.06.48.PM.movAndroid NativeScreen.Recording.2024-11-25.at.10.58.02.PM.movIOS NativeScreen.Recording.2024-11-25.at.11.13.18.PM.movReminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - Phone number field is not auto focused What is the root cause of that problem?We are not focusing the input here App/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx Lines 96 to 111 in 3ebe852
What changes do you think we should make in order to solve the problem?We can use App/src/pages/GroupChatNameEditPage.tsx Line 110 in 3ebe852
and here
const {inputCallbackRef} = useAutoFocusInput();
<InputWrapper
InputComponent={TextInput}
inputID={INPUT_IDS.PHONE_NUMBER}
name="lfname"
label={translate('common.phoneNumber')}
aria-label={translate('common.phoneNumber')}
role={CONST.ROLE.PRESENTATION}
defaultValue={phoneNumber}
spellCheck={false}
// inputCallbackRef
ref={inputCallbackRef}
onBlur={() => {
if (!validateLoginError) {
return;
}
PersonalDetails.clearPhoneNumberError();
}}
/> What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - Phone number field is not auto focused What is the root cause of that problem?We do not handle autofocus for private profile fields such as phone number, legal name, and address. Phone number: App/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx Lines 96 to 111 in e532ef1
Legal name: App/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx Lines 101 to 110 in 44b2f77
Address still does not autofocus, but since it uses a different component, we can report and update it later App/src/components/AddressForm.tsx Lines 148 to 166 in 2c27e63
What changes do you think we should make in order to solve the problem?To resolve this, we will add Phone number: App/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx Lines 96 to 111 in e532ef1
autoFocus
shouldDelayFocus={shouldDelayFocus} Legal name: App/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx Lines 101 to 110 in 44b2f77
autoFocus
shouldDelayFocus={shouldDelayFocus} POCScreen.Recording.2024-11-24.at.22.18.28.movWhat alternative solutions did you explore? (Optional)Single input: we need to add. autoFocus
shouldDelayFocus={shouldDelayFocus}
to PhoneNumberPage.tsx Multi-input: If we want to auto-focus the first input, then add it. autoFocus
shouldDelayFocus={shouldDelayFocus}
to DisplayNamePage.tsx
LegalNamePage.tsx
Address.tsx Or, if we don't want to auto-focus, then no update is needed DisplayNamePage.tsx
LegalNamePage.tsx
Address.tsx |
Updated Proposal |
@strepanier03 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@strepanier03 Eep! 4 days overdue now. Issues have feelings too... |
Job added to Upwork: https://www.upwork.com/jobs/~021863728672248175424 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura ( |
@paultsimura - Can you test this and confirm if any of the fields are auto-focused when you do? The OP is for the phone number field, which I agree is no auto-focused during my testing, but the other fields are not either. |
@strepanier03 some of the profile fields are autofocused (status, pronouns) while others are not (phone, display name, legal name, address). trim.FD841BA8-9A06-444A-B3A9-58E4B0C07F79.MOVMy educated guess would be to autofocus only on the pages that has a single input field (display name, pronouns, phone number, status). Autofocusing on multi-field inputs might be a bad UX because the keyboard will cover other fields, and the user might want to correct some of the bottom fields while it autofocus on the tope one. We might want involve @Expensify/design to clarify the UX. Or count on your and/or assigned engineer's opinion. |
I like this principle. I also think it depends if its filled or not as well. So if a name field is empty it still probably make sense to autofocus the first input field. Still think we'll mostly have to do it on a case per case basis, but for phone number I think we should autofocus. Keen to hear what the rest of @Expensify/design team thinks |
@strepanier03 @paultsimura Chrome (Android emulator - S22 api 35) Screen.Recording.2024-12-03.at.12.21.56.AM.movSafari (MacOS M1) Screen.Recording.2024-12-03.at.12.27.21.AM.movChrome (MacOS M1) Screen.Recording.2024-12-03.at.12.26.25.AM.mov |
📣 @ys-sherzad! 📣
|
That's a good point. What should we do if there's a single-input field, and it's already filled? |
I kinda think we should always auto-focus when there's only one input on the screen—regardless of whether or not it's filled. For the multi-input case, I would rather stick to one behavior and not change the behavior based on whether inputs are filled or not. I think auto-focusing the first input or not auto-focusing any would probably be fine. I think I lean ever so slightly to not auto-focusing at all when there are multiple inputs. Definitely open to have my mind changed though. |
I think the behavior described by @dannymcclain sounds solid and I agree with it as my preferred behavior as well. |
Agree that what Danny outlines sounds simpler 👍 Dig it. |
Proposal updated
|
Can you proceed with the PR without an iOS build for now? |
@mjasikowski @strepanier03 @paultsimura @NJ-2020 this issue is now 4 weeks old, please consider:
Thanks! |
PR will be ready today |
PR ready cc: @paultsimura |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.81-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-01-15. 🎊 For reference, here are some details about the assignees on this issue:
|
@paultsimura @strepanier03 @paultsimura The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalTest:
Do we agree 👍 or 👎 |
@mallenexpensify, you once were wondering why I'm mentioned twice. Now it happens on almost every issue 🙂 |
@paultsimura , bizarre. I thought you might have been double-added somewhere but I only see one of you on the C+ team in GH Unsure what other list or db the auto-post would be referencing that'd double up your handle in posts. ¯_(ツ)_/¯ |
Payment Summary
|
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.66-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The phone number field is auto-focused.
Actual Result:
The phone number field is not auto-focused.
The same behavior with the Legal name and Address pages.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Screenshots/Videos
Bug6673771_1732326370020.23.11.2024_04.31.34_REC.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @strepanier03The text was updated successfully, but these errors were encountered: