Merge lp:~frankban/juju-gui/bug-1074297-charm-panel-description into lp:juju-gui/experimental

Proposed by Francesco Banconi
Status: Merged
Merged at revision: 228
Proposed branch: lp:~frankban/juju-gui/bug-1074297-charm-panel-description
Merge into: lp:juju-gui/experimental
Diff against target: 323 lines (+95/-55)
4 files modified
app/templates/charm-description.handlebars (+19/-10)
app/templates/charm-pre-configuration.handlebars (+5/-5)
lib/views/stylesheet.less (+61/-27)
test/test_charm_panel.js (+10/-13)
To merge this branch: bzr merge lp:~frankban/juju-gui/bug-1074297-charm-panel-description
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+133097@code.launchpad.net

Description of the change

Charm panel description design.

https://codereview.appspot.com/6819098/

To post a comment you must log in.
Revision history for this message
Francesco Banconi (frankban) wrote :

Reviewers: mp+133097_code.launchpad.net,

Message:
Please take a look.

Description:
Charm panel description design.

This branch fixes the charm panel discription view
so that now it matches the visual design here:
https://docs.google.com/a/canonical.com/file/d/0B6l8lFdCRvtqQk93MnZEWDlkU3c/edit
The change includes a `customize-scrollbar` Less mixin: the
Ubuntu-style scrollbar is now present in all the charm
panel views.
This branch does not include the icons (I have made
another card to replace bootstrap icons with customized ones,
and to revert the direction of chevron-[up|down].
The css changes also involve the charm configuration view,
slightly changed here to make it more similar to what can be seen in
https://docs.google.com/a/canonical.com/file/d/0B6l8lFdCRvtqQXRDOUprMHNwTlk/edit.
However, consider that changing the config view is not a goal
of this branch.

https://code.launchpad.net/~frankban/juju-gui/bug-1074297-charm-panel-description/+merge/133097

(do not edit description out of merge proposal)

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

Affected files:
   A [revision details]
   M app/templates/charm-description.handlebars
   M app/templates/charm-pre-configuration.handlebars
   M lib/views/stylesheet.less
   M test/test_charm_panel.js

Revision history for this message
Brad Crittenden (bac) wrote :

Nice branch Francesco. I've made a few comments but nothing serious.

I do think the configuration file stuff needs to be fixed or possibly
deferred to another branch.

https://codereview.appspot.com/6819098/diff/1/app/templates/charm-description.handlebars
File app/templates/charm-description.handlebars (right):

https://codereview.appspot.com/6819098/diff/1/app/templates/charm-description.handlebars#newcode2
app/templates/charm-description.handlebars:2: <div
class="charm-nav-back"><i class="icon-chevron-left"></i> Back</div>
Why not use the new asset in this branch?

https://codereview.appspot.com/6819098/diff/1/app/templates/charm-pre-configuration.handlebars
File app/templates/charm-pre-configuration.handlebars (right):

https://codereview.appspot.com/6819098/diff/1/app/templates/charm-pre-configuration.handlebars#newcode50
app/templates/charm-pre-configuration.handlebars:50:
When selecting a configuration file, the name now overlaps with other
elements. This work probably should be a separate branch.

https://codereview.appspot.com/6819098/diff/1/lib/views/stylesheet.less
File lib/views/stylesheet.less (right):

https://codereview.appspot.com/6819098/diff/1/lib/views/stylesheet.less#newcode850
lib/views/stylesheet.less:850: border-bottom: 1px solid #C2C2C2;
Where did these colors come from? They don't seem to match the ones in
the assets provided (charm_head2_div.png, charm_detail_title_div.png,
etc). They do *look* really good, though.

https://codereview.appspot.com/6819098/diff/1/lib/views/stylesheet.less#newcode871
lib/views/stylesheet.less:871: border-bottom: 1px solid #C2C2C2;
It would be nice to abstract these re-used colors, if possible in a
readable manner. I cannot believe we have so many different shades of
gray in this stylesheet, but that's what has been specified.

https://codereview.appspot.com/6819098/diff/1/test/test_charm_panel.js
File test/test_charm_panel.js (right):

https://codereview.appspot.com/6819098/diff/1/test/test_charm_panel.js#newcode234
test/test_charm_panel.js:234:
description_div.get('text').should.contain('A DB');
Nice simplification.

https://codereview.appspot.com/6819098/

230. By Francesco Banconi

Abstract the charm panel border column.

Revision history for this message
Francesco Banconi (frankban) wrote :

Please take a look.

https://codereview.appspot.com/6819098/diff/1/app/templates/charm-description.handlebars
File app/templates/charm-description.handlebars (right):

https://codereview.appspot.com/6819098/diff/1/app/templates/charm-description.handlebars#newcode2
app/templates/charm-description.handlebars:2: <div
class="charm-nav-back"><i class="icon-chevron-left"></i> Back</div>
On 2012/11/06 20:42:44, bac wrote:
> Why not use the new asset in this branch?

We discussed this with Gary and decided to create another card to
replace bootsrap icons with the new assets.
See https://bugs.launchpad.net/juju-gui/+bug/1075672

https://codereview.appspot.com/6819098/diff/1/app/templates/charm-pre-configuration.handlebars
File app/templates/charm-pre-configuration.handlebars (right):

https://codereview.appspot.com/6819098/diff/1/app/templates/charm-pre-configuration.handlebars#newcode50
app/templates/charm-pre-configuration.handlebars:50:
On 2012/11/06 20:42:44, bac wrote:
> When selecting a configuration file, the name now overlaps with other
elements.
> This work probably should be a separate branch.

Agreed.

https://codereview.appspot.com/6819098/diff/1/lib/views/stylesheet.less
File lib/views/stylesheet.less (right):

https://codereview.appspot.com/6819098/diff/1/lib/views/stylesheet.less#newcode850
lib/views/stylesheet.less:850: border-bottom: 1px solid #C2C2C2;
On 2012/11/06 20:42:44, bac wrote:
> Where did these colors come from? They don't seem to match the ones
in the
> assets provided (charm_head2_div.png, charm_detail_title_div.png,
etc). They do
> *look* really good, though.

IIRC, I used the color picker to obtain these colors from the wireframe.

https://codereview.appspot.com/6819098/diff/1/lib/views/stylesheet.less#newcode871
lib/views/stylesheet.less:871: border-bottom: 1px solid #C2C2C2;
On 2012/11/06 20:42:44, bac wrote:
> It would be nice to abstract these re-used colors, if possible in a
readable
> manner. I cannot believe we have so many different shades of gray in
this
> stylesheet, but that's what has been specified.

Done. The border color is now a variable: @charm-panel-border-color.
Nice catch on this repetition, thanks.

https://codereview.appspot.com/6819098/

Revision history for this message
Francesco Banconi (frankban) wrote :

Thanks for the review Brad.

We have a card for the charm config panel, and, since it is possible to
reuse some of this work, I will take care of that task once this branch
is landed.

https://codereview.appspot.com/6819098/

Revision history for this message
Gary Poster (gary) wrote :
Download full text (4.9 KiB)

Hey Francesco. This looks very good. Thank you.

I am chatty in the line-by-line comments but I only ask for one or two
things, and you may ignore them if you disagree.

You will almost certainly want to merge trunk by hand before you land
this, since (thanks to your review) I have landed the "related charms"
addition to the description pane, and you'll need to make sure that it
has necessary changes to look good with your improvements.

Thanks again,

Gary

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars
File app/templates/charm-description.handlebars (right):

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode2
app/templates/charm-description.handlebars:2: <div
class="charm-nav-back"><i class="icon-chevron-left"></i> Back</div>
(As we discussed, we have a separate card for converting these to the
desired assets.)

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode10
app/templates/charm-description.handlebars:10: <div
class="charm-panel-configure-buttons">
yay, we actually reused a class name in the charm panel! will wonders
never cease? :-) thank you for being thoughtful with this

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode23
app/templates/charm-description.handlebars:23: {{#if owner}}
I think I have a similar block that instead draws "[charmers]" for the
owner name. I think I prefer your solution. I don't think we have a
specification for this. If we do, go with that; otherwise, make your
own choice, and I suggest sticking with what you have here.

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode60
app/templates/charm-description.handlebars:60: <h4><i
class="icon-chevron-up"></i> Change Log</h4>
I had intentionally diverged from the "Change Log" text because I
thought a single change was not a log. This is what was specified
though, you are right. +1 on this change.

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode63
app/templates/charm-description.handlebars:63: <h5>Last Change</h5>
Oh, I see. That's fine.

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-pre-configuration.handlebars
File app/templates/charm-pre-configuration.handlebars (right):

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-pre-configuration.handlebars#newcode43
app/templates/charm-pre-configuration.handlebars:43: <div
class="config-file-upload control-group">
Moving this into the service settings was a conscious decision by the
devs who did it, I think, even though the visual design had it here.
The configuration file replaces the configuration form, and IIRC makes
it hide.

In this particular case, I suggest moving it back where it was before,
in the "Service Settings." OTOH, if you disagree for any reason, you
have the visual design on your side, so I'm happy for this change to win
in that case. :-)

It also doesn't look quite right--it needs some left padding--but I'm
figuring you want to hold off on that change for a...

Read more...

231. By Francesco Banconi

Merged source and resolved conflicts.

232. By Francesco Banconi

Restored previous position of file upload control in the charm config panel.

Revision history for this message
Francesco Banconi (frankban) wrote :
Download full text (4.5 KiB)

Thanks for the review Gary.
Already merged trunk and resolved some conflicts encountered.
Now I will add fixes per UX review and land this branch.

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars
File app/templates/charm-description.handlebars (right):

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode2
app/templates/charm-description.handlebars:2: <div
class="charm-nav-back"><i class="icon-chevron-left"></i> Back</div>
On 2012/11/07 13:58:59, gary.poster wrote:
> (As we discussed, we have a separate card for converting these to the
desired
> assets.)

Cool.

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode10
app/templates/charm-description.handlebars:10: <div
class="charm-panel-configure-buttons">
On 2012/11/07 13:58:59, gary.poster wrote:
> yay, we actually reused a class name in the charm panel! will wonders
never
> cease? :-) thank you for being thoughtful with this

