Page MenuHomePhabricator

[web] introduce UserProfile component
ClosedPublic

Authored by ginsu on Oct 8 2023, 11:45 PM.
Tags
None
Referenced Files
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
Unknown Object (File)
Nov 20 2024, 11:07 PM
Unknown Object (File)
Nov 15 2024, 6:10 AM
Unknown Object (File)
Nov 14 2024, 7:26 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
No Lint Coverage
Unit
No Test Coverage

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.