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

Issue 6971045: Panzoom Module

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by bcsaller
Modified:
11 years, 4 months ago
Reviewers:
bac, mp+140671
Visibility:
Public.

Description

Panzoom Module This branch breaks out the first module from Mega into a more module unit. While this module is small a number of changes occur to make this happen. The framework underwent some improvemnts, changes around interaction with App and view replacement occured, event bindings had to be updated. A pattern for cross module event firing was established. In future modules, the topo/component fires the events and modules are bubble targets. https://code.launchpad.net/~bcsaller/juju-gui/topology-panzoom/+merge/140671 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Panzoom Module #

Total comments: 1

Patch Set 3 : Panzoom Module #

Total comments: 13

Patch Set 4 : Panzoom Module #

Patch Set 5 : Panzoom Module #

Unified diffs Side-by-side diffs Delta from patch set Stats (+620 lines, -503 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 1 chunk +16 lines, -31 lines 0 comments Download
M app/assets/javascripts/d3-components.js View 1 2 3 4 9 chunks +116 lines, -56 lines 0 comments Download
M app/templates/overview.handlebars View 1 chunk +1 line, -1 line 0 comments Download
M app/views/environment.js View 3 chunks +24 lines, -16 lines 0 comments Download
M app/views/topology/mega.js View 1 30 chunks +120 lines, -287 lines 0 comments Download
M app/views/topology/panzoom.js View 1 2 3 1 chunk +155 lines, -6 lines 0 comments Download
M app/views/topology/topology.js View 1 2 3 4 chunks +89 lines, -15 lines 0 comments Download
M test/test_d3_components.js View 3 chunks +6 lines, -4 lines 0 comments Download
M test/test_environment_view.js View 1 2 3 2 chunks +10 lines, -7 lines 0 comments Download
M test/test_topology.js View 3 chunks +3 lines, -2 lines 0 comments Download
M undocumented View 4 chunks +78 lines, -78 lines 0 comments Download

Messages

Total messages: 7
bcsaller
Please take a look.
11 years, 4 months ago (2012-12-19 13:50:18 UTC) #1
bcsaller
Please take a look.
11 years, 4 months ago (2012-12-20 13:39:21 UTC) #2
bcsaller
Please take a look.
11 years, 4 months ago (2012-12-20 14:49:03 UTC) #3
gary.poster
Thanks for helping me understand this. As I expected, I'm +1 on the code. I ...
11 years, 4 months ago (2012-12-20 15:23:26 UTC) #4
hazmat
quick items https://codereview.appspot.com/6971045/diff/7002/app/assets/javascripts/d3-components.js File app/assets/javascripts/d3-components.js (right): https://codereview.appspot.com/6971045/diff/7002/app/assets/javascripts/d3-components.js#newcode255 app/assets/javascripts/d3-components.js:255: console.log('Bind', target, eventPhase, name); s/console.log // console.debug ...
11 years, 4 months ago (2012-12-20 15:43:29 UTC) #5
bcsaller
*** Submitted: Panzoom Module This branch breaks out the first module from Mega into a ...
11 years, 4 months ago (2012-12-20 17:23:55 UTC) #6
bac
11 years, 4 months ago (2012-12-20 17:51:40 UTC) #7
I make several suggestions but they are all straight-forward so no re-look is
necessary before landing.

Recently I *think* we agreed to the 'one var per variable' idea which you didn't
follow for the newly added code.  Perhaps it was "When in Rome" or you just
forgot.  I'm just mentioning as a point of discussion not a suggestion to change
as it would delay this important work from landing.

https://codereview.appspot.com/6971045/diff/17/app/assets/javascripts/d3-comp...
File app/assets/javascripts/d3-components.js (right):

https://codereview.appspot.com/6971045/diff/17/app/assets/javascripts/d3-comp...
app/assets/javascripts/d3-components.js:155: 
These two cases are mutually exclusive, right, so 'else if' would be clearer.

https://codereview.appspot.com/6971045/diff/17/app/assets/javascripts/d3-comp...
app/assets/javascripts/d3-components.js:248: if
(Y.Array.indexOf(['windowresize'], name) !== -1) {
I don't understand why the indexOf is used instead of just a comparison.

https://codereview.appspot.com/6971045/diff/17/app/assets/javascripts/d3-comp...
app/assets/javascripts/d3-components.js:315: // Create an adaptor
s/adaptor/adapter

https://codereview.appspot.com/6971045/diff/17/app/views/environment.js
File app/views/environment.js (right):

https://codereview.appspot.com/6971045/diff/17/app/views/environment.js#newco...
app/views/environment.js:66: // Bind d3 events (manually)
This line is a complete thought and needs a period to be more readable.

https://codereview.appspot.com/6971045/diff/17/app/views/environment.js#newco...
app/views/environment.js:69: // the existing (from change to showView)
I'm unclear what you're saying here.

https://codereview.appspot.com/6971045/diff/17/app/views/topology/panzoom.js
File app/views/topology/panzoom.js (right):

https://codereview.appspot.com/6971045/diff/17/app/views/topology/panzoom.js#...
app/views/topology/panzoom.js:9: * Handle PanZoom within the a Topology.
typo: the a

Pick one?  :)

https://codereview.appspot.com/6971045/diff/17/app/views/topology/panzoom.js#...
app/views/topology/panzoom.js:51: contianer = topo.get('container'),
typo: container

Is that variable even used?

https://codereview.appspot.com/6971045/diff/17/app/views/topology/panzoom.js#...
app/views/topology/panzoom.js:127: evt.translate[1] -=
parseInt(rect.attr('height'), 10) / 2 * delta;
I wish we'd made a wrapper early on for parseInt that defaulted to base 10.  So
annoying to see everywhere.

https://codereview.appspot.com/6971045/diff/17/app/views/topology/topology.js
File app/views/topology/topology.js (right):

https://codereview.appspot.com/6971045/diff/17/app/views/topology/topology.js...
app/views/topology/topology.js:17: * Emmitted Events:
Emitted
Sign in to reply to this message.

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