:-) I have to fix other things per UX review, however this seems to be
fine. \o/

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode23
app/templates/charm-description.handlebars:23: {{#if owner}}
On 2012/11/07 13:58:59, gary.poster wrote:
> I think I have a similar block that instead draws "[charmers]" for
the owner
> name. I think I prefer your solution. I don't think we have a
specification
> for this. If we do, go with that; otherwise, make your own choice,
and I
> suggest sticking with what you have here.

Done.

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-description.handlebars#newcode60
app/templates/charm-description.handlebars:60: <h4><i
class="icon-chevron-up"></i> Change Log</h4>
On 2012/11/07 13:58:59, gary.poster wrote:
> I had intentionally diverged from the "Change Log" text because I
thought a
> single change was not a log. This is what was specified though, you
are right.
> +1 on this change.

Thanks, and I agree with you that one change is not a log.

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-pre-configuration.handlebars
File app/templates/charm-pre-configuration.handlebars (right):

https://codereview.appspot.com/6819098/diff/6001/app/templates/charm-pre-configuration.handlebars#newcode43
app/templates/charm-pre-configuration.handlebars:43: <div
class="config-file-upload control-group">
On 2012/11/07 13:58:59, gary.poster wrote:
> Moving this into the service settings was a conscious decision by the
devs who
> did it, I think, even though the visual design had it here. The
configuration
> file replaces the configuration form, and IIRC makes it hide.

> In this particular case, I suggest moving it back where it was before,
in the
> "Service Settings." OTOH, if you disagree for any reason, you have
the visual
> design on your side, so I'm happy for this change to win in that case.
:-)

> It also doesn't look quite right--it needs some left padding--but I'm
figuring
> you want to hold off on that change for another branch.

Restored the previous position, I missed the "config file hides the
form" behavior. This...

Read more...

233. By Francesco Banconi

Fixes per UX review

Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Charm panel description design.

R=bac, gary.poster
CC=
https://codereview.appspot.com/6819098

https://codereview.appspot.com/6819098/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/templates/charm-description.handlebars'
--- app/templates/charm-description.handlebars 2012-11-05 21:51:27 +0000
+++ app/templates/charm-description.handlebars 2012-11-07 18:27:21 +0000
@@ -1,12 +1,18 @@
1<div>1<div>
2 <div class="charm-nav-back"><i class="icon-arrow-left icon-white"></i> Back</div>2 <div class="charm-nav-back"><i class="icon-chevron-left"></i> Back</div>
33
4 <div class="charm-description charm-panel">4 <div class="charm-description charm-panel">
5 <button class="btn btn-primary deploy"5 <div id="charm-panel-head">
6 data-url="{{id}}">Deploy</button>6 <h3>{{package_name}}</h3>
7 <h3>{{package_name}}</h3>7 {{id}}
8 </div>
9
10 <div class="charm-panel-configure-buttons">
11 <button class="btn btn-primary deploy" data-url="{{id}}">Deploy</button>
12 </div>
13
8 <div class="charm-section">14 <div class="charm-section">
9 <h4><i class="icon-chevron-down"></i> Description</h4>15 <h4 class="first"><i class="icon-chevron-down"></i> Description</h4>
10 <div class="collapsible">16 <div class="collapsible">
11 <h5>Summary</h5>17 <h5>Summary</h5>
12 <p>{{summary}}</p>18 <p>{{summary}}</p>
@@ -14,11 +20,9 @@
14 <p>{{series}}</p>20 <p>{{series}}</p>
15 <h5>Description</h5>21 <h5>Description</h5>
16 <div>{{description}}</div>22 <div>{{description}}</div>
23 {{#if owner}}
17 <h5>Owner</h5>24 <h5>Owner</h5>
18 {{#if owner}}
19 <p>{{owner}}</p>25 <p>{{owner}}</p>
20 {{else}}
21 <p>[Official charm]</p>
22 {{/if}}26 {{/if}}
23 {{#if store_revision}}27 {{#if store_revision}}
24 <h5>Store Revision</h5>28 <h5>Store Revision</h5>
@@ -26,6 +30,7 @@
26 {{/if}}30 {{/if}}
27 </div>31 </div>
28 </div>32 </div>
33
29 {{#any requires provides}}34 {{#any requires provides}}
30 <div class="charm-section">35 <div class="charm-section">
31 <h4><i class="icon-chevron-up"></i> Interfaces</h4>36 <h4><i class="icon-chevron-up"></i> Interfaces</h4>
@@ -49,11 +54,13 @@
49 </div>54 </div>
50 </div>55 </div>
51 {{/any}}56 {{/any}}
57
52 {{#if last_change}}58 {{#if last_change}}
53 <div class="charm-section">59 <div class="charm-section">
54 <h4><i class="icon-chevron-up"></i> Last Change</h4>60 <h4><i class="icon-chevron-up"></i> Change Log</h4>
55 <div class="collapsible">61 <div class="collapsible">
56 {{#with last_change}}62 {{#with last_change}}
63 <h5>Last Change</h5>
57 <div>{{dateformat created "%F"}}</div>64 <div>{{dateformat created "%F"}}</div>
58 <div>{{committer}}</div>65 <div>{{committer}}</div>
59 <div class="commitmessage">{{message}}</div>66 <div class="commitmessage">{{message}}</div>
@@ -61,13 +68,15 @@
61 </div>68 </div>
62 </div>69 </div>
63 {{/if}}70 {{/if}}
71
64 {{#any requires provides}}72 {{#any requires provides}}
65 <div class="charm-section">73 <div class="charm-section">
66 <h4><i class="icon-chevron-up"></i>Related Charms</h4>74 <h4><i class="icon-chevron-up"></i> Related Charms</h4>
67 <div class="collapsible" id="related-charms">75 <div class="collapsible" id="related-charms">
68 Loading...76 Loading...
69 </div>77 </div>
70 </div>78 </div>
71 {{/any}}79 {{/any}}
80
72 </div>81 </div>
73</div>82</div>
7483
=== modified file 'app/templates/charm-pre-configuration.handlebars'
--- app/templates/charm-pre-configuration.handlebars 2012-10-26 10:44:21 +0000
+++ app/templates/charm-pre-configuration.handlebars 2012-11-07 18:27:21 +0000
@@ -52,11 +52,11 @@
52 </div>52 </div>
53 </div>53 </div>
54 <div class="charm-settings">54 <div class="charm-settings">
55 <form>55 <form>
56 <div id="service-config" class="collapsible">56 <div id="service-config" class="collapsible">
57 {{> service-config}}57 {{> service-config}}
58 </div>58 </div>
59 </form>59 </form>
60 </div>60 </div>
61 </div>61 </div>
62 {{/if}}62 {{/if}}
6363
=== modified file 'lib/views/stylesheet.less'
--- lib/views/stylesheet.less 2012-11-07 13:18:31 +0000
+++ lib/views/stylesheet.less 2012-11-07 18:27:21 +0000
@@ -1,5 +1,6 @@
1/* Processed with LESS from lib/views/stylesheet.less */1/* Processed with LESS from lib/views/stylesheet.less */
2@font-family: 'Ubuntu', 'Helvetica Neue', Helvetica, Arial, sans-serif;2@font-family: 'Ubuntu', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3@font-family-medium: 'Ubuntu Medium', 'Helvetica Neue', Helvetica, Arial, sans-serif;
34
4/* Define common colors. */5/* Define common colors. */
5@label-color: #292929;6@label-color: #292929;
@@ -12,8 +13,8 @@
12@charm-panel-cancel-button-color: #b8b8b8;13@charm-panel-cancel-button-color: #b8b8b8;
13@charm-panel-cancel-button-bottom-gradient: #a3a39f;14@charm-panel-cancel-button-bottom-gradient: #a3a39f;
14@charm-panel-cancel-button-shadow: #515050;15@charm-panel-cancel-button-shadow: #515050;
15@charm-panel-separator-color: #aeaeae;
16@charm-panel-background-color: #eeeeee;16@charm-panel-background-color: #eeeeee;
17@charm-panel-border-color: #BEBEBE;
17@navbar-color: #2D2D2D!important;18@navbar-color: #2D2D2D!important;
1819
19body {20body {
@@ -127,9 +128,10 @@
127 margin: 0 5px;128 margin: 0 5px;
128 }129 }
129 input {130 input {
131 height: 23px;
130 width: 128px;132 width: 128px;
131 background: url(/juju-ui/assets/images/searchbox_icon.png)133 background: url(/juju-ui/assets/images/searchbox_icon.png)
132 no-repeat 2px 1px whiteSmoke;134 no-repeat 4px 4px whiteSmoke;
133 margin: 0 10px;135 margin: 0 10px;
134 padding: 3px 3px 3px 26px;136 padding: 3px 3px 3px 26px;
135 font-style: italic;137 font-style: italic;
@@ -772,7 +774,20 @@
772 }774 }
773}775}
774776
777.customize-scrollbar {
778 ::-webkit-scrollbar {
779 width: 4px;
780 }
781 ::-webkit-scrollbar-track {
782 -webkit-box-shadow: inset 1px 0 3px #989A9C;
783 }
784 ::-webkit-scrollbar-thumb {
785 -webkit-box-shadow: inset 4px 0 3px #D74613;
786 }
787}
788
775#juju-search-charm-panel {789#juju-search-charm-panel {
790 .customize-scrollbar;
776 display: block;791 display: block;
777 z-index: 999;792 z-index: 999;
778 padding: 0;793 padding: 0;
@@ -820,7 +835,8 @@
820 }835 }
821 }836 }
822 .charm-panel-configure-buttons {837 .charm-panel-configure-buttons {
823 border-bottom: 1px solid @charm-panel-separator-color;838 background-color: #FFFFFF;
839 border-bottom: 1px solid @charm-panel-border-color;
824 height: 52px;840 height: 52px;
825 padding-left: 8px;841 padding-left: 8px;
826 .btn {842 .btn {
@@ -832,43 +848,62 @@
832 height: 500px;848 height: 500px;
833 }849 }
834 .charm-nav-back {850 .charm-nav-back {
835 background-color: black;851 border-top: 1px solid #DEDEDE;
836 text-transform: uppercase;852 border-bottom: 1px solid @charm-panel-border-color;
837 color: white;853 color: @charm-panel-deploy-button-color;
838 font-weight: bold;
839 cursor: pointer;854 cursor: pointer;
855 font-size: 14px;
856 padding: 7px 4px;
840 }857 }
841 .charm-panel {858 .charm-panel {
859 background-color: @charm-panel-background-color;
860 height: 432px;
861 overflow-y: auto;
862 overflow-x: hidden;
842 h3 {863 h3 {
843 text-transform: capitalize;864 color: @label-color;
844 color: blue;865 font-size: 22px;
845 font-weight: bold;866 font-weight: normal;
846 margin-top: 1ex;867 padding: 5px 0px 2px 0px;
847 margin-bottom: 1ex;
848 }868 }
849 h4 {869 h4 {
850 border-bottom: 1px solid @label-color;870 color: @label-color;
851 cursor: pointer;871 cursor: pointer;
852 margin-top: 1ex;872 border-top: 1px solid #FFFFFF;
853 margin-bottom: 1ex;873 border-bottom: 1px solid @charm-panel-border-color;
874 font-family: @font-family-medium;
875 font-weight: normal;
876 padding: 8px 12px;
854 i {877 i {
855 float: right;878 float: right;
856 }879 }
880 &.first {
881 border-top: 1px solid #E0DEDE;
882 }
857 }883 }
858 h5 {884 h5 {
859 margin-top: 1ex;885 color: @label-color;
860 &:first-child {886 font-family: @font-family-medium;
861 margin-top: 0;887 font-weight: normal;
862 }888 margin-top: 11px;
863 }889 }
864 height: 432px;890 #charm-panel-head {
865 overflow-y: auto;891 border-top: 1px solid #FFFFFF;
866 overflow-x: hidden;892 border-bottom: 1px solid @charm-panel-border-color;
893 padding: 1ex 12px 10px 12px;
894 }
867 .collapsible {895 .collapsible {
896 background-color: #E7E7E7;
897 line-height: 16px;
868 overflow: hidden;898 overflow: hidden;
899 padding: 0px 12px;
900 :last-child {
901 margin-bottom: 11px;
902 }
869 }903 }
870 &.charm-description {904 &.charm-description {
871 padding: 1ex 1em;905 color: #58595B;
906 font-size: 12px;
872 .charm-section {907 .charm-section {
873 .commitmessage {908 .commitmessage {
874 padding: 0.8ex 0 1ex 1em;909 padding: 0.8ex 0 1ex 1em;
@@ -883,14 +918,13 @@
883 }918 }
884 }919 }
885 &.config-variant {920 &.config-variant {
886 padding: 1ex 1em;
887 background-color: @charm-panel-background-color;
888 font-size: 14px;921 font-size: 14px;
922
889 .control-group {923 .control-group {
890 width: auto;924 width: auto;
891 margin-bottom: 0;925 margin-bottom: 0;
892 margin-top: 1ex;926 margin-top: 1ex;
893 padding-bottom: 0;927 padding: 0px 12px;
894 clear: both;928 clear: both;
895 }929 }
896 .control-description {930 .control-description {
897931
=== modified file 'test/test_charm_panel.js'
--- test/test_charm_panel.js 2012-11-06 02:07:38 +0000
+++ test/test_charm_panel.js 2012-11-07 18:27:21 +0000
@@ -115,7 +115,7 @@
115 field.set('value', 'aaa');115 field.set('value', 'aaa');
116 field.simulate('keydown', { keyCode: ENTER });116 field.simulate('keydown', { keyCode: ENTER });
117 node.one('a.charm-detail').simulate('click');117 node.one('a.charm-detail').simulate('click');
118 node.one('.charm-description > h3').get('text').trim()118 node.one('.charm-description h3').get('text').trim()
119 .should.equal('membase');119 .should.equal('membase');
120 });120 });
121121
@@ -212,15 +212,10 @@
212 { container: container, app: app, model: charm,212 { container: container, app: app, model: charm,
213 charmStore: charm_store }).render(),213 charmStore: charm_store }).render(),
214 html = container.one('.charm-description'),214 html = container.one('.charm-description'),
215 description_div = html.one('.charm-section div'),215 description_div = html.one('.charm-section div');
216 interface_div = html.one('div.charm-section:nth-of-type(2)'),
217 last_change_div = html.one('div.charm-section:nth-of-type(3)'),
218 related_div = html.one('div.charm-section:nth-of-type(4)');
219 html.one('h3').get('text').trim().should.equal('mysql');216 html.one('h3').get('text').trim().should.equal('mysql');
220 description_div.getStyle('height').should.not.equal('0px');217 description_div.getStyle('height').should.not.equal('0px');
221 var _ = expect(interface_div).to.not.exist;218 html.all('div.charm-section').size().should.equal(1);
222 _ = expect(last_change_div).to.not.exist;
223 _ = expect(related_div).to.not.exist;
224 });219 });
225220
226 it('can render fuller charm', function() {221 it('can render fuller charm', function() {
@@ -240,10 +235,11 @@
240 { container: container, app: app, model: charm, charms: charms,235 { container: container, app: app, model: charm, charms: charms,
241 charmStore: charm_store }).render(),236 charmStore: charm_store }).render(),
242 html = container.one('.charm-description'),237 html = container.one('.charm-description'),
243 description_div = html.one('.charm-section div'),238 sections = html.all('.charm-section'),
244 interface_div = html.one('div.charm-section:nth-of-type(2) div'),239 description_div = sections.item(0).one('div'),
245 last_change_div = html.one('div.charm-section:nth-of-type(3) div'),240 interface_div = sections.item(1).one('div'),
246 related_div = html.one('div.charm-section:nth-of-type(4)');241 last_change_div = sections.item(2).one('div'),
242 related_div = sections.item(3).one('div');
247 description_div.get('text').should.contain('A DB');243 description_div.get('text').should.contain('A DB');
248 interface_div.getStyle('height').should.equal('0px');244 interface_div.getStyle('height').should.equal('0px');
249 interface_div.get('text').should.contain('munin');245 interface_div.get('text').should.contain('munin');
@@ -268,7 +264,8 @@
268 charmStore: charm_store }).render(),264 charmStore: charm_store }).render(),
269 html = container.one('.charm-description'),265 html = container.one('.charm-description'),
270 // We use the last change div.266 // We use the last change div.
271 section_container = html.one('div.charm-section:nth-of-type(3)');267 section_container = html.one('div.charm-section:last-child');
268 //section_container = html.one('div.charm-section:nth-of-type(3)');
272 section_container.one('div').getStyle('height').should.equal('0px');269 section_container.one('div').getStyle('height').should.equal('0px');
273 assert(section_container.one('h4 i').hasClass('icon-chevron-up'));270 assert(section_container.one('h4 i').hasClass('icon-chevron-up'));
274 section_container.one('h4').simulate('click');271 section_container.one('h4').simulate('click');

Subscribers

People subscribed via source and target branches