Page MenuHomePhabricator

[web] make AddUsersList feature agnostic
ClosedPublic

Authored by ginsu on Feb 5 2024, 5:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 8 2024, 1:05 PM
Unknown Object (File)
Apr 8 2024, 1:05 PM
Unknown Object (File)
Apr 8 2024, 1:05 PM
Unknown Object (File)
Apr 8 2024, 1:04 PM
Unknown Object (File)
Apr 8 2024, 1:04 PM
Unknown Object (File)
Apr 3 2024, 8:01 AM
Unknown Object (File)
Mar 2 2024, 8:07 PM
Unknown Object (File)
Mar 1 2024, 2:09 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.

This diff introduces a new generic BaseAddUserInfo type that both adding friends + adding members modals can use and lifts the rest of the business logic for adding friends out of AddUsersList and into AddUsersListModalContent

Depends on D10937

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 5 2024, 6:15 AM
atul added inline comments.
web/settings/relationship/add-users-list-modal.react.js
48–54 ↗(On Diff #36615)

Can we memoize

web/settings/relationship/add-users-list.react.js
64 ↗(On Diff #36615)

We don't need avatar anymore?

This revision is now accepted and ready to land.Feb 5 2024, 11:24 AM
web/settings/relationship/add-users-list.react.js
64 ↗(On Diff #36615)

Yea as long as we have the userID we can pass that into UserAvatar and figure out what the avatar for the user is from there

address comments + rebase before landing

This revision was automatically updated to reflect the committed changes.