Page MenuHomePhabricator

[web] introduce add users list provider
ClosedPublic

Authored by ginsu on Feb 2 2024, 12:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 8:20 PM
Unknown Object (File)
Wed, Nov 13, 4:56 PM
Unknown Object (File)
Wed, Nov 13, 2:08 AM
Unknown Object (File)
Tue, Nov 12, 6:03 PM
Unknown Object (File)
Tue, Nov 12, 1:58 PM
Unknown Object (File)
Thu, Oct 31, 8:36 AM
Unknown Object (File)
Thu, Oct 31, 8:36 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 I was attempting to lift the rest of the add friends specific logic from AddUsersList, I noticed that I needed to drill a ton of props in a bunch of places to handle the state needed for AddUsersList. This seemed a bit like a red flag to me, and I thought it would be a lot cleaner/better if I introduced a new provider to handle the state needed in AddUsersList and any relevant components

Depends on D10936

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 2 2024, 12:12 PM
Harbormaster failed remote builds in B26474: Diff 36597!
ginsu requested review of this revision.Feb 2 2024, 12:25 PM

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

web/settings/relationship/add-friends-modal.react.js
22–31 ↗(On Diff #36597)

Let's memoize this

web/settings/relationship/block-users-modal.react.js
29–39 ↗(On Diff #36597)

Let's memoize

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

address comments + rebase before landing

This revision was automatically updated to reflect the committed changes.