search: Remove MonacoQueryInput component and related code#46249
Conversation
This commit removes the MonacoQueryInput component and renames "LazyMonacoQueryInput" to "LazyQueryInput".
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 4ddf243...c12d351.
|
vdavid
left a comment
There was a problem hiding this comment.
I reviewed the JetBrains part. The old code looks weird: it's like we passed "monaco" to the custom search box, but then disregarded that setting altogether and just used "codemirror6" anyway. Thanks for cleaning this up, your version removed this weird stuff.
Testing the search box is part of the release process for the JetBrains plugin, so at the next release we'll test if it works 100%, but the code LGTM.
I'm not approving the PR because I haven't checked the other parts, just saying that the JetBrains part looks good.
|
@vdavid Thank you! Yeah, that was weird, probably some left-over code while the CodeMirror version was still being evaluated. |
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits c12d351 and 94ffbdc or learn more. Open explanation
|
philipp-spiess
left a comment
There was a problem hiding this comment.
@philipp-spiess: The VSCode extensions was still using the Monaco version. I think we have used the CodeMirror version long enough now that there shouldn't be a problem to switch it over.
100% makes sense. Unfortunately I can't verify the VSCode build right now because of another issue (https://github.com/sourcegraph/sourcegraph/issues/46247) but I’m happy to fix it if anything breaks (but I’m sure it'll make things easier instead 😅 )
Not sure what to do about the feature flag setting, i.e. whether to remove "monaco" or add a note that it's not supported anymore. What do think?
It would be cool to remove it to avoid confusion. Is it possible to remove an option (or should we remove the whole feature-flag, something that seems possible now)
limitedmage
left a comment
There was a problem hiding this comment.
Looks great!! Left very minor comments.
IMO we should remove the experimental feature flag since it's no longer functional.
| }, | ||
| } | ||
|
|
||
| export interface MonacoFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'onBlur'> { |
There was a problem hiding this comment.
Can we remove Monaco naming from this file and the component/props if it doesn't use Monaco anymore? Maybe to simply QueryField.
There was a problem hiding this comment.
I'd leave that to the Code Insights team or at least do it in a separate diff.
There was a problem hiding this comment.
No problems I can do it
I guess it's possible that will use it for migrating the other Monaco instances... but it's true that we don't use right now. I'd be inclined to leave it as is right now, but if it's no problem to reintroduce it later then we can also remove it. |
vovakulikov
left a comment
There was a problem hiding this comment.
Tested manually, code insights is fine, other parts should be fine as well but didn't conducted a deep manual testing beyond code insights creation UI
| }, | ||
| } | ||
|
|
||
| export interface MonacoFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'onBlur'> { |
There was a problem hiding this comment.
No problems I can do it
|
I've decided to also remove the setting to keep things clean. |
We've been using the CodeMirror query input version by default for a couple of months now. This diff
MonacoQueryInputcomponent and related codeLazyMonacoQueryInputtoLazyQueryInputeditorComponentprop fromLazy(Monaco)QueryInputNot sure what to do about the feature flag setting, i.e. whether to remove "monaco" or add a note that it's not supported anymore. What do think?
@philipp-spiess: The VSCode extensions was still using the Monaco version. I think we have used the CodeMirror version long enough now that there shouldn't be a problem to switch it over.
@vovakulikov: The
MonacoField(which I didn't rename) was passing a bunch of settings that only applied to the Monaco version. I think it's safe to just remove those but let me know if you there is anything specific I should test.Test plan
TypeScript compiler.
App preview:
Check out the client app preview documentation to learn more.