Page MenuHomePhabricator

[web] introduce UserProfileMessageButton
ClosedPublic

Authored by ginsu on Oct 9 2023, 12:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 30, 7:17 PM
Unknown Object (File)
Sat, Jun 29, 4:38 PM
Unknown Object (File)
Wed, Jun 26, 4:02 PM
Unknown Object (File)
Tue, Jun 25, 1:45 PM
Unknown Object (File)
Mon, Jun 24, 2:56 AM
Unknown Object (File)
Mon, Jun 24, 2:56 AM
Unknown Object (File)
Mon, Jun 24, 2:56 AM
Unknown Object (File)
Mon, Jun 24, 2:54 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #31772)

Can we memoize with useMemo

web/modals/user-profile/user-profile.react.js
53–74 ↗(On Diff #31772)

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.