Add ability to set a contact method your default contact method#16750
Conversation
…tactMethodAsDefault
…tactMethodAsDefault
|
@aimane-chnaif @deetergp 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] |
|
FYI I haven't completed the videos on all platforms yet, mainly because my wifi is MISERABLE today and it's really slowing down lots of things 🙃 But the code should still be ready for review!! |
deetergp
left a comment
There was a problem hiding this comment.
Code looks good, despite my one NAB comment. I did check out the Web-E PR and tested it in macOS Chrome and it worked as described 👍
|
One more point I'm thinking about with this PR: How to show the Password textinput for users not on the passwordless beta Internal slack convo here |
|
Not related to PR, but I am a bit confused why it says "Phone number" to add new contact method, while both email and phone number are acceptable. phone.number.mov |
|
Good point @aimane-chnaif - I made the change to only update the current client instantly, I will definitely add that as a follow-up to make sure other devices get the same update 👍 |
|
Another bug:
So my question is one profile avatar is shared between contacts? |
aimane-chnaif
left a comment
There was a problem hiding this comment.
Let's fix above issues as follow-up, not marking as blocker.
Other than that, tests well.
Reviewer Checklist
Screenshots/VideosWebweb-ios.movMobile Web - Chromeandroid.movMobile Web - Safaridesktop-msafari.movDesktopdesktop-msafari.moviOSweb-ios.movAndroidandroid.mov |
|
Thanks for reviewing @aimane-chnaif !
It sounds like this is expected - the user should only ever have 1 profile avatar. If you change your default contact method, the avatar should stay the same. That's what's happening, right? Just making sure I followed correctly |
yes correct |
|
We have merge conflict came from prettier |
|
I'm just about to jump into fixing merge conflicts & the requested change 👍 |
…tactMethodAsDefault
Ready for re-review @deetergp @aimane-chnaif 🙏 |
deetergp
left a comment
There was a problem hiding this comment.
Looking good! Thanks for the changes. 👍
|
Nice! @deetergp @cristipaval either of you want the merge honors? :D |
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 1.3.13-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.13-5 🚀
|

@aimane-chnaif I'm sorry but you probably won't be able to complete these tests till https://github.com/Expensify/Web-Expensify/pull/36920 gets to staging
Also cc @cristipaval since you've been helping work on similar pages for a while now 👍
Details
Adds one more piece of functionality for contact methods: Being able to set them as default.
Note: In OldDot, we have some domain security settings that disable users from changing their default login. However, none of the domain functionality is on NewDot (yet) so we are only pulling in the user's domain security group data so we can make sure the user knows if they are or aren't able to update their primary login (default contact method).
Fixed Issues
$ #16747
Tests
If https://github.com/Expensify/Web-Expensify/pull/36920 isn't merged yet, check it out to start testingOpen up OldDot, sign in with a domain admin accountNote: Your account should be on thepasswordlessbeta (or if you're an Expensify employee, you should already have access to all betas)You can probably fake this by returningtrueinPermissions.canUsePasswordlessLoginsFinal test to make sure personal details update correctly:
...@gmail.com) and DON'T set a display nameNOTE: Your old default contact method will still show above messages you sent in chat reports (assuming you don't have a display name set). This is because the "old default contact method" was sent from the server, and we don't update ALL report actions any time a default contact method is changed.
I plan to create a follow-up for this, but we already discussed it's find to most past this for now
Verify that no errors appear in the JS console
Offline tests
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Screen.Recording.2023-04-06.at.3.36.39.PM.mov
Domain setting change test:
Screen.Recording.2023-04-21.at.4.08.58.PM.mov
Mobile Web - Chrome
Domain setting change test:
Screen.Recording.2023-04-21.at.4.33.27.PM.mov
Mobile Web - Safari
Screen.Recording.2023-04-24.at.2.33.17.PM.mov
Desktop
Domain setting change test:
Screen.Recording.2023-04-21.at.4.17.31.PM.mov
iOS
Domain setting change test:
Screen.Recording.2023-04-24.at.2.25.50.PM.mov
Android
Domain setting change test:
Screen.Recording.2023-04-21.at.4.30.55.PM.mov