Page MenuHomePhabricator

[web] implement RelationshipPromptButtons into user profiles
ClosedPublic

Authored by ginsu on Oct 10 2023, 12:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 7:27 AM
Unknown Object (File)
Thu, Nov 14, 7:27 AM
Unknown Object (File)
Thu, Nov 14, 7:27 AM
Unknown Object (File)
Thu, Nov 14, 7:27 AM
Unknown Object (File)
Thu, Nov 14, 7:25 AM
Unknown Object (File)
Thu, Nov 14, 7:08 AM
Unknown Object (File)
Thu, Oct 24, 10:13 PM
Unknown Object (File)
Thu, Oct 24, 8:35 AM
Subscribers

Details

Summary

This diff adds the RelationshipPromptButton to the UserProfileActionButtons component. The UserProfileActionButtons now handles rendering the different layout of the action buttons on the user profile depending on what the condtion of the relationship status is

Linear Task: https://linear.app/comm/issue/ENG-4967/introduceport-userprofilerelationshipbutton

Depends on D9446

Test Plan

Please see screenshots below

Not a friend:

Screenshot 2023-10-10 at 3.31.16 PM.png (1×3 px, 802 KB)

Sent Friend Request:

Screenshot 2023-10-10 at 3.31.18 PM.png (1×3 px, 813 KB)

Received Friend Request:

Screenshot 2023-10-10 at 3.31.11 PM.png (1×3 px, 815 KB)

Friend:

Screenshot 2023-10-10 at 3.35.24 PM.png (1×3 px, 751 KB)

Blocked:

Screenshot 2023-10-10 at 5.08.38 PM.png (1×3 px, 599 KB)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

web/modals/user-profile/user-profile-modal.react.js
26 ↗(On Diff #31883)

Now that we have different widths/sizes due to the different layouts of the action buttons for user profiles we need to set the size to fit-content. This does create the following regression (when there is a block in either direction or the user is anonymous), and I will address this in a subsequent diff

Screenshot 2023-10-10 at 3.37.36 PM.png (1×3 px, 589 KB)

Found a better way to address regression mentioned in inline comment

Looks good. Probably possible to break apart the memoized block to reduce indentation, but not a priority.. good to land as is

This revision is now accepted and ready to land.Oct 16 2023, 9:30 AM