Page MenuHomePhabricator

[web] introduce UserProfileMessageButton
ClosedPublic

Authored by ginsu on Oct 9 2023, 12:30 AM.
Tags
None
Referenced Files
F3259594: D9412.id32064.diff
Fri, Nov 15, 10:11 PM
Unknown Object (File)
Thu, Nov 14, 7:26 AM
Unknown Object (File)
Thu, Nov 14, 7:26 AM
Unknown Object (File)
Thu, Nov 14, 7:26 AM
Unknown Object (File)
Thu, Nov 14, 7:25 AM
Unknown Object (File)
Thu, Nov 14, 7:08 AM
Unknown Object (File)
Sun, Nov 3, 8:48 PM
Unknown Object (File)
Fri, Oct 25, 1:57 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
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.