-
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
[Feature]: Add phone number to the private personal details section #50773
[Feature]: Add phone number to the private personal details section #50773
Conversation
@dubielzyk-expensify @DylanDylann One of you needs to 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] |
Yup, agree with Jon's comments. Regarding the country code... yeah, that's an interesting one. Do we need to do that automatically or can we just rely on the user to enter one if needed? |
The country code is added by the |
Fixed! |
I think the execution of this feels a bit inelegant, but I get why it's done this way. It kinda feels like there should be a country selector on that screen that'd defaulted to their location. But I also feel like all this is something worth solving later. Thoughts @Expensify/design ? |
Yeah I think we could improve this with some dedicated country code selector, but I would say that is something for later. @allgandalf @DylanDylann For FE validation, lets use the same as in the card shipping flow. For handling BE errors, show them using RBR dot on the row in the Private setting and then under the input with X to clear it |
We came to conclusion on slack
Yeah using that already |
Yeah I agree with Jon that it doesn't feel the nicest, but I also see the point that if it ain't broke... we can revisit that particular part of the flow later. |
I'm in line with the comments above. A dedicated country picker would be nice on that screen, but I also agree that we don't need to do it right this second. |
@allgandalf Let's add a padding-top on error message to ensure a space 8px as form error message |
@allgandalf 2 error messages are displayed at the same time |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-10-24.at.09.22.00.movAndroid: mWeb ChromeScreen.Recording.2024-10-24.at.09.19.33.moviOS: NativeScreen.Recording.2024-10-24.at.09.22.19.moviOS: mWeb SafariScreen.Recording.2024-10-24.at.09.18.44.movMacOS: Chrome / SafariScreen.Recording.2024-10-24.at.09.17.16.movMacOS: DesktopScreen.Recording.2024-10-24.at.09.20.26.mov |
The behavior in this video looks good to me. The last video posted doesn't seem to save the number which is a bit odd. |
Which video particularly Jon? It looks like the two videos posted here are working as expected at least. |
Both the videos are looking correct to me as well. |
OH I see what Jon is saying. In the failure video here, we're not saving the "bad" phone number the user entered. Is that expected? |
Ah, is that because it was considered a "bad" number from the backend? I have no idea how that works TBH. |
Yeah, I guess I was expecting it to save and show even though it throws an error. Happy to move forward as you've got control 👍 |
} | ||
|
||
// Only call the API if the user has changed their phone number | ||
if (phoneNumber !== values?.phoneNumber) { |
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.
I think we should move thí check to above validateLoginError
@allgandalf BUG: 2 error messages are display at the same time Screen.Recording.2024-10-25.at.11.08.28.mov |
@DylanDylann fixed! |
Co-authored-by: Vit Horacek <[email protected]>
Works well after update: Screen.Recording.2024-10-28.at.5.55.20.PM.mov |
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.
Thank you, easy-peasy 😂
✋ 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.0.55-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.55-10 🚀
|
Details
Discussed in this thread
Users need a phone number to issue physical Expensify cards. We ask them for the phone number in the form to ship the Expensify card, but otherwise, this phone number is not editable from NewDot. This is a problem in case they want to edit it after adding it for the Expensify card.
Fixed Issues
$ #50701
PROPOSAL: https://expensify.slack.com/archives/C02NK2DQWUX/p1728885017172809?thread_ts=1728884992.974789&cid=C02NK2DQWUX
Tests
Verify that: you are able to enter phone number and styling is correct, and verify that error is displayed on wrong entry
Offline tests
Verify that: you are able to enter phone number and in offline mode the number is displayed
QA Steps
Verify that: you are able to enter phone number and styling is correct, and verify that error is displayed on wrong entry
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
Screen.Recording.2024-10-15.at.12.12.00.PM.mov
Android: mWeb Chrome
iOS: Native
Screen.Recording.2024-10-15.at.11.51.59.AM.mov
iOS: mWeb Safari
Screen.Recording.2024-10-15.at.12.08.57.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-10-15.at.11.48.38.AM.mov
MacOS: Desktop
Screen.Recording.2024-10-15.at.11.54.51.AM.mov