-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
Problem
After all consumers of useOptionsList have been migrated to useFilteredOptions, the OptionListContextProvider becomes dead code that should be removed.
This is the final cleanup issue in the effort to remove OptionListContextProvider entirely. See parent issue #82193 for full context.
Solution
- Remove
OptionsListContextProviderfrom theComposeProvidersarray insrc/libs/Navigation/AppNavigator/AuthScreens.tsx - Delete the provider file:
src/components/OptionListContextProvider.tsx - Update/delete test files that reference the provider:
- Delete
tests/unit/OptionListContextProviderTest.tsx(tests the now-deleted provider) - Update
tests/perf-test/SearchRouter.perf-test.tsx(removeOptionsListContext.Providermock) - Update
tests/ui/PureReportActionItemTest.tsx(remove provider wrapper) - Update
tests/ui/MoneyRequestReportPreview.test.tsx(remove provider wrapper)
- Delete
- Remove any remaining imports/references to
OptionListContextProvider,OptionsListContextProvider,OptionsListContext, oruseOptionsListacross the codebase
Depends on: All other migration sub-issues in this effort must be completed first. Only proceed when there are zero remaining production consumers of useOptionsList.
Complexity: Medium (touches multiple files but straightforward removals)
Reference PR: #74071
Tests
- Verify the app starts and runs correctly without the provider
- Verify all screens that previously used
useOptionsListstill work (they should now useuseFilteredOptions) - Verify all test suites pass
- Verify no errors appear in the JS console
- Test on all platforms (iOS, Android, Web, Desktop)
Issue Owner
Current Issue Owner: @shubham1206agraReactions are currently unavailable