Merge lp:~jcsackett/juju-gui/browser-home-page into lp:juju-gui/experimental

Proposed by j.c.sackett
Status: Merged
Merged at revision: 590
Proposed branch: lp:~jcsackett/juju-gui/browser-home-page
Merge into: lp:juju-gui/experimental
Diff against target: 413 lines (+120/-106)
14 files modified
app/subapps/browser/browser.js (+1/-5)
app/subapps/browser/templates/browser_charm.handlebars (+1/-1)
app/subapps/browser/templates/editorial.handlebars (+14/-2)
app/subapps/browser/templates/sidebar.handlebars (+3/-3)
app/templates/charm-container.handlebars (+1/-1)
app/templates/charm-token.handlebars (+1/-1)
app/widgets/charm-token.js (+3/-1)
lib/views/browser/charm-container.less (+0/-6)
lib/views/browser/charm-full.less (+6/-23)
lib/views/browser/charm-token.less (+1/-0)
lib/views/browser/content-sidebar.less (+19/-0)
lib/views/browser/editorial.less (+14/-0)
lib/views/browser/main.less (+54/-63)
lib/views/stylesheet.less (+2/-0)
To merge this branch: bzr merge lp:~jcsackett/juju-gui/browser-home-page
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+160131@code.launchpad.net

Description of the change

Fixes fullscreen

Styles fullscreen charm browser and fixes full screen expansion.
(landing for Huw)

https://codereview.appspot.com/8911043/

To post a comment you must log in.
Revision history for this message
j.c.sackett (jcsackett) wrote :

Reviewers: mp+160131_code.launchpad.net,

Message:
Please take a look.

Description:
Fixes fullscreen

Styles fullscreen charm browser and fixes full screen expansion.

https://code.launchpad.net/~jcsackett/juju-gui/browser-home-page/+merge/160131

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/8911043/

Affected files:
   A [revision details]
   M app/subapps/browser/browser.js
   M app/subapps/browser/templates/browser_charm.handlebars
   M app/subapps/browser/templates/editorial.handlebars
   M app/subapps/browser/templates/sidebar.handlebars
   M app/templates/charm-container.handlebars
   M app/templates/charm-token.handlebars
   M app/widgets/charm-token.js
   M lib/views/browser/charm-container.less
   M lib/views/browser/charm-full.less
   M lib/views/browser/charm-token.less
   A lib/views/browser/content-sidebar.less
   A lib/views/browser/editorial.less
   M lib/views/browser/main.less
   M lib/views/stylesheet.less

Revision history for this message
Curtis Hovey (sinzui) wrote :
Revision history for this message
j.c.sackett (jcsackett) wrote :

Ushering this through for Huw.

LGTM, qa's locally.

https://codereview.appspot.com/8911043/

Revision history for this message
j.c.sackett (jcsackett) wrote :

*** Submitted:

Fixes fullscreen

Styles fullscreen charm browser and fixes full screen expansion.
(landing for Huw)

R=curtis
CC=
https://codereview.appspot.com/8911043

https://codereview.appspot.com/8911043/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/subapps/browser/browser.js'
2--- app/subapps/browser/browser.js 2013-04-19 17:58:14 +0000
3+++ app/subapps/browser/browser.js 2013-04-22 14:51:35 +0000
4@@ -28,17 +28,13 @@
5
6 */
7 _detailsVisible: function(visible) {
8- var detailsNode = Y.one('.bws-view-data'),
9- browserNode = Y.one('#subapp-browser'),
10- detailsClass = 'details-panel';
11+ var detailsNode = Y.one('.bws-view-data');
12 if (detailsNode) {
13 if (visible) {
14 detailsNode.show();
15- browserNode.addClass(detailsClass);
16 }
17 else {
18 detailsNode.hide();
19- browserNode.removeClass(detailsClass);
20 }
21 }
22 },
23
24=== modified file 'app/subapps/browser/templates/browser_charm.handlebars'
25--- app/subapps/browser/templates/browser_charm.handlebars 2013-04-19 12:46:02 +0000
26+++ app/subapps/browser/templates/browser_charm.handlebars 2013-04-22 14:51:35 +0000
27@@ -228,7 +228,7 @@
28 </div>
29 </div>
30 {{#if isFullscreen}}
31- <div class="sidebar yui3-u-1-6">
32+ <div class="content-sidebar yui3-u-1-6">
33 <h2>Useful links</h2>
34 <ul class="vertical-links">
35 <li><a href="">Juju community</a></li>
36
37=== modified file 'app/subapps/browser/templates/editorial.handlebars'
38--- app/subapps/browser/templates/editorial.handlebars 2013-04-15 17:48:25 +0000
39+++ app/subapps/browser/templates/editorial.handlebars 2013-04-22 14:51:35 +0000
40@@ -1,9 +1,21 @@
41-<div id="bws_editorial">
42+<div id="bws-editorial" {{#if isFullscreen}}class="yui3-g"{{/if}}>
43 {{#if isFullscreen}}
44- <p>Some static content</p>
45+ <div class="content yui3-u-5-6">
46 {{/if}}
47
48 <div class="featured"></div>
49 <div class="popular"></div>
50 <div class="new"></div>
51+
52+ {{#if isFullscreen}}
53+ </div>
54+ <div class="content-sidebar yui3-u-1-6">
55+ <h2>Useful links</h2>
56+ <ul class="vertical-links">
57+ <li><a href="">Juju community</a></li>
58+ <li><a href="">Online resources</a></li>
59+ <li><a href="">Write your own Charm</a></li>
60+ </ul>
61+ </div>
62+ {{/if}}
63 </div>
64
65=== modified file 'app/subapps/browser/templates/sidebar.handlebars'
66--- app/subapps/browser/templates/sidebar.handlebars 2013-04-19 05:36:32 +0000
67+++ app/subapps/browser/templates/sidebar.handlebars 2013-04-22 14:51:35 +0000
68@@ -1,11 +1,11 @@
69-<div class="charmbrowser sidebar yui3-g">
70- <div id="bws-sidebar" class="yui3-u">
71+<div class="charmbrowser">
72+ <div id="bws-sidebar">
73 <div class="bws-header">
74 </div>
75 <div class="bws-content">
76 </div>
77 </div>
78- <div class="bws-view-data yui3-u">
79+ <div class="bws-view-data">
80 <div></div>
81 </div>
82 </div>
83
84=== modified file 'app/templates/charm-container.handlebars'
85--- app/templates/charm-container.handlebars 2013-04-10 18:10:06 +0000
86+++ app/templates/charm-container.handlebars 2013-04-22 14:51:35 +0000
87@@ -17,6 +17,6 @@
88 </a>
89 {{/if}}
90 </h3>
91- <div class="charms">
92+ <div class="charms yui3-g">
93 </div>
94 </div>
95
96=== modified file 'app/templates/charm-token.handlebars'
97--- app/templates/charm-token.handlebars 2013-04-19 17:09:07 +0000
98+++ app/templates/charm-token.handlebars 2013-04-22 14:51:35 +0000
99@@ -8,7 +8,7 @@
100 <div class="charm-icon"></div>
101 {{/if}}
102 </span>
103- <span class="yui3-u-3-4">
104+ <span class="yui3-u-5-7">
105 <span class="title">
106 {{ name }}
107 </span>
108
109=== modified file 'app/widgets/charm-token.js'
110--- app/widgets/charm-token.js 2013-04-17 13:15:59 +0000
111+++ app/widgets/charm-token.js 2013-04-22 14:51:35 +0000
112@@ -26,7 +26,9 @@
113 */
114 renderUI: function() {
115 var content = this.TEMPLATE(this.getAttrs());
116- this.get('contentBox').setHTML(content);
117+ var container = this.get('contentBox');
118+ container.setHTML(content);
119+ container.ancestor('.yui3-charmtoken').addClass('yui3-u');
120 }
121
122 }, {
123
124=== modified file 'lib/views/browser/charm-container.less'
125--- lib/views/browser/charm-container.less 2013-04-10 03:40:35 +0000
126+++ lib/views/browser/charm-container.less 2013-04-22 14:51:35 +0000
127@@ -1,15 +1,9 @@
128 .yui3-charmcontainer {
129- clear: left;
130-
131 .section-title {
132 padding-left: 20px;
133 padding-right: 20px;
134 }
135 .charms {
136 padding: 10px 0;
137-
138- .yui3-charmtoken {
139- float: left;
140- }
141 }
142 }
143
144=== modified file 'lib/views/browser/charm-full.less'
145--- lib/views/browser/charm-full.less 2013-04-19 06:29:32 +0000
146+++ lib/views/browser/charm-full.less 2013-04-22 14:51:35 +0000
147@@ -11,12 +11,12 @@
148 h4 {
149 .heading-font;
150 }
151- .content,
152- .sidebar {
153+ p {
154+ width: 66.666%;
155+ }
156+ .content {
157 .border-box;
158 display: table-cell;
159- }
160- .content {
161 padding: 0 20px 25px 20px;
162 }
163 .nav {
164@@ -262,26 +262,9 @@
165 }
166 }
167 }
168- .sidebar {
169- padding-left: 20px;
170- background-color: #eeeeee;
171-
172- h2 {
173- .heading-font;
174- margin-bottom: 16px;
175- padding: 14px 0 4px 0;
176- border-bottom: 1px solid @bws-border;
177- color: @bws-heading;
178- font-family: @font-family;
179- font-size: 14pt;
180- }
181- .vertical-links li {
182- padding-bottom: 5px;
183- }
184- }
185 }
186-.sidebar .charm {
187+#bws-fullscreen .charm {
188 p {
189- width: 66.666%;
190+ width: 100%;
191 }
192 }
193
194=== modified file 'lib/views/browser/charm-token.less'
195--- lib/views/browser/charm-token.less 2013-04-19 06:29:32 +0000
196+++ lib/views/browser/charm-token.less 2013-04-22 14:51:35 +0000
197@@ -1,4 +1,5 @@
198 .yui3-charmtoken {
199+ .border-box;
200 padding: 10px 20px;
201
202 .charm-token {
203
204=== added file 'lib/views/browser/content-sidebar.less'
205--- lib/views/browser/content-sidebar.less 1970-01-01 00:00:00 +0000
206+++ lib/views/browser/content-sidebar.less 2013-04-22 14:51:35 +0000
207@@ -0,0 +1,19 @@
208+#subapp-browser .content-sidebar {
209+ .border-box;
210+ display: table-cell;
211+ padding-left: 20px;
212+ background-color: #eeeeee;
213+
214+ h2 {
215+ .heading-font;
216+ margin-bottom: 16px;
217+ padding: 14px 0 4px 0;
218+ border-bottom: 1px solid @bws-border;
219+ color: @bws-heading;
220+ font-family: @font-family;
221+ font-size: 14pt;
222+ }
223+ .vertical-links li {
224+ padding-bottom: 5px;
225+ }
226+}
227
228=== added file 'lib/views/browser/editorial.less'
229--- lib/views/browser/editorial.less 1970-01-01 00:00:00 +0000
230+++ lib/views/browser/editorial.less 2013-04-22 14:51:35 +0000
231@@ -0,0 +1,14 @@
232+#bws-editorial {
233+ display: table;
234+ width: 100%;
235+
236+ .content {
237+ .border-box;
238+ display: table-cell;
239+
240+ .yui3-charmtoken {
241+ width: 33.33333%;
242+ min-width: 320px;
243+ }
244+ }
245+}
246
247=== modified file 'lib/views/browser/main.less'
248--- lib/views/browser/main.less 2013-04-19 05:36:32 +0000
249+++ lib/views/browser/main.less 2013-04-22 14:51:35 +0000
250@@ -4,6 +4,7 @@
251 @bws-text: #808080;
252 @bws-border: #dddddd;
253 @bws-sidebar-width: 350px;
254+@bws-header-height: 60px;
255
256 /* Mixins */
257 .three-image-button-background(@left-image, @right-image, @centre-image) {
258@@ -35,24 +36,8 @@
259
260 #subapp-browser {
261 display: none;
262- bottom: 50px;
263 color: @bws-text;
264 font-size: 9pt;
265- left: 0;
266- overflow: hidden;
267- position: absolute;
268- top: 0;
269- width: @bws-sidebar-width;
270- box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
271-
272- &.details-panel {
273- width: 100%;
274- box-shadow: none;
275-
276- .charmbrowser.sidebar #bws-sidebar {
277- width: @bws-sidebar-width;
278- }
279- }
280
281 a {
282 color: @charm-panel-orange;
283@@ -86,14 +71,11 @@
284 text-align: left;
285 width: 90%;
286 }
287- .bws-view-data {
288- position: absolute;
289- top: 0;
290- bottom: 0;
291- left: 0;
292- right: 0;
293- overflow-x: hidden;
294- overflow-y: auto;
295+ .section-title a {
296+ color: @bws-heading;
297+ }
298+ .charm-token {
299+ color: @bws-text;
300 }
301 .bws-header {
302 position: relative;
303@@ -141,49 +123,58 @@
304 }
305 }
306 }
307- #bws-fullscreen {
308- .bws-view-data {
309- top: 60px;
310- right: 0;
311- background-color: #f5f5f5;
312- }
313- }
314- .charmbrowser.sidebar {
315- #bws-sidebar,
316- .bws-view-data {
317- background-color: #f5f5f5;
318- }
319- .bws-view-data {
320- left: @bws-sidebar-width;
321- }
322- #bws-sidebar {
323- z-index: 1;
324- position: absolute;
325- top: 0;
326+ #bws-sidebar .bws-content,
327+ .bws-view-data,
328+ #bws-sidebar,
329+ #bws-fullscreen {
330+ position: absolute;
331+ top: 0;
332+ left: 0;
333+ bottom: 0;
334+ right: 0;
335+ }
336+ .bws-view-data,
337+ #bws-sidebar,
338+ #bws-fullscreen {
339+ bottom: 50px;
340+ background-color: #f5f5f5;
341+ }
342+ .bws-view-data,
343+ #bws-sidebar .bws-content {
344+ overflow-x: hidden;
345+ overflow-y: auto;
346+ }
347+ #bws-fullscreen {
348+ .bws-view-data {
349+ top: @bws-header-height;
350 bottom: 0;
351 left: 0;
352- overflow: auto;
353- width: 100%;
354- box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
355-
356- .bws-searchbox {
357- float: none;
358- margin: 10px 0 0 0;
359-
360- input {
361- width: 100%;
362- }
363- }
364- .section-title a {
365- color: @bws-heading;
366- }
367+ }
368+ }
369+ #bws-sidebar {
370+ z-index: 1;
371+ right: auto;
372+ width: @bws-sidebar-width;
373+ overflow: hidden;
374+ box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
375+
376+ .bws-searchbox {
377+ float: none;
378+ margin: 10px 0 0 0;
379+
380+ input {
381+ width: 100%;
382+ }
383+ }
384+ .bws-content {
385+ top: 110px;
386+
387 .yui3-charmtoken {
388- float: none;
389-
390- .charm-token {
391- color: @bws-text;
392- }
393+ width: 100%;
394 }
395 }
396 }
397+ .bws-view-data {
398+ left: @bws-sidebar-width;
399+ }
400 }
401
402=== modified file 'lib/views/stylesheet.less'
403--- lib/views/stylesheet.less 2013-04-19 20:11:17 +0000
404+++ lib/views/stylesheet.less 2013-04-22 14:51:35 +0000
405@@ -1653,6 +1653,8 @@
406 @import "browser/charm-container.less";
407 @import "browser/charm-full.less";
408 @import "browser/charm-token.less";
409+@import "browser/content-sidebar.less";
410+@import "browser/editorial.less";
411 @import "browser/overlay-indicator.less";
412 @import "browser/section-title.less";
413 @import "browser/tabview.less";

Subscribers

People subscribed via source and target branches