Skip to content

Commit d21da72

Browse files
authored
chore(compass): remove global tag selector styles from bootstrap, update styles to account (#2907)
1 parent 901e8ef commit d21da72

File tree

14 files changed

+43
-108
lines changed

14 files changed

+43
-108
lines changed

packages/compass-aggregations/src/components/settings/settings.jsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { PureComponent } from 'react';
22
import PropTypes from 'prop-types';
33
import classnames from 'classnames';
4+
import { Label, Description } from '@mongodb-js/compass-components';
45

56
import { TextButton } from 'hadron-react-buttons';
67
import {
@@ -76,11 +77,11 @@ class Settings extends PureComponent {
7677
return (
7778
<div className={classnames(styles['input-group'])}>
7879
<div className={classnames(styles['input-meta'])}>
79-
<label htmlFor='aggregation-limit'>Limit</label>
80-
<p id="aggregation-limit-description">
80+
<Label htmlFor='aggregation-limit'>Limit</Label>
81+
<Description id="aggregation-limit-description">
8182
Limits input documents before $group, $bucket, and $bucketAuto
8283
stages. Set a limit to make the collection run faster.
83-
</p>
84+
</Description>
8485
</div>
8586
<div className={classnames(styles['input-control'])}>
8687
<input
@@ -112,11 +113,11 @@ class Settings extends PureComponent {
112113
<div className={classnames(styles.body)}>
113114
<div className={classnames(styles['input-group'])}>
114115
<div className={classnames(styles['input-meta'])}>
115-
<label htmlFor="aggregation-comment-mode">Comment Mode</label>
116-
<p id="aggregation-comment-mode-description">
116+
<Label htmlFor="aggregation-comment-mode">Comment Mode</Label>
117+
<Description id="aggregation-comment-mode-description">
117118
When enabled, adds helper comments to each stage. Only applies to
118119
new stages.
119-
</p>
120+
</Description>
120121
</div>
121122
<div className={classnames(styles['input-control'])}>
122123
<input
@@ -130,8 +131,8 @@ class Settings extends PureComponent {
130131
</div>
131132
<div className={classnames(styles['input-group'])}>
132133
<div className={classnames(styles['input-meta'])}>
133-
<label htmlFor="aggregation-sample-size">Number of Preview Documents</label>
134-
<p id="aggregation-sample-size-description">Specify the number of documents to show in the preview.</p>
134+
<Label htmlFor="aggregation-sample-size">Number of Preview Documents</Label>
135+
<Description id="aggregation-sample-size-description">Specify the number of documents to show in the preview.</Description>
135136
</div>
136137
<div className={classnames(styles['input-control'])}>
137138
<input
@@ -147,11 +148,11 @@ class Settings extends PureComponent {
147148
</div>
148149
<div className={classnames(styles['input-group'])}>
149150
<div className={classnames(styles['input-meta'])}>
150-
<label htmlFor="aggregation-max-time-ms">Max Time</label>
151-
<p id="aggregation-max-time-ms-description">
151+
<Label htmlFor="aggregation-max-time-ms">Max Time</Label>
152+
<Description id="aggregation-max-time-ms-description">
152153
Specifies a cumulative time limit in milliseconds for processing
153154
operations on a cursor. Max timeout prevents long hang times.
154-
</p>
155+
</Description>
155156
</div>
156157
<div className={classnames(styles['input-control'])}>
157158
<input

packages/compass-aggregations/src/components/settings/settings.module.less

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
}
4949

5050
.input-group {
51-
margin: 10px;
52-
padding: 4px 10px 4px 10px;
51+
margin: 8px;
52+
padding: 8px 16px;
5353
background-color: #FFFFFF;
5454
display: flex;
5555
align-items: center;
@@ -83,12 +83,7 @@
8383
.input-meta {
8484
flex-grow: 1;
8585

86-
label {
87-
font-size: 13px;
88-
color: #464C4F;
89-
}
9086
p {
91-
font-size: 12px;
92-
color: #777A7F;
87+
margin-top: 8px;
9388
}
9489
}

packages/compass-collection/src/components/collection-header/collection-header.module.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
text-overflow: ellipsis;
2828
white-space: nowrap;
2929
cursor: pointer;
30+
text-decoration: none;
31+
&:hover,&:focus {
32+
text-decoration: underline;
33+
}
3034
}
3135

3236
&-collection {

packages/compass-components/src/components/resize-handle.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const verticalResizerStyle = css({
4545
});
4646

4747
const horizontalResizerStyle = css({
48+
width: '100%',
4849
height: '4px !important',
4950
top: '-2px',
5051
right: 0,

packages/compass-import-export/src/components/export-modal/export-modal.module.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
@import (reference) 'mongodb-compass/src/app/styles/index.less';
22

33
.export-modal {
4+
&-radio {
5+
font-weight: bold;
6+
margin-bottom: 5px;
7+
}
8+
49
&-radio input[type="radio"] {
510
margin-right: 10px;
611
}

packages/compass-import-export/src/components/export-select-fields/export-select-fields.module.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
th, td {
7979
padding: 3px 5px !important;
8080
border: 1px solid @gray6;
81+
text-align: left;
8182
}
8283
}
8384
}

packages/compass-import-export/src/components/export-select-output/export-select-output.jsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import { FILETYPE } from '../../constants/export-step';
77
import styles from './export-select-output.module.less';
88
import React, { PureComponent } from 'react';
99
import createStyler from '../../utils/styler.js';
10-
import classnames from 'classnames';
1110
import PropTypes from 'prop-types';
1211
import {
1312
FormGroup,
1413
InputGroup,
15-
FormControl,
16-
ControlLabel
14+
FormControl
1715
} from 'react-bootstrap';
1816
import {
1917
STARTED,
@@ -23,6 +21,7 @@ import {
2321
UNSPECIFIED,
2422
COMPLETED_WITH_ERRORS
2523
} from '../../constants/process-status';
24+
import { Label } from '@mongodb-js/compass-components';
2625

2726
const style = createStyler(styles, 'export-select-output');
2827

@@ -95,14 +94,17 @@ class ExportSelectOutput extends PureComponent {
9594
label="Select Export File Type"
9695
onSelected={this.props.selectExportFileType}/>
9796
<FormGroup controlId="export-file">
98-
<ControlLabel>Output</ControlLabel>
97+
<Label
98+
htmlFor="select-export-file-output"
99+
>Output</Label>
99100
<InputGroup bsClass={style('browse-group')}>
100101
<FormControl type="text" value={this.props.fileName} readOnly />
101102
<IconTextButton
102103
text="Browse"
104+
id="select-export-file-output"
103105
iconClassName="fa fa-folder-open-o"
104106
clickHandler={this.handleChooseFile}
105-
className={classnames('btn btn-default btn-sm')}/>
107+
className={'btn btn-default btn-sm'}/>
106108
</InputGroup>
107109
</FormGroup>
108110
</form>

packages/compass-import-export/src/components/select-file-type/select-file-type.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { PureComponent } from 'react';
22
import PropTypes from 'prop-types';
3-
import { Button, FormGroup, ControlLabel } from 'react-bootstrap';
3+
import { Button, FormGroup } from 'react-bootstrap';
4+
import { Label } from '@mongodb-js/compass-components';
45

56
import classnames from 'classnames';
67
import FILE_TYPES from '../../constants/file-types';
@@ -19,7 +20,7 @@ class SelectFileType extends PureComponent {
1920
const { fileType, onSelected, label } = this.props;
2021
return (
2122
<FormGroup>
22-
<ControlLabel>{label}</ControlLabel>
23+
<Label>{label}</Label>
2324
<div className={style()}>
2425
<Button
2526
data-test-id="select-file-type-json"

packages/compass-indexes/src/components/create-index-modal/create-index-modal.module.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@
4646

4747
&-options {
4848
&-checkbox {
49-
margin-top: 0px;
49+
margin-top: 8px;
5050
cursor: pointer;
5151
display: inline-block;
5252
font-weight: normal;
5353
margin-bottom: 4px;
5454
margin-left: 10px;
5555
}
5656
&-param {
57-
margin-top: 0px;
57+
margin-top: 8px;
5858
cursor: pointer;
5959
display: inline-block;
6060
font-weight: normal;

packages/compass-indexes/src/components/index-header/index-header.module.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.index-header {
2+
text-align: left;
3+
24
th {
35
padding: 12px 24px;
46
}

0 commit comments

Comments
 (0)