Merge lp:~stephen-stewart/snapweb/tidy-up-list-row into lp:~snappy-dev/snapweb/trunk

Proposed by Stephen Stewart on 2015-06-02
Status: Merged
Approved by: Sergio Schvezov on 2015-06-10
Approved revision: 163
Merged at revision: 156
Proposed branch: lp:~stephen-stewart/snapweb/tidy-up-list-row
Merge into: lp:~snappy-dev/snapweb/trunk
Prerequisite: lp:~stephen-stewart/snapweb/remove-not-uninstall
Diff against target: 270 lines (+104/-67)
5 files modified
www/src/css/infobar.css (+1/-3)
www/src/css/installer.css (+3/-3)
www/src/css/snaplist.css (+84/-51)
www/src/js/templates/snaplist-item.hbs (+8/-5)
www/src/js/templates/storelist-item.hbs (+8/-5)
To merge this branch: bzr merge lp:~stephen-stewart/snapweb/tidy-up-list-row
Reviewer Review Type Date Requested Status
Sergio Schvezov 2015-06-02 Approve on 2015-06-10
Review via email: mp+260837@code.launchpad.net

Commit Message

tidy up the row style listing, making it more small screen friendly

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'www/src/css/infobar.css'
2--- www/src/css/infobar.css 2015-06-01 22:33:50 +0000
3+++ www/src/css/infobar.css 2015-06-03 08:38:29 +0000
4@@ -1,10 +1,8 @@
5 /** @define b-infobar; weak */
6
7 .b-infobar {
8- padding: 4px 0;
9+ padding: 6px 0 0;
10 font-size: 12px;
11- background-color: #eee;
12- box-shadow:0 2px 1px #ddd;
13 }
14
15 .b-infobar .b-layout__container {
16
17=== modified file 'www/src/css/installer.css'
18--- www/src/css/installer.css 2015-06-01 16:27:13 +0000
19+++ www/src/css/installer.css 2015-06-03 08:38:29 +0000
20@@ -7,8 +7,8 @@
21 }
22
23 .b-installer_small {
24- font-size:13px;
25- width:160px;
26+ font-size:12px;
27+ width:100px;
28 }
29
30 .b-installer__button {
31@@ -19,7 +19,7 @@
32 cursor:pointer;
33 font-weight:400;
34 overflow: hidden;
35- padding:8px 2em;
36+ padding:8px 10px;
37 position:relative;
38 text-align:center;
39 text-overflow: ellipsis;
40
41=== modified file 'www/src/css/snaplist.css'
42--- www/src/css/snaplist.css 2015-05-27 15:47:34 +0000
43+++ www/src/css/snaplist.css 2015-06-03 08:38:29 +0000
44@@ -45,7 +45,11 @@
45 width:90px;
46 }
47
48-.b-snaplist_grid :not(.b-snaplist__item-app) .b-icon::after {
49+.b-snaplist_grid .b-snaplist__vendor {
50+ display:none;
51+}
52+
53+.b-snaplist :not(.b-snaplist__item-app) .b-icon::after {
54 content: attr(data-type);
55 position:absolute;
56 width:100%;
57@@ -67,24 +71,6 @@
58 display:none;
59 }
60
61-@media (--xxs) {
62- .b-snaplist_grid .b-snaplist__item {
63- padding:8px;
64- }
65-}
66-
67-@media (--xs) {
68- .b-snaplist_grid .b-snaplist__item {
69- padding:9px;
70- }
71-}
72-
73-@media (--s) {
74- .b-snaplist_grid .b-snaplist__item {
75- padding:10px;
76- }
77-}
78-
79 /** row style **/
80
81 .b-snaplist_row {
82@@ -92,60 +78,107 @@
83 }
84
85 .b-snaplist_row .b-snaplist__item {
86+ position:relative;
87 width:100%;
88 display:flex;
89 align-items:center;
90- padding:0.6em;
91- border-radius:4px;
92- margin-bottom:0.6em;
93- background-color:#fff;
94+ padding:8px 10px;
95 font-size:13px;
96+ border-top:1px solid #ddd;
97+}
98+
99+.b-snaplist_row .b-snaplist__type {
100+}
101+
102+.b-snaplist_row .b-snaplist__item:nth-of-type(2n+1) {
103 }
104
105 .b-snaplist_row .b-snaplist__item:last-child {
106 margin-bottom:0;
107+ border-bottom:1px solid #ddd;
108 }
109
110
111 .b-snaplist_row .b-icon {
112- flex:0 0 40px;
113-}
114-
115-.b-snaplist_row .b-icon::before {
116- background-image: url(/public/images/icon-mask-on-white.png);
117-}
118-
119+ flex:0 0 60px;
120+}
121
122 .b-snaplist_row .b-icon img {
123 display:block;
124- width: 40px;
125- height: 40px;
126+ width: 60px;
127+ height: 60px;
128+}
129+
130+.b-snaplist_row :not(.b-snaplist__item-app) .b-icon::after {
131+ font-size:9px;
132+ width:60px;
133+ text-align:center;
134+ padding: 1px 0 3px 0;
135 }
136
137 .b-snaplist_row .b-snaplist__name,
138 .b-snaplist_row .b-snaplist__version,
139-.b-snaplist_row .b-snaplist__type,
140+.b-snaplist_row .b-snaplist__origin,
141+.b-snaplist_row .b-snaplist__vendor,
142+.b-snaplist_row .b-snaplist__size {
143+ white-space: nowrap;
144+ width: 100%;
145+ overflow: hidden;
146+ text-overflow: ellipsis;
147+}
148+
149+.b-snaplist_row .b-snaplist__id,
150+.b-snaplist_row .b-snaplist__src,
151+.b-snaplist_row .b-snaplist__size {
152+ margin:0 10px;
153+}
154+
155+.b-snaplist_row .b-snaplist__id,
156+.b-snaplist_row .b-snaplist__src {
157+ flex:2;
158+}
159+
160+.b-snaplist_row .b-snaplist__size {
161+ flex:1;
162+}
163+
164+.b-snaplist_row .b-snaplist__src,
165+.b-snaplist_row .b-snaplist__size {
166+ display:none;
167+}
168+
169+.b-snaplist_row .b-snaplist__origin
170 .b-snaplist_row .b-snaplist__origin {
171- flex:1 1;
172- margin:0 1em;
173- white-space: nowrap;
174- width: 100%;
175- overflow: hidden;
176- text-overflow: ellipsis;
177-}
178-
179-.b-snaplist_row .b-snaplist__version {
180- min-width:100px;
181-}
182-
183-.b-snaplist_row .b-snaplist__type {
184- text-align:center;
185-}
186-
187-.b-snaplist_row .b-snaplist__actions {
188+ text-transform: capitalize;
189 }
190
191 .b-snaplist_row .b-installer__message {
192- /** XXX hmm **/
193 display:none;
194 }
195+
196+@media (--xxs) {
197+ .b-snaplist_grid .b-snaplist__item {
198+ padding:13px 8px;
199+ }
200+
201+ .b-snaplist_row .b-snaplist__src {
202+ display:block;
203+ }
204+}
205+
206+@media (--xs) {
207+ .b-snaplist_grid .b-snaplist__item {
208+ padding:14px 9px;
209+ }
210+ .b-snaplist_row .b-snaplist__size {
211+ display: block;
212+ }
213+}
214+
215+@media (--s) {
216+ .b-snaplist_grid .b-snaplist__item {
217+ padding:15px 10px;
218+ }
219+}
220+@media (--m) {
221+}
222
223=== modified file 'www/src/js/templates/snaplist-item.hbs'
224--- www/src/js/templates/snaplist-item.hbs 2015-05-22 23:07:43 +0000
225+++ www/src/js/templates/snaplist-item.hbs 2015-06-03 08:38:29 +0000
226@@ -1,12 +1,15 @@
227 <div class="b-icon" data-type="{{type}}">
228 <img src="{{ icon }}" width="90" height="90">
229 </div>
230-<div class="b-snaplist__name">{{ name }}</div>
231-{{!-- only name is shown in grid view, everything after is hidden --}}
232+<div class="b-snaplist__id">
233+ <div class="b-snaplist__name">{{ name }}</div>
234+ <div class="b-snaplist__version">{{ version }}</div>
235+</div>
236+<div class="b-snaplist__src">
237+ <div class="b-snaplist__origin">{{ origin }}</div>
238+ <div class="b-snaplist__vendor">{{ vendor }}</div>
239+</div>
240 <div class="b-snaplist__size" title="Installed file size">{{ prettyInstalledSize }}</div>
241-<div class="b-snaplist__version">{{ version }}</div>
242-<div class="b-snaplist__type">{{ type }}</div>
243-<div class="b-snaplist__origin">{{ origin }}</div>
244 <div class="b-snaplist__actions">
245 {{> installer}}
246 </div>
247
248=== modified file 'www/src/js/templates/storelist-item.hbs'
249--- www/src/js/templates/storelist-item.hbs 2015-05-27 15:27:12 +0000
250+++ www/src/js/templates/storelist-item.hbs 2015-06-03 08:38:29 +0000
251@@ -1,11 +1,14 @@
252 <div class="b-icon" data-type="{{type}}">
253 <img src="{{ icon }}" width="90" height="90">
254 </div>
255-<div class="b-snaplist__name">{{ name }}</div>
256-{{!-- only name is shown in grid view, everything after is hidden --}}
257-<div class="b-snaplist__version">{{ version }}</div>
258-<div class="b-snaplist__type">{{ type }}</div>
259-<div class="b-snaplist__origin">{{ origin }}</div>
260+<div class="b-snaplist__id">
261+ <div class="b-snaplist__name">{{ name }}</div>
262+ <div class="b-snaplist__version">{{ version }}</div>
263+</div>
264+<div class="b-snaplist__src">
265+ <div class="b-snaplist__origin">{{ origin }}</div>
266+ <div class="b-snaplist__vendor">{{ vendor }}</div>
267+</div>
268 <div class="b-snaplist__actions">
269 {{> installer}}
270 </div>

Subscribers

People subscribed via source and target branches