Skip to content

[Due for payment 2026-08-19] [$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 4) #71061

Closed

Description

@pecanoro

Background

Across the application, around 15 components serve the same or very similar functionality: search users. These components use the same source of truth, OptionListContextProvider, and use getValidOptions to properly filter and sort options with contact.

Problem

Although the functionality of these components is almost the same, their implementation is the same or differs slightly. There is a lot of code duplication, which leads to situations where users experience different behaviours across these functionalities.
Working on these components (for example, with performance optimizations) is also problematic for developers, as there are many places that should be checked and updated. For example, when we implemented new parameters in getValidOptions there is a need to update all of these components

Solution

To improve code quality and developers’ and users' experience, we’ve implemented the useSearchSelector hook, which will be a single place of truth for all components that provide user searching. These components serve:

  1. options selection
  2. options sorting
  3. options filtering
  4. phone contacts importing

Using that hook will make the user experience more consistent across all components.

Task 4

Refactor listed components to use useSearchSelector hook and remove unused and duplicated code.
Components:

  1. UserSelectPopup
  2. SearchFiltersParticipantsSelector
  3. NewChatPage

Important notes:

  1. you can use InviteReportParticipantsPage as an example of the implementation
  2. you should use context param: CONST.SEARCH_SELECTOR.SEARCH_CONTEXT_GENERAL
  3. you need to ensure all functionalities are working correctly. Especially: selection, filtering, ordering, and inviting new users
  4. After refactoring, we can remove getMemberInviteOptions

cc/ @sosek108 @mountiny

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021970467874158935409
  • Upwork Job ID: 1970467874158935409
  • Last Price Increase: 2025-09-23
  • Automatic offers:
    • mkzie2 | Contributor | 108901126
Issue OwnerCurrent Issue Owner: @twisterdotcom

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 23, 2025
  2. changed the title [-]Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 4)[/-] [+][$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 4)[/+] on Sep 23, 2025
  3. melvin-bot commented on Sep 23, 2025

    @melvin-bot
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 23, 2025
  5. added and removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 23, 2025
  6. melvin-bot commented on Sep 23, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

  7. melvin-bot commented on Sep 23, 2025

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 23, 2025
  9. 186 remaining items

  10. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    ⚠️ Failed to update price automatically. The BZ team member will need to update the price manually in Upwork.

  11. NikkiWines commented on Aug 21, 2026

    @NikkiWines
    Contributor
  12. mallenexpensify commented on Aug 21, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @mkzie2 due $250 via NewDot
    Contributor+: @ZhenjaHorbach due $250 via NewDot

  13. garrettmknight commented on Sep 2, 2026

    @garrettmknight
    Contributor

    $250 approved for @ZhenjaHorbach

  14. twisterdotcom commented on Sep 30, 2026

    @twisterdotcom
    Contributor
  15. mallenexpensify commented on Sep 30, 2026

    @mallenexpensify
    Contributor

    $2 approved for @in Report ID: R00DHh8IGiXa.

    @twisterdotcom 👀 plz

  16. twisterdotcom commented on Oct 1, 2026

    @twisterdotcom
    Contributor

    @mallenexpensify this happened because @mkzie2 is listed on the workspace with an email ending in outlook.com, but in the Vendor Agreements with an email ending in gmail.com.

  17. twisterdotcom commented on Oct 1, 2026

    @twisterdotcom
    Contributor
  18. twisterdotcom commented on Oct 6, 2026

    @twisterdotcom
    Contributor

    I think we can close as I updated the summary manually above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorTask

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions