Page MenuHomePhabricator

[web] introduce UserProfile component
ClosedPublic

Authored by ginsu on Oct 8 2023, 11:45 PM.
Tags
None
Referenced Files
F2208419: D9409.id31769.diff
Sun, Jul 7, 1:46 PM
Unknown Object (File)
Thu, Jul 4, 8:40 AM
Unknown Object (File)
Sun, Jun 30, 7:43 PM
Unknown Object (File)
Sat, Jun 29, 3:06 PM
Unknown Object (File)
Sat, Jun 29, 2:04 PM
Unknown Object (File)
Sat, Jun 29, 2:02 PM
Unknown Object (File)
Tue, Jun 25, 6:14 AM
Unknown Object (File)
Mon, Jun 24, 2:55 AM
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.