Merge lp:~huwshimi/juju-gui/visual-update-2 into lp:juju-gui/experimental

Proposed by Huw Wilkins
Status: Merged
Merged at revision: 801
Proposed branch: lp:~huwshimi/juju-gui/visual-update-2
Merge into: lp:juju-gui/experimental
Prerequisite: lp:~rharding/juju-gui/new-controls
Diff against target: 139 lines (+21/-16)
10 files modified
app/subapps/browser/browser.js (+4/-1)
app/subapps/browser/templates/fullscreen.handlebars (+1/-0)
app/subapps/browser/templates/minimized.handlebars (+0/-11)
app/subapps/browser/templates/sidebar.handlebars (+1/-0)
app/templates/browser-search.handlebars (+0/-1)
lib/views/browser/browser-icon.less (+4/-1)
lib/views/browser/main.less (+9/-0)
lib/views/browser/minimized.less (+1/-0)
lib/views/stylesheet.less (+1/-1)
test/test_browser_search_widget.js (+0/-1)
To merge this branch: bzr merge lp:~huwshimi/juju-gui/visual-update-2
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+172739@code.launchpad.net

Description of the change

Visual update #2

This completes the work from lp:~rharding/juju-gui/new-controls and lp:~huwshimi/juju-gui/visual-update-1 in adding the new header and making it work.

https://codereview.appspot.com/10904043/

To post a comment you must log in.
Revision history for this message
Huw Wilkins (huwshimi) wrote :
Download full text (6.8 KiB)

Reviewers: mp+172739_code.launchpad.net,

Message:
Please take a look.

Description:
Visual update #2

This completes the work from lp:~rharding/juju-gui/new-controls and
lp:~huwshimi/juju-gui/visual-update-1 in adding the new header and
making it work.

https://code.launchpad.net/~huwshimi/juju-gui/visual-update-2/+merge/172739

Requires:
https://code.launchpad.net/~rharding/juju-gui/new-controls/+merge/172631

(do not edit description out of merge proposal)

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

Affected files:
   A [revision details]
   M app/subapps/browser/browser.js
   M app/subapps/browser/templates/fullscreen.handlebars
   M app/subapps/browser/templates/minimized.handlebars
   M app/subapps/browser/templates/sidebar.handlebars
   M app/templates/browser-search.handlebars
   M lib/views/browser/browser-icon.less
   M lib/views/browser/bws-searchbox.less
   M lib/views/browser/main.less
   M test/test_browser_search_widget.js

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: app/templates/browser-search.handlebars
=== modified file 'app/templates/browser-search.handlebars'
--- app/templates/browser-search.handlebars 2013-07-02 17:19:34 +0000
+++ app/templates/browser-search.handlebars 2013-07-03 05:20:36 +0000
@@ -1,2 +1,1 @@
-<a href="" class="bws-icon"></a>
  {{> bws-searchbox }}

Index: app/subapps/browser/browser.js
=== modified file 'app/subapps/browser/browser.js'
--- app/subapps/browser/browser.js 2013-06-27 18:47:57 +0000
+++ app/subapps/browser/browser.js 2013-07-03 05:20:36 +0000
@@ -48,13 +48,16 @@

       */
      _detailsVisible: function(visible) {
- var detailsNode = Y.one('.bws-view-data');
+ var detailsNode = Y.one('.bws-view-data'),
+ container = Y.one('.charmbrowser');
        if (detailsNode) {
          if (visible) {
            detailsNode.show();
+ container.addClass('content-visible');
          }
          else {
            detailsNode.hide();
+ container.removeClass('content-visible');
          }
        }
      },

Index: lib/views/browser/browser-icon.less
=== modified file 'lib/views/browser/browser-icon.less'
--- lib/views/browser/browser-icon.less 2013-07-01 06:16:17 +0000
+++ lib/views/browser/browser-icon.less 2013-07-03 05:20:36 +0000
@@ -1,7 +1,7 @@
  .bws-icon {
      position: absolute;
      display: block;
- right: -38px;
+ left: 25%;
      top: 110px;
      width: 26px;
      height: 26px;
@@ -12,3 +12,6 @@
      border-top-right-radius: 4px;
      border-bottom-right-radius: 4px;
  }
