Move modules to @sourcegraph/wildcard to the hooks folder
Created by: gitstart-sourcegraph
Description
As part of the process of Extracting non-UI modules from the shared package into a new workspaces, Move these modules to @sourcegraph/wildcard
to the hooks folder, and Move modules to shared/src/testing as outlined on implementation detail
Refs
Sourcegraph Issue Gitstart ticket
Implementation Detail
Move these modules to shared/src/testing
MockIntersectionObserver
-
searchTestHelpers
.
Move these modules to @sourcegraph/wildcard
to the hooks folder:
useLocalStorage
useMatchMedia
useObservable
useOnClickOutside
-
useTimeoutManager
.
Important: for all modules, check that exports are used somewhere in the codebase; otherwise, delete unused exports. E.g., throttleTimeWindow.ts
is not used anywhere.
Time estimate
- Pull requests with ~450 lines changed should take 3 hours at maximum. Ping the reviewer in the spec pull request if time-consuming changes are required.
- Split the work into multiple pull requests if the total diff is bigger than 450 lines of code.