Skip to content

Commit 602c914

Browse files
authored
COMPASS 1217 & 1330 backport to 1.8-releases (#1132)
* COMPASS-1217 Update .travis.yml: workaround runner (#1130) * COMPASS-1330 Remove extra padding from create index modal (#1129) * 🐛 COMPASS-1330 Remove extra padding from create index modal It was also previously inconsistent with the Create/Drop DB/Collection modals, which have no extra padding. * Flexbox style pass * Remove noop * 📝 Add comment * 🐛 Remove overflow hiding the dropdown and redundant CSS cruft
1 parent 4941452 commit 602c914

File tree

3 files changed

+11
-32
lines changed

3 files changed

+11
-32
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ before_script:
2323
- npm run check
2424
- mkdir -p /home/travis/build/10gen/compass/node_modules/mongodb-version-manager/.mongodb/downloads/
2525
- wget -P /home/travis/build/10gen/compass/node_modules/mongodb-version-manager/.mongodb/downloads/ http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.12.tgz
26-
- wget -P /home/travis/build/10gen/compass/node_modules/mongodb-version-manager/.mongodb/downloads/ http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.5.tgz
26+
- wget -P /home/travis/build/10gen/compass/node_modules/mongodb-version-manager/.mongodb/downloads/ http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.6.tgz
2727
script: npm run test
2828
cache:
2929
directories:

src/internal-packages/indexes/lib/component/create-index-field.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ class CreateIndexField extends React.Component {
128128
const hasTypeError = this.state.isTypeValid ? '' : 'has-error';
129129

130130
return (
131-
<div className="form-inline row create-index-field">
132-
<div className="col-md-6" data-test-id="create-index-modal-field-select">
131+
<div className="form-inline create-index-field">
132+
<div className="create-index-field-dropdown-name" data-test-id="create-index-modal-field-select">
133133
<Select.Creatable
134134
value={this.props.field.name}
135135
placeholder={DEFAULT_FIELD.name}
@@ -140,7 +140,7 @@ class CreateIndexField extends React.Component {
140140
className={hasNameError}
141141
/>
142142
</div>
143-
<div className="col-md-4" data-test-id="create-index-modal-type-select">
143+
<div className="create-index-field-dropdown-type" data-test-id="create-index-modal-type-select">
144144
<Select
145145
value={this.props.field.type}
146146
placeholder={DEFAULT_FIELD.type}
@@ -151,7 +151,7 @@ class CreateIndexField extends React.Component {
151151
className={hasTypeError}
152152
/>
153153
</div>
154-
<div className="col-md-2">
154+
<div>
155155
<button disabled={this.props.isRemovable}
156156
className="btn btn-primary btn-circle"
157157
onClick={this.remove.bind(this)}>

src/internal-packages/indexes/styles/create-index-modal.less

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
}
77

88
.create-index-modal-content {
9-
padding-left: 40px;
10-
padding-right: 40px;
11-
129
.modal-header {
1310
padding-bottom: 4px;
1411
}
@@ -25,19 +22,6 @@
2522
margin-top: 8px;
2623
right: 10px;
2724
}
28-
29-
.col-md-6 {
30-
padding-right: 0px;
31-
32-
.dropdown-menu {
33-
max-height: 400px;
34-
overflow: auto;
35-
}
36-
}
37-
38-
.col-md-4 {
39-
padding-right: 0px;
40-
}
4125
}
4226

4327
.create-index-field-add {
@@ -46,27 +30,26 @@
4630

4731
.create-index-field {
4832
margin-bottom: 5px;
33+
display: flex;
4934

5035
.has-error .Select-control {
5136
border: 1px solid #EF4C4C;
5237
box-shadow: 0 2px 6px 0 rgba(239,76,76,0.30);
5338
}
5439

55-
.create-index-field-dropdown-name {
56-
width: 164px;
40+
&-dropdown-name {
41+
width: 260px;
5742
text-align: left;
5843
text-transform: none;
59-
overflow: hidden;
60-
text-overflow: ellipsis;
61-
padding-right: 25px;
44+
padding-right: 10px;
6245
white-space: nowrap;
6346
}
6447

65-
.create-index-field-dropdown-type {
48+
&-dropdown-type {
6649
width: 120px;
6750
text-align: left;
6851
text-transform: none;
69-
margin-left: -7px;
52+
margin-right: 8px;
7053
}
7154
}
7255

@@ -131,10 +114,6 @@
131114
}
132115
}
133116

134-
.index-field-dropdown-btn {
135-
text-transform: none;
136-
}
137-
138117
.create-index-confirm-buttons {
139118
text-align: right;
140119

0 commit comments

Comments
 (0)