+.content-visible .bws-icon {
+ left: 75%;
+}

Index: app/subapps/browser/templates/fullscreen.handlebars
=== modified file 'app/subapps/browser/templates/fullscreen.handlebars'
--- app/subapps/browser/templates/fullscreen.handlebars 2013-04-03 01:48:42
+0000
+++ app/subapps/browser/templates/fullscreen.handlebars 2013-07-03 05:30:55
+0000
@@ -1,4 +1,5 @@
 ...

Read more...

Revision history for this message
Richard Harding (rharding) wrote :

I don't follow this change. It adds a regression where the show/hide
icon doesn't move. It appears the change is centered around moving the
bws-icon to other templates and trying to add the concept of
content-visible css class. The issue is that you're hooking this class
up into if the details of a charm is visible which can be true/false
which the sidebar or fullscreen (.charmbrowser) is always there. I'm not
following why they've been associated.

https://codereview.appspot.com/10904043/

795. By Huw Wilkins

Merged with trunk.

796. By Huw Wilkins

Fixed browser icon positioning when at small screen sizes. Made icon orange when browser is minimised.

Revision history for this message
Huw Wilkins (huwshimi) wrote :

On 2013/07/03 13:19:39, rharding wrote:
> I don't follow this change. It adds a regression where the show/hide
icon
> doesn't move. It appears the change is centered around moving the
bws-icon to
> other templates and trying to add the concept of content-visible css
class. The
> issue is that you're hooking this class up into if the details of a
charm is
> visible which can be true/false which the sidebar or fullscreen
(.charmbrowser)
> is always there. I'm not following why they've been associated.

The positioning bug was caused by the code for small screen sizes not
accounting for the minimised browser. I've pushed a change for that and
additionally makes the icon orange when the sidebar is minimised.

https://codereview.appspot.com/10904043/

797. By Huw Wilkins

Fixed top position of configure panel.

Revision history for this message
Huw Wilkins (huwshimi) wrote :
Revision history for this message
Gary Poster (gary) wrote :

LGTM. Thank you!

The diff is crazy on rietveld but looks good locally.

https://codereview.appspot.com/10904043/

Revision history for this message
Huw Wilkins (huwshimi) wrote :

*** Submitted:

Visual update #2

This completes the work from lp:~rharding/juju-gui/new-controls and
lp:~huwshimi/juju-gui/visual-update-1 in adding the new header and
making it work.

R=rharding, gary.poster
CC=
https://codereview.appspot.com/10904043

