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)
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)
Mar 7 2024, 8:33 AM
Unknown Object (File)
Mar 7 2024, 6:23 AM
Unknown Object (File)
Feb 23 2024, 3:32 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 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.