Skip to content

Commit d98e909

Browse files
committed
update design of SideNav
smaller menu
1 parent 6e0def3 commit d98e909

7 files changed

Lines changed: 43 additions & 33 deletions

File tree

browser/finder/FinderMain.styl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ $list-width = 250px
3030
absolute left top bottom
3131
width $nav-width
3232
background-color $ui-backgroundColor
33+
3334
.result-nav-filter
3435
margin-bottom 5px
36+
3537
.result-nav-filter-option
3638
height 25px
3739
line-height 25px
@@ -41,13 +43,13 @@ $list-width = 250px
4143

4244
.result-nav-menu
4345
navButtonColor()
44-
height 40px
46+
height 32px
4547
padding 0 10px
4648
font-size 14px
4749
width 100%
4850
outline none
4951
text-align left
50-
line-height 40px
52+
line-height 32px
5153
box-sizing border-box
5254
cursor pointer
5355

@@ -60,7 +62,7 @@ $list-width = 250px
6062

6163
.result-nav-storageList
6264
absolute bottom left right
63-
top 80px + 50px + 10px
65+
top 80px + 32px + 10px
6466
overflow-y auto
6567

6668
.result-list

browser/finder/NoteItem.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
color $ui-inactive-text-color
116116
vertical-align middle
117117
font-size 10px
118+
margin-left 5px
118119

119120
.bottom-time
120121
color $ui-inactive-text-color

browser/finder/StorageSection.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ class StorageSection extends React.Component {
4848
<div styleName='header'>
4949
<button styleName='header-toggleButton'
5050
onClick={(e) => this.handleToggleButtonClick(e)}
51-
><i className='fa fa-caret-down'/></button>
51+
>
52+
<i className={this.state.isOpen
53+
? 'fa fa-caret-down'
54+
: 'fa fa-caret-right'
55+
}
56+
/>
57+
</button>
5258
<button styleName={filter.type === 'STORAGE' && filter.storage === storage.key
5359
? 'header-name--active'
5460
: 'header-name'

browser/finder/StorageSection.styl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
position relative
33

44
.header
5-
height 30px
5+
height 26px
66
.header-toggleButton
77
absolute top left
88
width 25px
9-
height 30px
9+
height 26px
1010
navButtonColor()
1111
border none
1212
outline none
1313
.header-name
1414
display block
15-
height 30px
15+
height 26px
1616
navButtonColor()
1717
padding 0 10px 0 25px
1818
font-size 14px
1919
width 100%
2020
text-align left
21-
line-height 30px
21+
line-height 26px
2222
box-sizing border-box
2323
cursor pointer
2424
outline none
@@ -33,20 +33,20 @@
3333
.folderList-item
3434
display block
3535
width 100%
36-
height 30px
36+
height 26px
3737
navButtonColor()
3838
padding 0 10px 0 25px
3939
font-size 14px
4040
width 100%
4141
text-align left
42-
line-height 30px
42+
line-height 26px
4343
box-sizing border-box
4444
cursor pointer
4545
outline none
4646
padding 0 10px
4747
margin 2px 0
48-
height 30px
49-
line-height 30px
48+
height 26px
49+
line-height 26px
5050
border-width 0 0 0 6px
5151
border-style solid
5252
border-color transparent

browser/main/NoteList/NoteList.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
color $ui-inactive-text-color
147147
vertical-align middle
148148
font-size 10px
149+
margin-left 5px
149150

150151
.item-bottom-time
151152
color $ui-inactive-text-color

browser/main/SideNav/SideNav.styl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
overflow ellipsis
2626

2727
.menu
28-
margin-top 15px
28+
margin 0
2929

3030
.menu-button
3131
navButtonColor()
32-
height 44px
32+
height 32px
3333
padding 0 10px
3434
font-size 14px
3535
width 100%
@@ -48,8 +48,8 @@
4848

4949
.storageList
5050
absolute left right
51-
bottom 44px
52-
top 178px
51+
bottom 32px
52+
top 120px
5353
overflow-y auto
5454

5555
.storageList-empty
@@ -86,9 +86,9 @@
8686
position fixed
8787
display inline-block
8888
height 30px
89-
left 44px
89+
left 32px
9090
padding 0 10px
91-
margin-top -7px
91+
margin-top -8px
9292
opacity 0
9393
margin-left 0
9494
overflow hidden
@@ -105,20 +105,20 @@
105105
&:hover .menu-button-label
106106
transition opacity 0.15s
107107
opacity 1
108-
// TODO: extract tooltip style to a mixin
108+
109109
.menu-button-label
110110
position fixed
111111
display inline-block
112-
height 30px
112+
height 32px
113113
left 44px
114114
padding 0 10px
115-
margin-top -7px
115+
margin-top -8px
116116
margin-left 0
117117
overflow ellipsis
118118
background-color $ui-tooltip-backgroundColor
119119
z-index 10
120120
color white
121-
line-height 34px
121+
line-height 32px
122122
border-top-right-radius 2px
123123
border-bottom-right-radius 2px
124124
pointer-events none

browser/main/SideNav/StorageItem.styl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
user-select none
44
.header
55
position relative
6-
height 30px
6+
height 26px
77
width 100%
88
&:hover
99
background-color $ui-button--hover-backgroundColor
@@ -24,7 +24,7 @@
2424
position absolute
2525
left 0
2626
width 25px
27-
height 30px
27+
height 26px
2828
padding 0
2929
border none
3030
color $ui-inactive-text-color
@@ -37,10 +37,10 @@
3737
.header-info
3838
display block
3939
width 100%
40-
height 30px
40+
height 26px
4141
padding-left 25px
4242
padding-right 10px
43-
line-height 30px
43+
line-height 26px
4444
cursor pointer
4545
font-size 14px
4646
border none
@@ -58,11 +58,11 @@
5858
.folderList-item
5959
display block
6060
width 100%
61-
height 30px
61+
height 26px
6262
background-color transparent
6363
color $ui-inactive-text-color
6464
padding 0
65-
margin 2px 0
65+
margin-bottom 2px
6666
text-align left
6767
border none
6868
overflow ellipsis
@@ -84,8 +84,8 @@
8484
.folderList-item-name
8585
display block
8686
padding 0 10px
87-
height 30px
88-
line-height 30px
87+
height 26px
88+
line-height 26px
8989
border-width 0 0 0 6px
9090
border-style solid
9191
border-color transparent
@@ -99,9 +99,9 @@
9999
opacity 0
100100
border-top-right-radius 2px
101101
border-bottom-right-radius 2px
102-
height 30px
103-
margin-top -30px
104-
line-height 30px
102+
height 26px
103+
margin-top -26px
104+
line-height 26px
105105
.root--folded
106106
@extend .root
107107
.header

0 commit comments

Comments
 (0)