-
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
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!! |
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.
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 👍
src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js
Outdated
Show resolved
Hide resolved
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? |
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.
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 |
src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js
Outdated
Show resolved
Hide resolved
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 🙏 |
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.
Looking good! Thanks for the changes. 👍
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.
LGTM2
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 thepasswordless
beta (or if you're an Expensify employee, you should already have access to all betas)You can probably fake this by returningtrue
inPermissions.canUsePasswordlessLogins
Final 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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-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