Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 6842084: Ben's branch for env refactoring

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by hazmat
Modified:
13 years, 1 month ago
Reviewers:
frankban, benji, mp+135501
Visibility:
Public.
Ben's branch for env refactoring Ben's branch for env refactoring... testing https://code.launchpad.net/~hazmat/juju-gui/component-modules/+merge/135501 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 17
Created: 13 years, 1 month ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+850 lines, -1808 lines) Patch
M Makefile View 1 chunk +1 line, -1 line 2 comments Download
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/assets/javascripts/d3-components.js View 8 chunks +56 lines, -11 lines 4 comments Download
M app/modules-debug.js View 2 chunks +27 lines, -0 lines 0 comments Download
M app/templates/overview.handlebars View 1 chunk +2 lines, -2 lines 0 comments Download
M app/views/environment.js View 2 chunks +33 lines, -1776 lines 3 comments Download
A app/views/topology/panzoom.js View 1 chunk +42 lines, -0 lines 1 comment Download
A app/views/topology/relation.js View 1 chunk +42 lines, -0 lines 0 comments Download
A app/views/topology/service.js View 1 chunk +361 lines, -0 lines 2 comments Download
A app/views/topology/topology.js View 1 chunk +133 lines, -0 lines 4 comments Download
A app/views/topology/viewport.js View 1 chunk +41 lines, -0 lines 0 comments Download
M test/index.html View 1 chunk +1 line, -0 lines 0 comments Download
M test/test_d3_components.js View 3 chunks +8 lines, -4 lines 0 comments Download
M test/test_environment_view.js View 4 chunks +4 lines, -14 lines 0 comments Download
A test/test_topology.js View 1 chunk +97 lines, -0 lines 1 comment Download
Total messages: 3
|
hazmat
Please take a look.
13 years, 1 month ago (2012年11月21日 19:25:59 UTC) #1
Please take a look.
Sign in to reply to this message.
benji
I do not understand the intent of this branch, so my opinions can not realistically ...
13 years, 1 month ago (2012年11月21日 20:43:27 UTC) #2
I do not understand the intent of this branch, so my opinions can not
realistically considered a review, but I noticed several small issues and
commented on them.
A larger issue is that this branch is quite a bit bigger than our target diff
size. It would be nice to break it up into a few smaller branches.
Also, for the volume of code, there are relatively few tests. Smaller branches
would be easier to test convincingly, I think.
https://codereview.appspot.com/6842084/diff/1/Makefile
File Makefile (right):
https://codereview.appspot.com/6842084/diff/1/Makefile#newcode100
Makefile:100: lint: gjslint jshint
Was this intentional?
https://codereview.appspot.com/6842084/diff/1/app/assets/javascripts/d3-compo...
File app/assets/javascripts/d3-components.js (right):
https://codereview.appspot.com/6842084/diff/1/app/assets/javascripts/d3-compo...
app/assets/javascripts/d3-components.js:352: * @method renderOnce
The normal YUIDoc style is to have the prose first.
Also, we have been including @return even if it returns nothing so that we can
distinguish between "returns nothing" and "hasn't been documented".
https://codereview.appspot.com/6842084/diff/1/app/assets/javascripts/d3-compo...
app/assets/javascripts/d3-components.js:356: renderOnce: function() {},
"renderOnce" sounds more like a directive ("this thing should only be rendered
once"). Maybe "renderFirst" would be better. Or, perhaps the regular render
function should be called with a boolean indicating whether it is the first 
time.
https://codereview.appspot.com/6842084/diff/1/app/views/environment.js
File app/views/environment.js (right):
https://codereview.appspot.com/6842084/diff/1/app/views/environment.js#newcode5
app/views/environment.js:5: * @module environment
I think this was correct before. Maybe something else changed that I am not
seeing.
@module is about the logical namespace, not the file organization on disk. That
may be what is confusing things here. Since this file defines things that go in
the juju.views namespace, @module should be "views".
https://codereview.appspot.com/6842084/diff/1/app/views/environment.js#newcode19
app/views/environment.js:19: * @namespace juju.views
The YUIDoc style guide says that the "root" namespace ("juju" in our case)
should be excluded from the @namespace directive, so no "juju." here.
https://codereview.appspot.com/6842084/diff/1/app/views/topology/panzoom.js
File app/views/topology/panzoom.js (right):
https://codereview.appspot.com/6842084/diff/1/app/views/topology/panzoom.js#n...
app/views/topology/panzoom.js:12: **/
Ditto YUIDoc notes from earlier.
https://codereview.appspot.com/6842084/diff/1/app/views/topology/service.js
File app/views/topology/service.js (right):
https://codereview.appspot.com/6842084/diff/1/app/views/topology/service.js#n...
app/views/topology/service.js:139: .attr('width', function(d) {
We have been indenting chained method calls in other parts of the code.
https://codereview.appspot.com/6842084/diff/1/app/views/topology/service.js#n...
app/views/topology/service.js:345: 
An extra newline or two snuck in here.
https://codereview.appspot.com/6842084/diff/1/app/views/topology/topology.js
File app/views/topology/topology.js (right):
https://codereview.appspot.com/6842084/diff/1/app/views/topology/topology.js#...
app/views/topology/topology.js:82: **/
The pickiest of knits: YUIDoc comments of the "stars down the side" form usually
end in just a single asterisk.
https://codereview.appspot.com/6842084/diff/1/test/test_topology.js
File test/test_topology.js (right):
https://codereview.appspot.com/6842084/diff/1/test/test_topology.js#newcode51
test/test_topology.js:51: '</div>');
We should use YUI's node building instead of including HTML snippets in code. 
The style guide has more details.
Sign in to reply to this message.
frankban
This review is made by me and Nicola. Looking at the code we think we ...
13 years, 1 month ago (2012年11月22日 17:55:57 UTC) #3
This review is made by me and Nicola.
Looking at the code we think we understood the logic of it all. This split of
the env view into components and modules seems good, and allows composing the
resulting scene in a more modular way.
However, a change of such scope and size really requires to be documented both
in the code and in the project documentation. Your comment in this MP is a good
start, and needs to be pushed into the docs and expanded/better explained.
Furthermore, we agree with Benji on the need for quite a few more tests.
Given the size of this proposal, it would be helpful to split this branch up
into a series of smaller changes.
Finally, we only see two tests running (without failures).
Inline comments follow.
https://codereview.appspot.com/6842084/diff/1/Makefile
File Makefile (right):
https://codereview.appspot.com/6842084/diff/1/Makefile#newcode100
Makefile:100: lint: gjslint jshint
On 2012年11月21日 20:43:27, benji wrote:
> Was this intentional?
Yeah, why did it have to go?
https://codereview.appspot.com/6842084/diff/1/app/assets/javascripts/d3-compo...
File app/assets/javascripts/d3-components.js (right):
https://codereview.appspot.com/6842084/diff/1/app/assets/javascripts/d3-compo...
app/assets/javascripts/d3-components.js:97: if (ModClassOrInstance ===
undefined) {
Is this check here for some specific need, or is it some kind of debug leftover?
https://codereview.appspot.com/6842084/diff/1/app/assets/javascripts/d3-compo...
app/assets/javascripts/d3-components.js:364: * and update(). If update requires
some render state to operate on
Please append a comma to this line.
https://codereview.appspot.com/6842084/diff/1/app/views/environment.js
File app/views/environment.js (right):
https://codereview.appspot.com/6842084/diff/1/app/views/environment.js#newcode31
app/views/environment.js:31: topo;
topo in Italian means mouse ;-)
https://codereview.appspot.com/6842084/diff/1/app/views/topology/topology.js
File app/views/topology/topology.js (right):
https://codereview.appspot.com/6842084/diff/1/app/views/topology/topology.js#...
app/views/topology/topology.js:9: * Topology models and renders the SVG of the
envionment topology
typo: environment.
https://codereview.appspot.com/6842084/diff/1/app/views/topology/topology.js#...
app/views/topology/topology.js:23: options = options || {};
This line is a bit confusing. Isn't ``options`` a local var? Are these
``options`` used anywhere?
https://codereview.appspot.com/6842084/diff/1/app/views/topology/topology.js#...
app/views/topology/topology.js:27: render: function() {
Is this method override required? It seems to just invoke the superclass one
without adding anything.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /