Page MenuHomePhabricator

[web] introduce UserProfile component
ClosedPublic

Authored by ginsu on Oct 8 2023, 11:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 15, 6:10 AM
Unknown Object (File)
Thu, Nov 14, 7:26 AM
Unknown Object (File)
Thu, Nov 14, 7:26 AM
Unknown Object (File)
Thu, Nov 14, 7:26 AM
Unknown Object (File)
Thu, Nov 14, 7:26 AM
Unknown Object (File)
Thu, Nov 14, 7:25 AM
Unknown Object (File)
Thu, Nov 14, 7:08 AM
Unknown Object (File)
Tue, Nov 12, 11:46 PM
Subscribers

Details

Summary

This diff introduces the barebones user profile component. This includes the user avatar, the username, and the copy username button (but w/o the functionality). That and the other elements of the user profile will come in subsequent diffs

https://linear.app/comm/issue/ENG-4962/introduce-user-profile-component

Depends on D9408

Test Plan

Please see screenshot below

Screenshot 2023-10-09 at 2.55.21 AM.png (2×3 px, 752 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: atul, inka.
ginsu requested review of this revision.Oct 9 2023, 12:03 AM
atul requested changes to this revision.Oct 9 2023, 1:49 PM

If we're allowing ?UserInfo for userInfo prop, shouldn't we eg render "Copy username" conditionally? Or maybe userInfo can be UserInfo?

web/modals/user-profile/user-profile.react.js
13 ↗(On Diff #31769)

How does this component appear if userInfo is null or undefined?

If this is a scenario we're considering, shouldn't eg "Copy username" be displayed conditionally?

22–31 ↗(On Diff #31769)

Wouldn't hurt to memoize

This revision now requires changes to proceed.Oct 9 2023, 1:49 PM
web/modals/user-profile/user-profile.react.js
13 ↗(On Diff #31769)

Currently this is the behavior:

Clicking "Copy username" will copy the username text which is anonymous. This is the same behavior as native as well

This revision is now accepted and ready to land.Oct 16 2023, 4:46 PM
This revision was automatically updated to reflect the committed changes.