Skip to content

Commit

Permalink
chore(databases-collection): refactor create db / create coll to a si…
Browse files Browse the repository at this point in the history
…ngle create namespace plugin COMPASS-7410 (#5100)

* chore(databases-collection): refactor create db / create coll to a single create namespace plugin

* chore(databases-collections): re-introduce old tests; add plugin service mock helper; add new plugin tests

* chore(app-registry): use scoped globalAppRegistry in withMockedServices helper

* chore(instance): off -> removeListener

* chore(databases-collections): only reset relevant state on open
  • Loading branch information
gribnoysup authored Nov 14, 2023
1 parent da91b3e commit cbb9d01
Show file tree
Hide file tree
Showing 39 changed files with 806 additions and 1,743 deletions.
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/compass-home/src/components/home.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const createDataService = () => ({
setName: 'foo',
};
},
configuredKMSProviders() {
return [];
},
on() {},
off() {},
});
Expand Down
6 changes: 2 additions & 4 deletions packages/compass-home/src/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ import { CompassSettingsPlugin } from '@mongodb-js/compass-settings';
import { CreateViewPlugin } from '@mongodb-js/compass-aggregations';
import { CompassFindInPagePlugin } from '@mongodb-js/compass-find-in-page';
import {
CreateDatabasePlugin,
CreateCollectionPlugin,
CreateNamespacePlugin,
DropNamespacePlugin,
} from '@mongodb-js/compass-databases-collections';
import { ImportPlugin, ExportPlugin } from '@mongodb-js/compass-import-export';
Expand Down Expand Up @@ -361,6 +360,7 @@ function Home({
<ImportPlugin></ImportPlugin>
<ExportPlugin></ExportPlugin>
<CreateViewPlugin></CreateViewPlugin>
<CreateNamespacePlugin></CreateNamespacePlugin>
<DropNamespacePlugin></DropNamespacePlugin>
<Workspace
namespace={namespace}
Expand Down Expand Up @@ -391,8 +391,6 @@ function Home({
</div>
<CompassSettingsPlugin></CompassSettingsPlugin>
<CompassFindInPagePlugin></CompassFindInPagePlugin>
<CreateDatabasePlugin></CreateDatabasePlugin>
<CreateCollectionPlugin></CreateCollectionPlugin>
<AtlasSignIn></AtlasSignIn>
</SignalHooksProvider>
);
Expand Down
2 changes: 2 additions & 0 deletions packages/databases-collections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
"@mongodb-js/compass-app-stores": "^7.6.1",
"@mongodb-js/compass-components": "^1.19.0",
"@mongodb-js/compass-editor": "^0.18.0",
"@mongodb-js/compass-logging": "^1.2.6",
Expand Down Expand Up @@ -87,6 +88,7 @@
"sinon": "^9.2.3"
},
"dependencies": {
"@mongodb-js/compass-app-stores": "^7.6.1",
"@mongodb-js/compass-components": "^1.19.0",
"@mongodb-js/compass-editor": "^0.18.0",
"@mongodb-js/compass-logging": "^1.2.6",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cbb9d01

Please sign in to comment.