Page MenuHomePhabricator

[native] use stringForUserExplicit function to determine username text for profiles
ClosedPublic

Authored by ginsu on Sep 10 2023, 10:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 1:47 PM
Unknown Object (File)
Sun, Nov 3, 5:23 AM
Unknown Object (File)
Fri, Nov 1, 12:43 PM
Unknown Object (File)
Tue, Oct 29, 3:58 AM
Unknown Object (File)
Sun, Oct 20, 9:30 AM
Unknown Object (File)
Sun, Oct 20, 9:30 AM
Unknown Object (File)
Sun, Oct 20, 9:30 AM
Unknown Object (File)
Sun, Oct 20, 9:29 AM
Subscribers

Details

Summary

At this point the UserProfile component needed a userInfo of type AccountUserInfo to render. However, we need to consider the case when we view a profile and we don't know the username on the client (an anonymous user). stringForUserExplicit is a function that handles this case for us and this also allows us to switch the userInfo prop type to be the more permissive UserInfo type

Depends on D9094

Test Plan

Please see screenshot below, and confirmed that UserInfos with known usernames still show the correct username

Screenshot 2023-09-11 at 1.52.35 AM.png (1×1 px, 810 KB)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

This revision is now accepted and ready to land.Sep 12 2023, 5:44 AM
ginsu edited the summary of this revision. (Show Details)

rebase before landing