Skip to content
Snippets Groups Projects

code monitoring: use monaco query input for trigger

Created by: limitedmage

Fixes #17320

  • FormTriggerArea now uses MonacoQueryInput for the search query.
    • Some code needed to be reorganized to get the same look as before
    • isLIghtTheme and isSourcegraphDotCom had to be added as props because they are required by MonacoQueryInput. This added a bunch of prop drilling of these props through the code monitoring codebase.
  • The existing mock for window.matchMedia in hover.test.ts was moved to a place where it would always be executed by adding it to the Jes config. Monaco requires matchMedia 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/reappearing MonacoQueryInput in the FromTriggerArea.
  • FormTriggerArea snapshot test was removed since the existing unit tests and storybook tests already provide that coverage from functional and visual standpoints.

Screenshot

image

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

Merge request reports

Approval is optional

Merged by avatar (Oct 9, 2025 1:55am UTC)

Merge details

  • Changes merged into main with bf4369cf.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading