Page MenuHomePhabricator

[web] introduce useUserRelationshipUserInfos
ClosedPublic

Authored by ginsu on Feb 2 2024, 11:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 9 2024, 12:11 AM
Unknown Object (File)
Apr 9 2024, 12:11 AM
Unknown Object (File)
Apr 9 2024, 12:11 AM
Unknown Object (File)
Apr 9 2024, 12:10 AM
Unknown Object (File)
Apr 9 2024, 12:09 AM
Unknown Object (File)
Mar 7 2024, 9:05 AM
Unknown Object (File)
Mar 7 2024, 6:23 AM
Unknown Object (File)
Feb 23 2024, 12:07 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #36596)

Should memoize this

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

address feedback + rebase before landing