Skip to content

Commit 5db7ca6

Browse files
fredtrumandurran
authored andcommitted
Compass-289: Styles for tabs, databases view, collections view, action bar across the app. (#618)
* Compass-289: instance-level, db-level, collection-level tabs restyle all on new light theme; Compass-322: restyle databases table for light theme; Compass-336: style collections table at database-level * Compass-209: Index view action bar consistency * Compass-209: Action bar consistency on doc validation as well as some general view consistency on doc validation * add query bar border back * add query bar border radius back * scrollbar alignment fixes, and container for RTSS charts. * removed rounded corners * document insert button position fix
1 parent 2470ed0 commit 5db7ca6

File tree

29 files changed

+235
-161
lines changed

29 files changed

+235
-161
lines changed

src/app/home/index.less

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,13 @@
7474
font-size: 24px;
7575
}
7676
.column-container {
77-
display: flex;
78-
overflow: hidden;
79-
height: 100vh; // this isn't working properly at 100, is it a flexbox bug?
80-
margin-top: -102px; // total computed header + .refine-view-container height
81-
padding-top: 102px; // total computed header + .refine-view-container height
82-
width: 100%;
83-
&.with-refinebar {
84-
margin-top: -155px;
85-
padding-top: 155px;
86-
}
87-
&.with-refinebar-and-message {
88-
margin-top: -187px;
89-
padding-top: 187px;
90-
}
9177
&::-webkit-scrollbar {
9278
display: none;
9379
}
9480
}
9581

9682
.header-margin {
97-
margin-top: 60px; // size of header
83+
margin-top: 50px; // size of header
9884
}
9985

10086
.column {
@@ -109,11 +95,38 @@
10995

11096
.main {
11197
padding: 0 26px 100px 26px;
112-
flex: 1;
11398
overflow-x: hidden;
11499
background-color: @gray8;
100+
position: absolute;
101+
left: 250px;
102+
right: 0;
103+
bottom: 0;
104+
top: 95px;
115105
}
116106

107+
.column-container {
108+
&.with-message {
109+
.main {
110+
top: 128px;
111+
}
112+
}
113+
&.with-refinebar {
114+
.main {
115+
top: 149px;
116+
}
117+
}
118+
&.with-refinebar-and-message {
119+
.main {
120+
top: 181px;
121+
}
122+
}
123+
&.with-refinebar-and-2xmessage {
124+
.main {
125+
top: 214px;
126+
}
127+
}
128+
}
129+
117130
.side {
118131
width: 0;
119132
font-family: @font-family-monospace;

src/app/styles/10strap.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ textarea {
6868

6969
.form-control {
7070
color: @gray0;
71-
border: 1px solid rgba(0,0,0,0.1);
71+
border: 1px solid rgba(0,0,0,0.2);
7272
background: rgba(0,0,0,0.05);
7373
border-radius: 0;
74-
box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
75-
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
74+
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
75+
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
7676
}
7777

7878
input.form-control,
@@ -148,7 +148,7 @@ a.no-underline:hover {
148148
font-weight: bold;
149149
}
150150
.btn-xs {
151-
padding: 2px 8px;
151+
padding: 1px 8px;
152152
font-size: 11px;
153153
font-weight: bold;
154154
}

src/app/styles/index.less

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,36 @@ i.syntax-help {
9595
color: #a94442; // same color as bootstrap validation error borders
9696
}
9797
}
98+
99+
//action-bar, just a drop-shadow for now but should think about where to put these styles eventually
100+
.action-bar {
101+
box-shadow: 0px 1px 2px rgba(0,0,0,.2);
102+
height: 32px;
103+
background: @gray8;
104+
border-bottom: 1px solid @gray7;
105+
padding-top: 4px;
106+
padding-left: 20px;
107+
position: fixed;
108+
left: 250px;
109+
right: 0;
110+
z-index: 4;
111+
}
112+
113+
.rtss-databases,
114+
.collections {
115+
.action-bar {
116+
top: 46px;
117+
}
118+
}
119+
120+
.validation {
121+
.action-bar {
122+
top: 96px;
123+
}
124+
}
125+
126+
.column.main {
127+
.action-bar {
128+
position: static;
129+
}
130+
}

src/internal-packages/app/styles/tab-nav-bar.less

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@
1616
margin-bottom: 0;
1717
position: absolute;
1818
top: 16px;
19-
margin-left: 10px;
19+
margin-left: 0px;
20+
padding-left: 20px;
2021
}
2122

2223
&-tab {
23-
height: 30px;
24+
height: 29px;
2425
width: 130px;
2526
margin-right: 5px;
2627
font-size: 13px;
2728
text-transform: uppercase;
28-
border-radius: 3px 3px 0 0;
2929
display: flex;
3030
justify-content: center;
3131
cursor: pointer;
3232
margin-bottom: 0;
33-
color: #43B1E5;
33+
color: #838F9B;
34+
border-bottom: 3px solid @pw;
3435
}
3536

3637
&-tab:hover {
3738
background-color: @pw;
38-
color: @gray0;
39-
border: 1px solid @gray7;
39+
color: @chart1;
4040

4141
.tab-nav-bar-link {
42-
color: @gray0;
42+
color: @chart1;
4343
}
4444
}
4545

@@ -48,7 +48,6 @@
4848
text-transform: uppercase;
4949
font-size: 11px;
5050
font-weight: bold;
51-
color: #43B1E5;
5251
}
5352

