Page MenuHomePhabricator

[web] intorduce loading logic to relationship prompt button
AcceptedPublic

Authored by ginsu on Thu, Jun 27, 12:50 PM.
Tags
None
Referenced Files
F2174365: D12595.diff
Wed, Jul 3, 12:13 AM
F2172636: Screenshot 2024-07-02 at 11.18.05 PM.png
Tue, Jul 2, 8:22 PM
F2168039: D12595.diff
Tue, Jul 2, 8:12 AM
F2167487: D12595.id41767.diff
Tue, Jul 2, 6:27 AM
F2165480: D12595.diff
Tue, Jul 2, 2:05 AM
Unknown Object (File)
Sat, Jun 29, 1:48 AM
Unknown Object (File)
Sat, Jun 29, 1:48 AM
Unknown Object (File)
Sat, Jun 29, 1:45 AM
Subscribers

Details

Reviewers
ashoat
inka
Summary

This diff updates the relationship prompt button in web to consume the loading logic from useRelationshipPrompt

Depends on D12593

Test Plan

Confirmed that the loading logic works as expected in the relationship prompt button for both the relationship prompt and user profiles

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu added inline comments.
web/chat/relationship-prompt/relationship-prompt-button.js
16

Made isLoading required so we can be more proactive in the future about always including loading state in our action buttons

web/chat/relationship-prompt/relationship-prompt.js
51

Having every word be capitalized is a bit of an anti-pattern, went ahead and updated the copy to follow the convention of only the first word being capitalized but happy to revert this if this is unwanted

cc @ashoat

web/modals/user-profile/user-profile-action-buttons.react.js
49

Can't really remember why we initially dropped the "friend request" in the copy but added it back to be consistent with what is found in RelationshipPrompt component. If this change is okay, will update this diff to dedup the copy-pasted strings before landing

cc @ashoat

ginsu requested review of this revision.Thu, Jun 27, 1:07 PM
ashoat added inline comments.
web/chat/relationship-prompt/relationship-prompt.js
51

Thank you for catching this!!

web/modals/user-profile/user-profile-action-buttons.react.js
49

Thanks for making this change for consistency, and yes would be great to dedup!

Can you share a screenshot so we can make sure that the increased text doesn't overflow its bounds?

This revision is now accepted and ready to land.Mon, Jul 1, 1:13 PM
web/modals/user-profile/user-profile-action-buttons.react.js
49

Also want to make sure that the text doesn't look too scrunched up (I feel this way about D12596)

web/modals/user-profile/user-profile-action-buttons.react.js
49

Screenshot 2024-07-02 at 11.18.05 PM.png (1×3 px, 885 KB)

The text isn't overflowing it's bounds and I feel like it isn't too scrunched up; however, based on feedback in D12596, I think we should drop the "friend request" so that the copy in the user profiles will be consistent between web and native