-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
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:
- options selection
- options sorting
- options filtering
- 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:
UserSelectPopupSearchFiltersParticipantsSelectorNewChatPage
Important notes:
- you can use
InviteReportParticipantsPageas an example of the implementation - you should use
contextparam:CONST.SEARCH_SELECTOR.SEARCH_CONTEXT_GENERAL - you need to ensure all functionalities are working correctly. Especially: selection, filtering, ordering, and inviting new users
- After refactoring, we can remove
getMemberInviteOptions
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 Owner
Current Issue Owner: @mkzie2Metadata
Metadata
Labels
Type
Projects
Status