Page MenuHomePhabricator

[web] introduce UserProfile component
ClosedPublic

Authored by ginsu on Oct 8 2023, 11:45 PM.
Tags
None
Referenced Files
F3524105: D9409.id32047.diff
Mon, Dec 23, 11:23 AM
F3524082: D9409.id31769.diff
Mon, Dec 23, 11:13 AM
F3522546: D9409.diff
Mon, Dec 23, 7:00 AM
F3519613: D9409.id.diff
Sun, Dec 22, 10:43 PM
Unknown Object (File)
Fri, Dec 20, 8:33 PM
Unknown Object (File)
Tue, Dec 3, 7:09 PM
Unknown Object (File)
Fri, Nov 29, 9:13 PM
Unknown Object (File)
Sun, Nov 24, 8:47 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.