@@ -56,6 +56,13 @@ import { WebWorkspaceTab as WelcomeWorkspaceTab } from '@mongodb-js/compass-welc
5656import { useCompassWebPreferences } from './preferences' ;
5757import { DataModelingWorkspaceTab as DataModelingWorkspace } from '@mongodb-js/compass-data-modeling' ;
5858import { DataModelStorageServiceProviderInMemory } from '@mongodb-js/compass-data-modeling/web' ;
59+ import { WorkspaceTab as MyQueriesWorkspace } from '@mongodb-js/compass-saved-aggregations-queries' ;
60+ import {
61+ FavoriteQueryStorageProvider ,
62+ RecentQueryStorageProvider ,
63+ compassFavoriteQueryStorageAccess ,
64+ compassRecentQueryStorageAccess ,
65+ } from '@mongodb-js/my-queries-storage' ;
5966import {
6067 CompassAssistantDrawer ,
6168 CompassAssistantProvider ,
@@ -173,61 +180,66 @@ function CompassWorkspace({
173180 onOpenConnectViaModal,
174181} : CompassWorkspaceProps ) {
175182 return (
176- < WorkspacesProvider
177- value = { [
178- WelcomeWorkspaceTab ,
179- DatabasesWorkspaceTab ,
180- CollectionsWorkspaceTab ,
181- CollectionWorkspace ,
182- DataModelingWorkspace ,
183- ] }
184- >
185- < CollectionTabsProvider
186- queryBar = { CompassQueryBarPlugin }
187- tabs = { [
188- CompassDocumentsPlugin ,
189- CompassAggregationsPlugin ,
190- CompassSchemaPlugin ,
191- CompassIndexesPlugin ,
192- CompassSchemaValidationPlugin ,
193- CompassGlobalWritesPlugin ,
194- ] }
195- modals = { [
196- ExplainPlanCollectionTabModal ,
197- ExportToLanguageCollectionTabModal ,
198- ] }
199- >
200- < div
201- data-testid = "compass-web-connected"
202- className = { connectedContainerStyles }
183+ < FavoriteQueryStorageProvider value = { compassFavoriteQueryStorageAccess } >
184+ < RecentQueryStorageProvider value = { compassRecentQueryStorageAccess } >
185+ < WorkspacesProvider
186+ value = { [
187+ WelcomeWorkspaceTab ,
188+ DatabasesWorkspaceTab ,
189+ CollectionsWorkspaceTab ,
190+ CollectionWorkspace ,
191+ DataModelingWorkspace ,
192+ MyQueriesWorkspace ,
193+ ] }
203194 >
204- < WorkspacesPlugin
205- initialWorkspaceTabs = { initialWorkspaceTabs }
206- openOnEmptyWorkspace = { { type : 'Welcome' } }
207- onActiveWorkspaceTabChange = { onActiveWorkspaceTabChange }
208- renderSidebar = { ( ) => {
209- return (
210- < CompassSidebarPlugin
211- onOpenConnectViaModal = { onOpenConnectViaModal }
212- isCompassWeb = { true }
213- > </ CompassSidebarPlugin >
214- ) ;
215- } }
216- renderModals = { ( ) => {
217- return (
218- < >
219- < CreateViewPlugin > </ CreateViewPlugin >
220- < CreateNamespacePlugin > </ CreateNamespacePlugin >
221- < DropNamespacePlugin > </ DropNamespacePlugin >
222- < RenameCollectionPlugin > </ RenameCollectionPlugin >
223- < CompassAssistantDrawer />
224- </ >
225- ) ;
226- } }
227- > </ WorkspacesPlugin >
228- </ div >
229- </ CollectionTabsProvider >
230- </ WorkspacesProvider >
195+ < CollectionTabsProvider
196+ queryBar = { CompassQueryBarPlugin }
197+ tabs = { [
198+ CompassDocumentsPlugin ,
199+ CompassAggregationsPlugin ,
200+ CompassSchemaPlugin ,
201+ CompassIndexesPlugin ,
202+ CompassSchemaValidationPlugin ,
203+ CompassGlobalWritesPlugin ,
204+ ] }
205+ modals = { [
206+ ExplainPlanCollectionTabModal ,
207+ ExportToLanguageCollectionTabModal ,
208+ ] }
209+ >
210+ < div
211+ data-testid = "compass-web-connected"
212+ className = { connectedContainerStyles }
213+ >
214+ < WorkspacesPlugin
215+ initialWorkspaceTabs = { initialWorkspaceTabs }
216+ openOnEmptyWorkspace = { { type : 'Welcome' } }
217+ onActiveWorkspaceTabChange = { onActiveWorkspaceTabChange }
218+ renderSidebar = { ( ) => {
219+ return (
220+ < CompassSidebarPlugin
221+ onOpenConnectViaModal = { onOpenConnectViaModal }
222+ isCompassWeb = { true }
223+ > </ CompassSidebarPlugin >
224+ ) ;
225+ } }
226+ renderModals = { ( ) => {
227+ return (
228+ < >
229+ < CreateViewPlugin > </ CreateViewPlugin >
230+ < CreateNamespacePlugin > </ CreateNamespacePlugin >
231+ < DropNamespacePlugin > </ DropNamespacePlugin >
232+ < RenameCollectionPlugin > </ RenameCollectionPlugin >
233+ < CompassAssistantDrawer />
234+ </ >
235+ ) ;
236+ } }
237+ > </ WorkspacesPlugin >
238+ </ div >
239+ </ CollectionTabsProvider >
240+ </ WorkspacesProvider >
241+ </ RecentQueryStorageProvider >
242+ </ FavoriteQueryStorageProvider >
231243 ) ;
232244}
233245
0 commit comments