Skip to content

Commit 1b42219

Browse files
committed
improvements to sidebar open-close interaction, changed to percent width for sidebar
1 parent b54a744 commit 1b42219

File tree

5 files changed

+30
-12
lines changed

5 files changed

+30
-12
lines changed

scout-ui/src/home/collection.jade

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
.col-md-6
99
div(data-hook='stats-subview')
1010
div(data-hook='refine-bar')
11-
.column-container
11+
.column-container(data-hook='json-sidebar-toggle-class')
1212
.column.main
1313
div(data-hook='fields-subview')
1414
.splitter
15-
button.btn.btn-link.splitter-button
15+
button.btn.btn-link.splitter-button.splitter-button-open
1616
i.fa.fa-caret-left
1717
|
1818
i.fa.fa-file-text-o
19-
button.btn.btn-link.splitter-button.hidden
19+
button.btn.btn-link.splitter-button.splitter-button-close
2020
i.fa.fa-file-text-o
2121
|
2222
i.fa.fa-caret-right
23-
.column.side(data-hook='collection-side')
23+
.column.side
2424
div(data-hook='documents-subview')

scout-ui/src/home/collection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ module.exports = AmpersandView.extend({
2929
},
3030
'open': {
3131
type: 'booleanClass',
32-
yes: 'is-open',
33-
hook: 'collection-side'
32+
yes: 'sidebar-open',
33+
hook: 'json-sidebar-toggle-class'
3434
}
3535
},
3636
children: {

scout-ui/src/home/index.less

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,15 @@
116116
font-size: 11px;
117117
border-left: 2px solid @gray7;
118118
right: -12px;
119-
120-
&.is-open {
121-
width: 400px;
122-
}
119+
top: 30px;
123120
}
124121

125122
.splitter {
126123
width: 20px;
127124
height: 20px;
128125
position: relative;
129-
right: 20px;
126+
right: 10px;
127+
transition: right 250ms ease;
130128
}
131129
.splitter-button {
132130
outline: none;
@@ -141,5 +139,22 @@
141139
color: @green2;
142140
}
143141
}
142+
.splitter-button-close {
143+
display: none;
144+
}
145+
.column-container.sidebar-open {
146+
.side {
147+
width: 33%;
148+
}
149+
.splitter {
150+
right: -15px;
151+
}
152+
.splitter-button-open {
153+
display: none;
154+
}
155+
.splitter-button-close {
156+
display: inline-block;
157+
}
158+
}
144159
}
145160

scout-ui/src/object-tree/index.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222

2323
font-family: @font-family-monospace;
2424
font-size: 11px;
25+
padding-bottom: 10px;
26+
margin-bottom: 10px;
27+
border-bottom: 1px solid @gray7;
2528

2629
.jsobject {
2730
margin-left: 8px;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
.jsobject
1+
.jsobject.clearfix
22
div(data-hook='members-container')

0 commit comments

Comments
 (0)