Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2574)

Issue 6601045: Charm deploy from front page.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by bac
Modified:
11 years, 6 months ago
Reviewers:
hazmat, mp+127781, gary.poster
Visibility:
Public.

Description

Charm deploy from front page. Make charm deployment possible. Also fixed bug 1053127 as a drive-by. Note use of ev.stopPropagation() in showCharm to prevent the URL from changing. https://code.launchpad.net/~bac/juju-ui/charm-deploy/+merge/127781 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Charm deploy from front page. #

Total comments: 2

Patch Set 3 : Charm deploy from front page. #

Total comments: 2

Patch Set 4 : Charm deploy from front page. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+548 lines, -325 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M app/index.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M app/models/models.js View 1 2 1 chunk +14 lines, -1 line 0 comments Download
M app/templates/charm-search-pop.handlebars View 1 1 chunk +1 line, -1 line 0 comments Download
M app/templates/charm-search-result-entries.handlebars View 1 chunk +21 lines, -17 lines 0 comments Download
M app/templates/service-header.partial View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M app/views/charm-search.js View 1 2 3 4 chunks +248 lines, -117 lines 0 comments Download
M app/views/service.js View 1 chunk +1 line, -0 lines 0 comments Download
M app/views/utils.js View 1 2 3 1 chunk +28 lines, -28 lines 0 comments Download
M lib/views/stylesheet.less View 1 1 chunk +34 lines, -16 lines 0 comments Download
M test/test_charm_search.js View 5 chunks +154 lines, -72 lines 0 comments Download
M test/test_model.js View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M test/test_utils.js View 2 chunks +31 lines, -70 lines 0 comments Download

Messages

Total messages: 9
bac
Please take a look.
11 years, 6 months ago (2012-10-03 14:32:21 UTC) #1
bac
Please take a look.
11 years, 6 months ago (2012-10-03 14:42:04 UTC) #2
hazmat
a couple of issues, i can't seem to close the charm search dialog. The clicking ...
11 years, 6 months ago (2012-10-03 15:52:50 UTC) #3
bac
On 2012/10/03 15:52:50, hazmat wrote: > a couple of issues, i can't seem to close ...
11 years, 6 months ago (2012-10-03 21:10:43 UTC) #4
bac
https://codereview.appspot.com/6601045/diff/2001/app/templates/charm-search-result-entries.handlebars File app/templates/charm-search-result-entries.handlebars (right): https://codereview.appspot.com/6601045/diff/2001/app/templates/charm-search-result-entries.handlebars#newcode11 app/templates/charm-search-result-entries.handlebars:11: data-url="{{url}}" It is confusing due to the convention of ...
11 years, 6 months ago (2012-10-03 21:10:51 UTC) #5
bac
Please take a look.
11 years, 6 months ago (2012-10-03 21:15:55 UTC) #6
bac
Please take a look.
11 years, 6 months ago (2012-10-04 15:35:08 UTC) #7
hazmat
https://codereview.appspot.com/6601045/diff/8002/app/views/charm-search.js File app/views/charm-search.js (right): https://codereview.appspot.com/6601045/diff/8002/app/views/charm-search.js#newcode171 app/views/charm-search.js:171: This code feels a bit dodgy given the built-in ...
11 years, 6 months ago (2012-10-04 21:48:22 UTC) #8
gary.poster
11 years, 6 months ago (2012-10-04 22:42:24 UTC) #9
Quick replies to hazmat.

https://codereview.appspot.com/6601045/diff/8002/app/views/charm-search.js
File app/views/charm-search.js (right):

https://codereview.appspot.com/6601045/diff/8002/app/views/charm-search.js#ne...
app/views/charm-search.js:171: 
On 2012/10/04 21:48:22, hazmat wrote:
> This code feels a bit dodgy given the built-in app support for persistent
views
> (ie. what notifications do). The panel display then falls out as a the
> persistent container view with management around the active subview.

While agree completely that this code should be refactored, and generally agree
that sticking with YUI component bits would be better, I'm not sure that the
app-in-app approach is actually easier to read.  That said, the infrastructure
advantages make it a win, I now agree.

> Given time constraints i'm fine with accumulating it as technical debt, but
> please make a card about cleaning this up, as a self-contained example of the
> alternative, see 
> http://jsbin.com/ojalij/1/edit

+1, though the refactoring may fall out of other work, just as the separation of
the sub-view fell out.

> As it is the charm collection view gets created and rendered on every
> navigation.

That's actually not true even in the current approach. 
views.CharmSearchPopup.getInstance makes a singleton, so the variables are made
once per top-level page load.

> magic testing parameterization/hardcode is also questionable, versus, just
being
> able to have the tests pass in the parameters to achieve the desired behavior
> ie. searchDelay 0.

Hm.  If the only point of a particular configuration is to make something
testable, why does it need to be exposed?  I grant it is questionable, but I
also don't think that the answer is a given.

> 
> Also rather than managing an isPopupVisible variable, a yui3 visible() test
> against the container would suffice.

Agreed.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b