Handle nonexistent login and get correct avatar#20897
Conversation
|
@youssef-lr 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] |
|
|
||
| <Text style={[styles.textMicro, styles.fontColorReactionLabel]}> | ||
| {String(userDetails.login).trim() && !_.isEqual(userDetails.login, userDetails.displayName) ? Str.removeSMSDomain(userDetails.login) : ''} | ||
| {String(userDetails.login || '').trim() && !_.isEqual(userDetails.login, userDetails.displayName) ? Str.removeSMSDomain(userDetails.login) : ''} |
There was a problem hiding this comment.
Can we add '' as a default prop to userDetailsTooltipPropTypes instead?
There was a problem hiding this comment.
It is already set as default there, but this still can be null here, since the fallback is only provided when userDetails is null. Do I get this right, @Beamanator?
There was a problem hiding this comment.
I don't think so, because in this web-e PR we're going to completely stop sending login (& other details) for public users. But the personal details WILL include avatar, accountID, displayName... So I don't believe we'll insert any default data for those situations
not sure that I agree with the no QA here. |
cristipaval
left a comment
There was a problem hiding this comment.
LGTM and tests well so far. I can add some screen recordings but I am not sure my tests are complete since the testing steps are general
|
@luacmartins good call, i updated to make sure we do test in staging too 👍 |
|
I'll jump in and review to help get this one out the door; but if someone approves before me don't wait for my review. |
Reviewer Checklist
Screenshots/VideosWebWeb-E main Screen.Recording.2023-06-16.at.18.08.06.movWeb-E associated PR: Screen.Recording.2023-06-16.at.18.10.32.movMobile Web - ChromeMobile Web - SafariDesktopScreen.Recording.2023-06-16.at.18.14.55.moviOSScreen.Recording.2023-06-16.at.18.52.26.movAndroid |
situchan
left a comment
There was a problem hiding this comment.
One more case:
App/src/libs/OptionsListUtils.js
Line 862 in 469596a
|
Great catch @situchan! |
|
oof!! |
|
thanks @situchan - pushed that fix |
neil-marcellini
left a comment
There was a problem hiding this comment.
I think it looks good and from my tests it works well. I tested after starting a new chat with a new account, which I think will return a non-existent login. I think that's better than testing with an existing account.
|
✋ 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/youssef-lr in version: 1.3.29-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.29-11 🚀
|
Details
Does a few things:
personalDetailsListFixed Issues
$ Related to #20069
Tests
The following should be tested in Web-E
main& in this Web-E PR: https://github.com/Expensify/Web-Expensify/pull/37753Offline tests
None needed here
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android