site admin: Add search functionality to pings JSON view
Created by: fkling
This adds search functionality to the JSON view, which was built into Monaco, but has to be enabled separately with CodeMirror.
This requires EditorState.readOnly.of(true)
instead of
EditorView.editable.of(false)
so that the editor is focusable and
Meta+f can enable the search feature.
Note: the UI of the search input doesn't match the rest of the page, but that was already the case with Monaco, so it should be fine. Since CodeMirror allows us to render our own search input we could consider doing that in the future.
Test plan
Go to https://sourcegraph.test:3443/site-admin/pings
, focus editor and press Meta+f.
App preview:
Check out the client app preview documentation to learn more.