Page MenuHomePhabricator

[web] introduce UserProfileMessageButton
ClosedPublic

Authored by ginsu on Oct 9 2023, 12:30 AM.
Tags
None
Referenced Files
F3522274: D9412.diff
Mon, Dec 23, 6:19 AM
F3521270: D9412.id32064.diff
Mon, Dec 23, 2:47 AM
F3521269: D9412.id32050.diff
Mon, Dec 23, 2:47 AM
F3521268: D9412.id31772.diff
Mon, Dec 23, 2:47 AM
F3519616: D9412.id.diff
Sun, Dec 22, 10:43 PM
Unknown Object (File)
Sat, Dec 21, 10:33 AM
Unknown Object (File)
Sat, Nov 30, 6:10 AM
Unknown Object (File)
Nov 18 2024, 6:32 PM
Subscribers

Details

Summary

This diff introduces the UserProfileMessageButton. The UserProfileMessageButtons will be responsible for navigating to the personal thread between the user and the viewer. For all of this logic we can simply just use the useUserProfileThreadInfo hook

https://linear.app/comm/issue/ENG-4966/introduceport-userprofilemessagebutton

Depends on D9411

Test Plan

Please see the demo video below

Anonymous user:

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

Block in either direction:

Screenshot 2023-10-09 at 3.40.44 AM.png (1×3 px, 630 KB)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu requested review of this revision.Oct 9 2023, 12:47 AM
atul added inline comments.
web/modals/user-profile/user-profile-message-button.react.js
31–39

Can we memoize with useMemo

web/modals/user-profile/user-profile.react.js
53–74

Let's def memoize, there's a lot of components nested within here would be good to short-circuit re-renders

This revision is now accepted and ready to land.Oct 9 2023, 1:58 PM

rebase before landing + address @atul's comments

This revision was automatically updated to reflect the committed changes.