Page MenuHomePhabricator

[web] introduce UserProfileMessageButton
ClosedPublic

Authored by ginsu on Oct 9 2023, 12:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 30, 10:45 PM
Unknown Object (File)
Sat, Sep 14, 5:00 PM
Unknown Object (File)
Sat, Sep 14, 5:00 PM
Unknown Object (File)
Sat, Sep 14, 5:00 PM
Unknown Object (File)
Sat, Sep 14, 4:59 PM
Unknown Object (File)
Fri, Sep 13, 12:13 AM
Unknown Object (File)
Sep 2 2024, 3:53 PM
Unknown Object (File)
Sep 1 2024, 4:55 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
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 ↗(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.