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)
Mon, Jul 22, 6:36 AM
Unknown Object (File)
Sun, Jul 14, 10:30 AM
Unknown Object (File)
Fri, Jul 12, 9:01 PM
Unknown Object (File)
Mon, Jul 8, 12:21 PM
Unknown Object (File)
Fri, Jul 5, 10:54 AM
Unknown Object (File)
Tue, Jul 2, 2:18 PM
Unknown Object (File)
Tue, Jul 2, 12:20 PM
Unknown Object (File)
Mon, Jul 1, 1:43 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
Lint Not Applicable
Unit
Tests Not Applicable

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