code monitoring: use monaco query input for trigger
Created by: limitedmage
Fixes #17320 (closed)
-
FormTriggerArea
now usesMonacoQueryInput
for the search query.- Some code needed to be reorganized to get the same look as before
-
isLIghtTheme
andisSourcegraphDotCom
had to be added as props because they are required byMonacoQueryInput
. This added a bunch of prop drilling of these props through the code monitoring codebase.
- The existing mock for
window.matchMedia
inhover.test.ts
was moved to a place where it would always be executed by adding it to the Jes config. Monaco requiresmatchMedia
but the version of Jest/JSDom we are using does not provide it. - The hack used to enable tabbing in Monaco needed a slight modification with
setTimeout
because it was not working with the hiding/reappearingMonacoQueryInput
in theFromTriggerArea
. -
FormTriggerArea
snapshot test was removed since the existing unit tests and storybook tests already provide that coverage from functional and visual standpoints.
Screenshot
Test plan
- Manual testing different scenarios (create new monitor, edit existing monitor, continuously open and close the trigger area, etc)
- Update unit tests to use Monaco query input (integration tests did not need updating)
- Ensure all existing unit tests and integration tests pass
- Ensure any