This pull request includes several changes aimed at refactoring and simplifying the codebase by consolidating the usage of the MonacoEditor component. The most important changes involve renaming and modifying components to use the MonacoEditor uniformly across different parts of the application.
Refactoring and consolidation of MonacoEditor usage:
Renamed src/webviews/QueryEditor/ResultPanel/DataViewPanelJSON.tsx to src/webviews/MonacoEditor.tsx and updated the component to accept EditorProps directly. ([[1]](diffhunk://#diff-658c73b23462509bae5644a5ab3451996ec26c97b3e4231f2539e5aea0f1a60fL6-R14), [[2]](diffhunk://#diff-658c73b23462509bae5644a5ab3451996ec26c97b3e4231f2539e5aea0f1a60fL31-R32))
Updated QueryMonaco component to use the newly created MonacoEditor component, removing direct dependencies on @monaco-editor/react and monaco-editor. ([[1]](diffhunk://#diff-3fc62f4da56576fac35507bb78ddb2239f560aef65f6ddc27fcf1a5d80f761a0L6-L30), [[2]](diffhunk://#diff-3fc62f4da56576fac35507bb78ddb2239f560aef65f6ddc27fcf1a5d80f761a0L42-R25))
Removed the InsightsTab component as it is no longer needed. ([src/webviews/QueryEditor/ResultPanel/InsightsTab.tsxL1-L31](diffhunk://#diff-ee0d33e799f58353de798158a681702208138ce1a7943ea6a447fe32a007bd83L1-L31))
Updated the ResultTab component to use MonacoEditor instead of DataViewPanelJSON for JSON view mode. ([[1]](diffhunk://#diff-54b7751b984e0d49729ab2d7a472a1d5128db11e00a6428852cd6e357cbe70f9R8-L12), [[2]](diffhunk://#diff-54b7751b984e0d49729ab2d7a472a1d5128db11e00a6428852cd6e357cbe70f9L44-R58))
Refactored DataViewPanelJSON in mongoClusters/collectionView/components to use the MonacoEditor component. ([[1]](diffhunk://#diff-60e910c310c7d7be0401138e6e7a78e4e419372678373a42b1772ce95fcc29afL6-L16), [[2]](diffhunk://#diff-60e910c310c7d7be0401138e6e7a78e4e419372678373a42b1772ce95fcc29afL40-R36))
This pull request includes several changes aimed at refactoring and simplifying the codebase by consolidating the usage of the
MonacoEditor
component. The most important changes involve renaming and modifying components to use theMonacoEditor
uniformly across different parts of the application.Refactoring and consolidation of
MonacoEditor
usage:src/webviews/QueryEditor/ResultPanel/DataViewPanelJSON.tsx
tosrc/webviews/MonacoEditor.tsx
and updated the component to acceptEditorProps
directly. ([[1]](diffhunk://#diff-658c73b23462509bae5644a5ab3451996ec26c97b3e4231f2539e5aea0f1a60fL6-R14)
,[[2]](diffhunk://#diff-658c73b23462509bae5644a5ab3451996ec26c97b3e4231f2539e5aea0f1a60fL31-R32)
)QueryMonaco
component to use the newly createdMonacoEditor
component, removing direct dependencies on@monaco-editor/react
andmonaco-editor
. ([[1]](diffhunk://#diff-3fc62f4da56576fac35507bb78ddb2239f560aef65f6ddc27fcf1a5d80f761a0L6-L30)
,[[2]](diffhunk://#diff-3fc62f4da56576fac35507bb78ddb2239f560aef65f6ddc27fcf1a5d80f761a0L42-R25)
)InsightsTab
component as it is no longer needed. ([src/webviews/QueryEditor/ResultPanel/InsightsTab.tsxL1-L31](diffhunk://#diff-ee0d33e799f58353de798158a681702208138ce1a7943ea6a447fe32a007bd83L1-L31)
)ResultTab
component to useMonacoEditor
instead ofDataViewPanelJSON
for JSON view mode. ([[1]](diffhunk://#diff-54b7751b984e0d49729ab2d7a472a1d5128db11e00a6428852cd6e357cbe70f9R8-L12)
,[[2]](diffhunk://#diff-54b7751b984e0d49729ab2d7a472a1d5128db11e00a6428852cd6e357cbe70f9L44-R58)
)DataViewPanelJSON
inmongoClusters/collectionView/components
to use theMonacoEditor
component. ([[1]](diffhunk://#diff-60e910c310c7d7be0401138e6e7a78e4e419372678373a42b1772ce95fcc29afL6-L16)
,[[2]](diffhunk://#diff-60e910c310c7d7be0401138e6e7a78e4e419372678373a42b1772ce95fcc29afL40-R36)
)