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)
Fri, Dec 6, 12:23 PM
Unknown Object (File)
Mon, Nov 25, 9:14 AM
Unknown Object (File)
Fri, Nov 22, 5:20 AM
Unknown Object (File)
Fri, Nov 22, 3:53 AM
Unknown Object (File)
Thu, Nov 21, 10:18 PM
Unknown Object (File)
Nov 11 2024, 6:55 PM
Unknown Object (File)
Nov 8 2024, 6:09 PM
Unknown Object (File)
Nov 3 2024, 1:47 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