@@ -61,16 +61,6 @@ import { useCompassWebPreferences } from './preferences';
6161import { DataModelingWorkspaceTab as DataModelingWorkspace } from '@mongodb-js/compass-data-modeling' ;
6262import { DataModelStorageServiceProviderInMemory } from '@mongodb-js/compass-data-modeling/web' ;
6363import { WorkspaceTab as MyQueriesWorkspace } from '@mongodb-js/compass-saved-aggregations-queries' ;
64- import {
65- compassFavoriteQueryStorageAccess ,
66- compassRecentQueryStorageAccess ,
67- CompassPipelineStorage ,
68- } from '@mongodb-js/my-queries-storage' ;
69- import {
70- FavoriteQueryStorageProvider ,
71- RecentQueryStorageProvider ,
72- PipelineStorageProvider ,
73- } from '@mongodb-js/my-queries-storage/provider' ;
7464import { CompassAssistantProvider } from '@mongodb-js/compass-assistant' ;
7565import { CompassAssistantDrawerWithConnections } from './compass-assistant-drawer' ;
7666
@@ -188,72 +178,63 @@ function CompassWorkspace({
188178 onActiveWorkspaceTabChange,
189179 onOpenConnectViaModal,
190180} : CompassWorkspaceProps ) {
191- // Create a simple pipeline storage instance for sandbox
192- const pipelineStorage = new CompassPipelineStorage ( ) ;
193-
194181 return (
195- < PipelineStorageProvider value = { pipelineStorage } >
196- < FavoriteQueryStorageProvider value = { compassFavoriteQueryStorageAccess } >
197- < RecentQueryStorageProvider value = { compassRecentQueryStorageAccess } >
198- < WorkspacesProvider
199- value = { [
200- WelcomeWorkspaceTab ,
201- DatabasesWorkspaceTab ,
202- CollectionsWorkspaceTab ,
203- CollectionWorkspace ,
204- DataModelingWorkspace ,
205- MyQueriesWorkspace ,
206- ] }
207- >
208- < CollectionTabsProvider
209- queryBar = { CompassQueryBarPlugin }
210- tabs = { [
211- CompassDocumentsPlugin ,
212- CompassAggregationsPlugin ,
213- CompassSchemaPlugin ,
214- CompassIndexesPlugin ,
215- CompassSchemaValidationPlugin ,
216- CompassGlobalWritesPlugin ,
217- ] }
218- modals = { [
219- ExplainPlanCollectionTabModal ,
220- ExportToLanguageCollectionTabModal ,
221- ] }
222- >
223- < div
224- data-testid = "compass-web-connected"
225- className = { connectedContainerStyles }
226- >
227- < WorkspacesPlugin
228- initialWorkspaceTabs = { initialWorkspaceTabs }
229- openOnEmptyWorkspace = { { type : 'Welcome' } }
230- onActiveWorkspaceTabChange = { onActiveWorkspaceTabChange }
231- renderSidebar = { ( ) => {
232- return (
233- < CompassSidebarPlugin
234- onOpenConnectViaModal = { onOpenConnectViaModal }
235- isCompassWeb = { true }
236- > </ CompassSidebarPlugin >
237- ) ;
238- } }
239- renderModals = { ( ) => {
240- return (
241- < >
242- < CreateViewPlugin > </ CreateViewPlugin >
243- < CreateNamespacePlugin > </ CreateNamespacePlugin >
244- < DropNamespacePlugin > </ DropNamespacePlugin >
245- < RenameCollectionPlugin > </ RenameCollectionPlugin >
246- < CompassAssistantDrawerWithConnections />
247- </ >
248- ) ;
249- } }
250- > </ WorkspacesPlugin >
251- </ div >
252- </ CollectionTabsProvider >
253- </ WorkspacesProvider >
254- </ RecentQueryStorageProvider >
255- </ FavoriteQueryStorageProvider >
256- </ PipelineStorageProvider >
182+ < WorkspacesProvider
183+ value = { [
184+ WelcomeWorkspaceTab ,
185+ DatabasesWorkspaceTab ,
186+ CollectionsWorkspaceTab ,
187+ CollectionWorkspace ,
188+ DataModelingWorkspace ,
189+ MyQueriesWorkspace ,
190+ ] }
191+ >
192+ < CollectionTabsProvider
193+ queryBar = { CompassQueryBarPlugin }
194+ tabs = { [
195+ CompassDocumentsPlugin ,
196+ CompassAggregationsPlugin ,
197+ CompassSchemaPlugin ,
198+ CompassIndexesPlugin ,
199+ CompassSchemaValidationPlugin ,
200+ CompassGlobalWritesPlugin ,
201+ ] }
202+ modals = { [
203+ ExplainPlanCollectionTabModal ,
204+ ExportToLanguageCollectionTabModal ,
205+ ] }
206+ >
207+ < div
208+ data-testid = "compass-web-connected"
209+ className = { connectedContainerStyles }
210+ >
211+ < WorkspacesPlugin
212+ initialWorkspaceTabs = { initialWorkspaceTabs }
213+ openOnEmptyWorkspace = { { type : 'Welcome' } }
214+ onActiveWorkspaceTabChange = { onActiveWorkspaceTabChange }
215+ renderSidebar = { ( ) => {
216+ return (
217+ < CompassSidebarPlugin
218+ onOpenConnectViaModal = { onOpenConnectViaModal }
219+ isCompassWeb = { true }
220+ > </ CompassSidebarPlugin >
221+ ) ;
222+ } }
223+ renderModals = { ( ) => {
224+ return (
225+ < >
226+ < CreateViewPlugin > </ CreateViewPlugin >
227+ < CreateNamespacePlugin > </ CreateNamespacePlugin >
228+ < DropNamespacePlugin > </ DropNamespacePlugin >
229+ < RenameCollectionPlugin > </ RenameCollectionPlugin >
230+ < CompassAssistantDrawerWithConnections />
231+ </ >
232+ ) ;
233+ } }
234+ > </ WorkspacesPlugin >
235+ </ div >
236+ </ CollectionTabsProvider >
237+ </ WorkspacesProvider >
257238 ) ;
258239}
259240
0 commit comments