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)
Tue, Nov 12, 9:58 AM
Unknown Object (File)
Thu, Oct 31, 8:36 AM
Unknown Object (File)
Sun, Oct 27, 12:05 PM
Unknown Object (File)
Sun, Oct 27, 4:58 AM
Unknown Object (File)
Sat, Oct 26, 3:15 PM
Unknown Object (File)
Thu, Oct 24, 9:10 PM
Unknown Object (File)
Oct 3 2024, 2:47 PM
Unknown Object (File)
Oct 3 2024, 2:47 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
No Lint Coverage
Unit
No Test Coverage

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.