Page MenuHomePhabricator

[web] Search for the users on server
ClosedPublic

Authored by tomek on Jun 14 2022, 12:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 4, 2:58 PM
Unknown Object (File)
Sun, Jun 30, 4:48 AM
Unknown Object (File)
Sun, Jun 30, 12:40 AM
Unknown Object (File)
Sat, Jun 29, 11:25 PM
Unknown Object (File)
Sat, Jun 29, 9:19 PM
Unknown Object (File)
Tue, Jun 25, 7:20 PM
Unknown Object (File)
Tue, Jun 25, 3:43 PM
Unknown Object (File)
Tue, Jun 25, 9:01 AM

Details

Summary

Another source of the users is our server - there might be some users that aren't in the store, but it should be possible to friend / block them.

Depends on D4267

Test Plan

Render the component and check if all the users that match search text were returned from the server.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Considering this network request may take some time to complete, we should probably introduce a spinner or something here to indicate to the user that "something is happening."

Guessing that feedback will probably be more relevant later in the stack once you're working on the views though.

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

If we move the const userStoreSearchIndex = ... line above this one, can we replace new Set() with:

new Set(userStoreSearchIndex.getSearchResults(searchText)

?

This revision is now accepted and ready to land.Jun 17 2022, 1:24 PM
In D4268#120826, @atul wrote:

Considering this network request may take some time to complete, we should probably introduce a spinner or something here to indicate to the user that "something is happening."

Guessing that feedback will probably be more relevant later in the stack once you're working on the views though.

We can do that but need to find a good place for it. We don't want to stop users from interacting with the component because we're fetching some data. Also, there will be some users displayed (from the store), so adding a spinner is not that beneficial... what do you think?

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

Ok, that makes sense!

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

But this code was introduced in D4267 so I will change it there.

This revision was automatically updated to reflect the committed changes.