https://codereview.appspot.com/10904043/

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-07-03 21:38:35 +0000
3+++ app/subapps/browser/browser.js 2013-07-03 23:07:27 +0000
4@@ -48,13 +48,16 @@
5
6 */
7 _detailsVisible: function(visible) {
8- var detailsNode = Y.one('.bws-view-data');
9+ var detailsNode = Y.one('.bws-view-data'),
10+ container = Y.one('.charmbrowser');
11 if (detailsNode) {
12 if (visible) {
13 detailsNode.show();
14+ container.addClass('content-visible');
15 }
16 else {
17 detailsNode.hide();
18+ container.removeClass('content-visible');
19 }
20 }
21 },
22
23=== modified file 'app/subapps/browser/templates/fullscreen.handlebars'
24--- app/subapps/browser/templates/fullscreen.handlebars 2013-04-03 01:48:42 +0000
25+++ app/subapps/browser/templates/fullscreen.handlebars 2013-07-03 23:07:27 +0000
26@@ -1,4 +1,5 @@
27 <div class="charmbrowser">
28+ <a href="" class="bws-icon"></a>
29 <div id="bws-fullscreen">
30 <div class="bws-header">
31 </div>
32
33=== modified file 'app/subapps/browser/templates/minimized.handlebars'
34--- app/subapps/browser/templates/minimized.handlebars 2013-07-03 17:35:21 +0000
35+++ app/subapps/browser/templates/minimized.handlebars 2013-07-03 23:07:27 +0000
36@@ -1,12 +1,1 @@
37 <a href="" class="bws-icon"></a>
38-{{! This should include the bws-searchbox partial template, but until we have
39- the correct context it will error. }}
40-<div class="bws-searchbox">
41- <form>
42- <img src="/juju-ui/assets/images/browser_searchbox_search_icon.png"
43- alt="Search" class="search" />
44- <input type="search" name="bws-search"
45- value=""
46- placeholder="Search for Charms"/>
47- </form>
48-</div>
49
50=== modified file 'app/subapps/browser/templates/sidebar.handlebars'
51--- app/subapps/browser/templates/sidebar.handlebars 2013-06-14 18:05:08 +0000
52+++ app/subapps/browser/templates/sidebar.handlebars 2013-07-03 23:07:27 +0000
53@@ -1,4 +1,5 @@
54 <div class="charmbrowser">
55+ <a href="" class="bws-icon"></a>
56 <div id="bws-sidebar">
57 <div class="bws-header">
58 </div>
59
60=== modified file 'app/templates/browser-search.handlebars'
61--- app/templates/browser-search.handlebars 2013-07-03 17:35:21 +0000
62+++ app/templates/browser-search.handlebars 2013-07-03 23:07:27 +0000
63@@ -1,2 +1,1 @@
64-<a href="" class="bws-icon"></a>
65 {{> bws-searchbox }}
66
67=== modified file 'lib/views/browser/browser-icon.less'
68--- lib/views/browser/browser-icon.less 2013-07-03 17:35:21 +0000
69+++ lib/views/browser/browser-icon.less 2013-07-03 23:07:27 +0000
70@@ -1,7 +1,7 @@
71 .bws-icon {
72 position: absolute;
73 display: block;
74- right: -38px;
75+ left: 25%;
76 top: 110px;
77 width: 26px;
78 height: 26px;
79@@ -12,3 +12,6 @@
80 border-top-right-radius: 4px;
81 border-bottom-right-radius: 4px;
82 }
83+.content-visible .bws-icon {
84+ left: 75%;
85+}
86
87=== modified file 'lib/views/browser/main.less'
88--- lib/views/browser/main.less 2013-07-03 17:35:21 +0000
89+++ lib/views/browser/main.less 2013-07-03 23:07:27 +0000
90@@ -179,4 +179,13 @@
91 left: @bws-sidebar-min-width;
92 min-width: 700px;
93 }
94+ .bws-icon {
95+ left: @bws-sidebar-min-width !important;
96+ }
97+ .content-visible .bws-icon {
98+ left: @bws-sidebar-min-width + 700 !important;
99+ }
100+ #subapp-browser-min .bws-icon {
101+ left: 0 !important;
102+ }
103 }
104
105=== modified file 'lib/views/browser/minimized.less'
106--- lib/views/browser/minimized.less 2013-07-03 17:35:21 +0000
107+++ lib/views/browser/minimized.less 2013-07-03 23:07:27 +0000
108@@ -9,5 +9,6 @@
109 .bws-icon {
110 left: 0;
111 right: auto;
112+ background-color: @charm-panel-orange;
113 }
114 }
115
116=== modified file 'lib/views/stylesheet.less'
117--- lib/views/stylesheet.less 2013-07-03 17:35:21 +0000
118+++ lib/views/stylesheet.less 2013-07-03 23:07:27 +0000
119@@ -1114,7 +1114,7 @@
120 display: block;
121 z-index: 999;
122 padding: 0;
123- top: 70px;
124+ top: 61px;
125 right: 0;
126 position: absolute;
127 width: @charm-panel-width;
128
129=== modified file 'test/test_browser_search_widget.js'
130--- test/test_browser_search_widget.js 2013-07-03 17:35:21 +0000
131+++ test/test_browser_search_widget.js 2013-07-03 23:07:27 +0000
132@@ -45,7 +45,6 @@
133 var search = new Search();
134 search.render(container);
135 assert.isObject(container.one('.bws-searchbox'));
136- assert.isObject(container.one('.bws-icon'));
137 });
138
139 it('should support setting search string', function() {

Subscribers

People subscribed via source and target branches