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
F5882385: D9119.diff
Thu, Apr 17, 2:51 AM
Unknown Object (File)
Fri, Apr 11, 12:35 AM
Unknown Object (File)
Sat, Apr 5, 4:49 AM
Unknown Object (File)
Tue, Mar 25, 1:56 PM
Unknown Object (File)
Sun, Mar 23, 9:21 AM
Unknown Object (File)
Mar 16 2025, 2:21 AM
Unknown Object (File)
Mar 7 2025, 3:32 AM
Unknown Object (File)
Mar 7 2025, 1:46 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