search-ui: add props to SearchBox for VS Code
Created by: tjkandala
Add props to SearchBox
used in the VS Code extension.
-
onEditorCreated
: Used to get a reference to the underlying Monaco instance. We use this in the extension to focus the search box on events such as sidebar suggestion clicks or search tab focus. -
className
andcontainerClassName
: Self-explanatory, enables variable styling across clients now that we use CSS modules (unable to reference class to override) -
fetchStreamSuggestions
: We use a different implementation of this in the extension (we call the "default" implementation in node, send result in message back to UI)
Test plan
sg start web-standalone
- Observe that the search box still works.
- We don't seem to have unit tests for Monaco, so I added a temporary
onEditorCreated
callback inSearchNavbarItem
to ensure that everything is wired up correctly (just logged editor instance to console).