5453
&-link:hover, &-link:active, &-link:focus {
@@ -58,22 +57,19 @@
5857

5958
&-is-selected {
6059
.tab-nav-bar-link {
61-
color: @gray0;
60+
color: @chart1;
6261
}
6362

6463
&.tab-nav-bar-tab:hover {
65-
background-color: @gray8;
66-
border-bottom: none;
64+
border-color: @chart1;
6765
}
68-
background-color: @gray8;
6966
cursor: default;
70-
border: #ebebed 1px solid;
71-
border-bottom: none;
67+
border-color: @chart1;
7268
}
73-
69+
//shouldn't positioning of the component happen when it's rendered by its parent?
7470
&-is-light-theme {
7571
.tab-nav-bar-header {
76-
top: 60px;
72+
top: 50px;
7773
height: 46px;
7874
z-index: 2;
7975
border-bottom: 1px solid #ebebed;

src/internal-packages/collection/styles/index.less

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,13 @@
1414
font-size: 24px;
1515
}
1616
.column-container {
17-
display: flex;
18-
overflow: hidden;
19-
height: 100vh; // this isn't working properly at 100, is it a flexbox bug?
20-
margin-top: -102px; // total computed header + .refine-view-container height
21-
padding-top: 102px; // total computed header + .refine-view-container height
22-
width: 100%;
23-
&.with-refinebar {
24-
margin-top: -155px;
25-
padding-top: 155px;
26-
}
27-
&.with-refinebar-and-message {
28-
margin-top: -187px;
29-
padding-top: 187px;
30-
}
3117
&::-webkit-scrollbar {
3218
display: none;
3319
}
3420
}
3521

3622
.header-margin {
37-
margin-top: 60px; // size of header
23+
margin-top: 50px; // size of header
3824
}
3925

4026
.column {
@@ -49,9 +35,36 @@
4935

5036
.main {
5137
padding: 0 26px 100px 26px;
52-
flex: 1;
5338
overflow-x: hidden;
5439
background-color: @gray8;
40+
position: absolute;
41+
left: 250px;
42+
right: 0;
43+
bottom: 0;
44+
top: 95px;
45+
}
46+
47+
.column-container {
48+
&.with-message {
49+
.main {
50+
top: 128px;
51+
}
52+
}
53+
&.with-refinebar {
54+
.main {
55+
top: 149px;
56+
}
57+
}
58+
&.with-refinebar-and-message {
59+
.main {
60+
top: 181px;
61+
}
62+
}
63+
&.with-refinebar-and-2xmessage {
64+
.main {
65+
top: 214px;
66+
}
67+
}
5568
}
5669

5770
.side {

src/internal-packages/crud/lib/component/document-list.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class DocumentList extends React.Component {
249249
<div className="header-margin">
250250
<this.queryBar />
251251
<this.samplingMessage insertHandler={this.handleOpenInsert.bind(this)} />
252-
<div className="column-container with-refinebar-and-message">
252+
<div className="column-container with-refinebar-and-2xmessage">
253253
<div className="column main">
254254
<ol className={LIST_CLASS} ref={(c) => this._node = c}>
255255
{this.state.docs}

src/internal-packages/crud/styles/document-list.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.document-list {
22
.list-unstyled;
3-
padding-top: 10px;
3+
padding-top: 0;
44
padding-bottom: 10px;
55
position: relative;
66

src/internal-packages/database/lib/components/collections-table.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ class CollectionsTable extends React.Component {
4242

4343
return (
4444
<div className="collections-table">
45-
<div className="collections-table-create-button">
45+
<div className="collections-table-create-button action-bar">
4646
{writable ?
4747
<TextButton
4848
text="Create Collection"
49-
className="btn btn-default btn-sm"
49+
className="btn btn-primary btn-xs"
5050
clickHandler={this.onCreateCollectionButtonClicked.bind(this)} /> : null}
5151
</div>
5252
<this.SortableTable

src/internal-packages/database/lib/components/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DatabaseView extends React.Component {
1717
render() {
1818
const collectionsTableView = <CollectionsTableView />;
1919
return (
20-
<div className="collections-table">
20+
<div className="collections">
2121
<this.TabNavBar
2222
theme="light"
2323
tabs={['Collections']}
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
@import './drop-collection-dialog.less';
22

3+
.collections {
4+
5+
.tab-nav-bar-header {
6+
top: 0;
7+
}
8+
}
9+
310
.collections-table {
4-
font-family: "Akzidenz", "Helvetica Neue", Helvetica, Arial, sans-serif;
5-
font-weight: 500;
611
background-color: @gray8;
7-
height: 100vh;
8-
min-width: 100%;
9-
overflow-x: scroll;
10-
margin-top: -60px; // hack to compensate for light view having +60 margin top
12+
overflow-y: scroll;
13+
padding: 0 20px 100px 20px;
14+
position: absolute;
15+
top: 78px;
16+
right: 0;
17+
bottom: 0;
18+
left: 250px;
1119

1220
&-create-button {
13-
margin-left: 23px;
14-
margin-top: 130px; // this is a bit of a hack
21+
1522
}
1623
}

0 commit comments

Comments
 (0)