Page MenuHomePhabricator

[web] introduce useUserRelationshipUserInfos
ClosedPublic

Authored by ginsu on Feb 2 2024, 11:33 AM.
Tags
None
Referenced Files
F3300650: D10936.id37198.diff
Sun, Nov 17, 8:34 PM
F3300192: D10936.diff
Sun, Nov 17, 6:38 PM
Unknown Object (File)
Mon, Nov 11, 4:55 PM
Unknown Object (File)
Mon, Nov 11, 4:01 PM
Unknown Object (File)
Mon, Nov 11, 3:59 PM
Unknown Object (File)
Mon, Nov 11, 3:21 PM
Unknown Object (File)
Sat, Nov 2, 10:21 AM
Unknown Object (File)
Thu, Oct 31, 8:36 AM
Subscribers

Details

Summary

PLEASE NOTE THAT THIS DIFF AND SUBSEQUENT DIFFS IN THIS STACK WILL NOT BE LANDED UNTIL MORE OF THE REDESIGN IS READY SINCE THIS WILL CAUSE REGRESSIONS IN PROD

In order to use the add users list for both add friends + add members, we need to make this component completely generic. Right now there is a lot of business logic for searching for any user to add as a friend that needs to be factored out.

As a first step to this I introduced useUserRelationshipUserInfos and moved all the search logic from AddUsersList into this new hook

Depends on D10849

Test Plan

flow + confirmed the add friends modal continues to work as expected

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu requested review of this revision.Feb 2 2024, 11:53 AM

Didn't read too carefully, but looks like straightforward move.

Make sure to memoize return value of useUserRelationshipUserInfos before landing.

web/settings/relationship/add-users-utils.js
95–98

Should memoize this

This revision is now accepted and ready to land.Feb 5 2024, 11:20 AM

address feedback + rebase before landing