Page MenuHomePhabricator

[web] make useSortedENSResolvedUsers more permissive
ClosedPublic

Authored by ginsu on Feb 1 2024, 3:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 1, 12:55 AM
Unknown Object (File)
Mon, Jun 24, 12:56 AM
Unknown Object (File)
Sun, Jun 23, 11:24 PM
Unknown Object (File)
Sun, Jun 23, 11:09 PM
Unknown Object (File)
Sun, Jun 23, 12:13 PM
Unknown Object (File)
Fri, Jun 21, 2:47 PM
Unknown Object (File)
Thu, Jun 20, 1:10 AM
Unknown Object (File)
Thu, Jun 20, 12:47 AM
Subscribers

Details

Summary

In the next diff we are going to want to use useSortedENSResolvedUsers to sort + resolve the thread members infos just like we did with the add friend list modal. However, right now useSortedENSResolvedUsers is currently typed so thread members can't use this hook since they use RelativeMemberInfo.

This diff updates useSortedENSResolvedUsers so that it can be used in both places

Test Plan

flow + confirmed that users are sorted correctly in the add users list + thread members list

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu requested review of this revision.Feb 1 2024, 3:29 PM
atul added inline comments.
web/settings/relationship/user-list-hooks.js
8 ↗(On Diff #36558)

Do we need isViewer, or could we just do something like:

type BaseUserInfo = { +username?: ?string, ... };

Looks like we only call useENSNames and it looks like that only needs username

312b1d.png (398×994 px, 82 KB)

This revision is now accepted and ready to land.Feb 5 2024, 10:53 AM
web/settings/relationship/user-list-hooks.js
8 ↗(On Diff #36558)

Because we are using the stringForUser function we need isViewer as well

Screenshot 2024-02-05 at 7.07.30 PM.png (794×2 px, 328 KB)

Screenshot 2024-02-05 at 7.06.35 PM.png (540×832 px, 73 KB)

ginsu edited the summary of this revision. (Show Details)

rebase before landing

This revision was landed with ongoing or failed builds.Feb 6 2024, 3:09 PM
This revision was automatically updated to reflect the committed changes.