Page MenuHomePhabricator

[native] Update RelationshipList to call useUserSearchIndex
ClosedPublic

Authored by rohan on Dec 8 2023, 5:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 7:36 PM
Unknown Object (File)
Wed, Dec 18, 7:36 PM
Unknown Object (File)
Wed, Dec 18, 7:36 PM
Unknown Object (File)
Wed, Dec 18, 7:36 PM
Unknown Object (File)
Wed, Dec 18, 7:36 PM
Unknown Object (File)
Wed, Dec 18, 7:36 PM
Unknown Object (File)
Mon, Dec 16, 8:13 PM
Unknown Object (File)
Nov 13 2024, 4:05 AM
Subscribers

Details

Summary

There are several search experiences in the app that do not use get/usePotentialMemberItems. This means we need to update them individually, so I'm separating out diffs to do exactly this to make it easy for reviewers. [[ https://linear.app/comm/issue/ENG-6019/[after-landing]-try-to-update-remaining-search-experiences-to-use | ENG-6019 ]] tracks attempting to update these search experiences to use usePotentialMemberItems. Each diff will affect one file ideally.

This diff affects RelationshipList.

This component is used when:

  • viewing friend list on native
  • adding friends from friend list on native
  • viewing block list on native

Addresses ENG-5434

Depends on D10251

Test Plan

Please see the video below where I (1) view friends list (2) add friends from friend list (3) view block list

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan published this revision for review.Dec 8 2023, 6:15 AM
native/profile/relationship-list.react.js
127 ↗(On Diff #34419)

Same issue as here

Memoize values(userInfos)

native/profile/relationship-list.react.js
128–142 ↗(On Diff #34483)

Same as D10251. You can reduce computation in your hook if you filter the users first.

Filter users first. Tested to make sure they correctly got filtered if the conditions of excludeStatuses applied

native/profile/relationship-list.react.js
93–98 ↗(On Diff #34546)

Just moved this down a little so I could declare excludeStatuses first

This revision is now accepted and ready to land.Dec 13 2023, 3:53 AM