Code review comment for lp://staging/~gary/juju-gui/nodeChangeHandler

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

Reviewers: mp+184901_code.launchpad.net,

Message:
Please take a look.

Description:
Refactor and rename BindingEngine._storeChanged

This is a small clean-up branch in preparation to cleaning up some of
the conflict resolution edge cases. It is largely about refactoring and
renaming BindingEngine._storeChanged.

* BindingEngine._storeChanged is now called _nodeChangeHandler.
* That method simply calls out to the new method _nodeChanged. It takes
a node rather than an event with a node.
* Factored _getBinding out of _nodeChanged to make the code read better
and to test the functionality independently.
* Adjusted tests to use _nodeChanged.
* Refactored tests to reuse more code and clean up some lint.
* Added tests for _getBinding.

In addition to those related changes, I made one more peripheral change:
I removed an unused argument to unsyncedFields.

There's not much to QA here. It's just moving bits of code around.

https://code.launchpad.net/~gary/juju-gui/nodeChangeHandler/+merge/184901

(do not edit description out of merge proposal)

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

Affected files (+95, -51 lines):
   A [revision details]
   M app/views/databinding.js
   M app/views/inspector.js
   M test/test_databinding.js
   M test/test_inspector_constraints.js
   M test/test_inspector_settings.js

« Back to merge proposal