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)
Wed, Jun 19, 8:18 AM
Unknown Object (File)
Thu, Jun 13, 3:51 PM
Unknown Object (File)
Wed, Jun 12, 5:45 PM
Unknown Object (File)
Wed, Jun 12, 7:13 AM
Unknown Object (File)
May 19 2024, 7:59 PM
Unknown Object (File)
May 19 2024, 7:59 PM
Unknown Object (File)
May 19 2024, 7:59 PM
Unknown Object (File)
May 17 2024, 4:22 PM
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