Skip to content

Commit 17a8890

Browse files
committed
Merge branch 'main' into 1.29-releases
2 parents fd6c2c1 + 7b54fdb commit 17a8890

File tree

33 files changed

+1128
-145
lines changed

33 files changed

+1128
-145
lines changed

THIRD-PARTY-NOTICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **compass**.
2-
This document was automatically generated on Tue Oct 26 2021.
2+
This document was automatically generated on Wed Oct 27 2021.
33

44
## List of dependencies
55

package-lock.json

Lines changed: 344 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-components/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,19 @@
3636
"dependencies": {
3737
"@leafygreen-ui/badge": "^4.0.4",
3838
"@leafygreen-ui/banner": "^3.0.8",
39-
"@leafygreen-ui/button": "^12.0.3",
39+
"@leafygreen-ui/button": "^12.0.5",
4040
"@leafygreen-ui/card": "^5.1.3",
4141
"@leafygreen-ui/checkbox": "^6.0.5",
4242
"@leafygreen-ui/confirmation-modal": "^2.2.1",
4343
"@leafygreen-ui/icon": "^11.4.0",
4444
"@leafygreen-ui/icon-button": "^9.1.5",
4545
"@leafygreen-ui/leafygreen-provider": "^2.1.2",
46-
"@leafygreen-ui/logo": "^5.0.0",
46+
"@leafygreen-ui/logo": "^6.1.0",
47+
"@leafygreen-ui/palette": "^3.2.2",
4748
"@leafygreen-ui/portal": "^3.1.3",
4849
"@leafygreen-ui/select": "^3.0.4",
4950
"@leafygreen-ui/tabs": "^5.1.3",
51+
"@leafygreen-ui/text-area": "^4.0.3",
5052
"@leafygreen-ui/text-input": "^6.0.3",
5153
"@leafygreen-ui/toggle": "^7.0.4",
5254
"@leafygreen-ui/tokens": "^0.5.3",

packages/compass-components/src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@ export { default as Checkbox } from '@leafygreen-ui/checkbox';
1919
export { default as Icon } from '@leafygreen-ui/icon';
2020
export { default as IconButton } from '@leafygreen-ui/icon-button';
2121
export { default as LeafyGreenProvider } from '@leafygreen-ui/leafygreen-provider';
22-
export { AtlasLogoMark, LogoMark } from '@leafygreen-ui/logo';
22+
export {
23+
AtlasLogoMark,
24+
MongoDBLogoMark,
25+
MongoDBLogo,
26+
} from '@leafygreen-ui/logo';
27+
export { uiColors } from '@leafygreen-ui/palette';
2328
export { default as Portal } from '@leafygreen-ui/portal';
2429
export { Select, Option, Size as SelectSize } from '@leafygreen-ui/select';
2530
export { Tabs, Tab } from '@leafygreen-ui/tabs';
31+
export { default as TextArea } from '@leafygreen-ui/text-area';
2632
export { default as TextInput } from '@leafygreen-ui/text-input';
2733
export { default as Toggle } from '@leafygreen-ui/toggle';
2834
export { spacing } from '@leafygreen-ui/tokens';
2935
export { default as Tooltip } from '@leafygreen-ui/tooltip';
30-
export { H2, Link } from '@leafygreen-ui/typography';
36+
export { H3, Link, Description, Label } from '@leafygreen-ui/typography';
3137

3238
export { CancelLoader, ConfirmationModal, ResizeHandle, ResizeDirection };

packages/compass-connect/src/components/connect.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
44
import React from 'react';
55
import { Link } from '@mongodb-js/compass-components';
66
import ConnectForm from '@mongodb-js/connect-form';
7+
import { convertConnectionModelToInfo } from 'mongodb-data-service';
78

89
import Actions from '../actions';
910
import Sidebar from './sidebar';
@@ -145,13 +146,15 @@ class Connect extends React.Component {
145146
className={classnames(styles.page, styles.connect)}
146147
>
147148
<Sidebar {...this.props} />
148-
<div className={classnames(styles['form-container'])}>
149+
<div className={styles['form-container']}>
149150
{showNewConnectForm && <ConnectForm
151+
key={this.props.connectionModel._id}
152+
initialConnectionInfo={convertConnectionModelToInfo(this.props.connectionModel)}
150153
onConnectClicked={() => Actions.onConnectClicked()}
151154
/>}
152155
{!showNewConnectForm && (
153156
<div
154-
className={classnames(styles['connect-container'])}
157+
className={styles['connect-container']}
155158
onMouseMove={this.handleMouseMove.bind(this)}
156159
>
157160
{this.renderHeader()}

packages/compass-connect/src/components/connect.module.less

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,6 @@
1111
}
1212

1313
.connect {
14-
form {
15-
display: block;
16-
margin-top: 0em;
17-
background-color: white;
18-
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.075);
19-
padding: 15px 0;
20-
}
21-
22-
label {
23-
display: inline-block;
24-
max-width: 100%;
25-
margin-bottom: 5px;
26-
font-weight: bold;
27-
}
28-
2914
&-atlas {
3015
background: @compass-sidebar-atlas-background-color;
3116
display: flex;
@@ -103,6 +88,21 @@
10388
min-width: 360px;
10489
max-width: 800px;
10590

91+
form {
92+
display: block;
93+
margin-top: 0em;
94+
background-color: white;
95+
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.075);
96+
padding: 15px 0;
97+
}
98+
99+
label {
100+
display: inline-block;
101+
max-width: 100%;
102+
margin-bottom: 5px;
103+
font-weight: bold;
104+
}
105+
106106
.connect-string {
107107
margin: 10px;
108108

packages/compass-crud/src/components/toolbar.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class Toolbar extends React.Component {
4646
*/
4747
switchDocumentView(view) {
4848
this.props.viewSwitchHandler(view);
49-
this.props.refreshDocuments();
5049
}
5150

5251
_loadedMessage() {

packages/compass-crud/src/stores/crud-store.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ describe('store', function() {
464464
it('updates the document in the list', (done) => {
465465
const unsubscribe = store.listen((state) => {
466466
expect(state.docs[0]).to.not.equal(hadronDoc);
467-
expect(state.docs[0].elements.at(2).key === 'new field');
467+
expect(state.docs[0]).to.have.property('elements');
468+
expect(state.docs[0].elements.at(2).key).to.equal('new field');
468469
unsubscribe();
469470
// Ensure we have enough time for update-blocked or update-error to be called.
470471
setTimeout(() => done(), 100);

packages/compass-e2e-tests/helpers/commands/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ exports.addCommands = function (app) {
3232
add('setValidation', './set-validation');
3333
add('waitForAnimations', './wait-for-animations');
3434
add('setOrClearValue', './set-or-clear-value');
35+
add('listenForTelemetryEvents', './listen-for-telemetry-events');
3536
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = function (app) {
2+
return async function (telemetry) {
3+
const existingEventCount = telemetry.events().length;
4+
const { client } = app;
5+
6+
function lookupNewEvent(eventName) {
7+
const newEvents = telemetry.events().slice(existingEventCount);
8+
return newEvents.find((entry) => entry.event === eventName);
9+
}
10+
11+
return async (eventName) => {
12+
await client.waitUntil(
13+
async () => {
14+
await client.execute(() => {
15+
const { ipcRenderer } = require('electron');
16+
ipcRenderer.send('compass:usage:flush');
17+
});
18+
return !!lookupNewEvent(eventName);
19+
},
20+
{ timeout: 20000 }
21+
);
22+
23+
const ev = lookupNewEvent(eventName);
24+
const properties = { ...ev.properties };
25+
delete properties.compass_version;
26+
return properties;
27+
};
28+
};
29+
};

0 commit comments

Comments
 (0)