Merge lp://staging/~bcsaller/juju-gui/component-modules into lp://staging/~bcsaller/juju-gui/component-framework
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~bcsaller/juju-gui/component-modules |
Merge into: | lp://staging/~bcsaller/juju-gui/component-framework |
Diff against target: |
6579 lines (+2731/-2310) 53 files modified
.bzrignore (+1/-7) Makefile (+127/-47) README (+1/-1) app/app.js (+86/-44) app/assets/javascripts/d3-components.js (+56/-11) app/assets/svgs/service_health_mask.svg (+196/-128) app/assets/svgs/service_module.svg (+124/-131) app/index.html (+11/-8) app/models/models.js (+2/-0) app/modules-debug.js (+166/-0) app/modules.js (+12/-109) app/store/notifications.js (+1/-1) app/templates/charm-description.handlebars (+20/-11) app/templates/charm-pre-configuration.handlebars (+14/-14) app/templates/charm-search-result.handlebars (+6/-3) app/templates/notifier.handlebars (+3/-0) app/templates/overview.handlebars (+4/-2) app/views/charm-panel.js (+82/-16) app/views/charm.js (+3/-2) app/views/environment.js (+43/-1612) app/views/notifications.js (+30/-2) app/views/service.js (+5/-3) app/views/topology/panzoom.js (+42/-0) app/views/topology/relation.js (+42/-0) app/views/topology/service.js (+361/-0) app/views/topology/topology.js (+133/-0) app/views/topology/viewport.js (+41/-0) app/views/unit.js (+2/-1) app/views/utils.js (+2/-1) app/widgets/notifier.js (+148/-0) bin/merge-files (+80/-0) docs/style-guide.rst (+38/-0) grunt.js (+3/-3) lib/merge-files.js (+136/-0) lib/server.js (+25/-3) lib/templates.js (+2/-2) lib/views/stylesheet.less (+262/-108) package.json (+2/-1) test-server.js (+4/-1) test/index.html (+5/-2) test/test_app.js (+1/-1) test/test_app_hotkeys.js (+63/-0) test/test_application_notifications.js (+1/-1) test/test_charm_panel.js (+12/-16) test/test_charm_view.js (+2/-1) test/test_d3_components.js (+8/-4) test/test_environment_view.js (+56/-2) test/test_notifications.js (+61/-0) test/test_notifier_widget.js (+103/-0) test/test_service_view.js (+4/-2) test/test_topology.js (+97/-0) test/test_unit_view.js (+2/-1) undocumented (+0/-8) |
To merge this branch: | bzr merge lp://staging/~bcsaller/juju-gui/component-modules |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benjamin Saller | Pending | ||
Review via email:
|
Description of the change
Example module for env view refactor
Looking to get more eyes on the way the module code is playing out. In
particular I'm much more interested in if the various parts fit together in
a way that makes sense to people than an details of the impl.
The basic pattern is this
EnvironmentView has a Topology object which is a subclass of the d3-component
stuff. The Env view binds modules to the topology (from app/views/
The framework will look at each modules declarative structures for events and
bind behavior. The basic cycle the view moves through then is
update() <- called on data change to recompute view models, things like
render() <- draw the current scene. Render itself support the notion of one
time setup code and incremental rendering. For the most part
scene mutation will happen in the event handlers though, those
behaviors are facilitated by the framework but not controlled by
it.
Modules attempt to aid in keeping inter-module code loosely coupled. This is
done by encouraging use of custom YUI events. Module.events.yui is one of the
event binding structures available from the framework, modules can listen for
changes that may be of interest to other modules and fire events which can
trigger handlers.
There isn't always a clean line between what should live in a module and the
topology object itself but the rule of thumb is that if it can reasonably go
in a module it should, the topology layer is mainly configuration and
coordination.
Looking forward to comments. Thanks.
Unmerged revisions
- 240. By Benjamin Saller
-
removed yuidoc-lint from make lint... gah
- 239. By Benjamin Saller
-
merge trunk
- 238. By Benjamin Saller
-
lint
- 237. By Benjamin Saller
-
reindent file
- 236. By Benjamin Saller
-
checkpoint prior to jsfixstyle
- 235. By Benjamin Saller
-
remove need to call renderOnce/update
- 234. By Benjamin Saller
-
basic service module, very little crossmodule cutting
- 233. By Benjamin Saller
-
checkpoint module event scoping and ordering work
- 232. By Benjamin Saller
-
revert back to empty modules
- 231. By Benjamin Saller
-
merge trunk (ignoring) env changes
Reviewers: mp+135272_ code.launchpad. net,
Message:
Please take a look.
Description:
Example module for env view refactor
Looking to get more eyes on the way the module code is playing out. In
particular I'm much more interested in if the various parts fit together
in
a way that makes sense to people than an details of the impl.
The basic pattern is this
EnvironmentView has a Topology object which is a subclass of the topology/ ).
d3-component
stuff. The Env view binds modules to the topology (from
app/views/
The framework will look at each modules declarative structures for
events and
bind behavior. The basic cycle the view moves through then is
update() <- called on data change to recompute view models, things like
position information.
render() <- draw the current scene. Render itself support the notion of
one
time setup code and incremental rendering. For the most part
scene mutation will happen in the event handlers though, those
behaviors are facilitated by the framework but not controlled by
it.
Modules attempt to aid in keeping inter-module code loosely coupled.
This is
done by encouraging use of custom YUI events. Module.events.yui is one
of the
event binding structures available from the framework, modules can
listen for
changes that may be of interest to other modules and fire events which
can
trigger handlers.
There isn't always a clean line between what should live in a module and
the
topology object itself but the rule of thumb is that if it can
reasonably go
in a module it should, the topology layer is mainly configuration and
coordination.
Looking forward to comments. Thanks.
https:/ /code.launchpad .net/~bcsaller/ juju-gui/ component- modules/ +merge/ 135272
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/6858045/
Affected files: images/ back_triangle. png images/ notifier- error.png javascripts/ d3-components. js svgs/service_ health_ mask.svg svgs/service_ module. svg models. js debug.js notifications. js charm-descripti on.handlebars charm-pre- configuration. handlebars charm-search- result. handlebars notifier. handlebars overview. handlebars charm-panel. js environment. js notifications. js service. js topology/ panzoom. js topology/ relation. js topology/ service. js topology/ topology. js topology/ viewport. js notifier. js guide.rst stylesheet. less
M .bzrignore
M Makefile
M README
A [revision details]
M app/app.js
A app/assets/
A app/assets/
M app/assets/
M app/assets/
M app/assets/
A app/favicon.ico
M app/index.html
M app/models/
A app/modules-
M app/modules.js
M app/store/
M app/templates/
M app/templates/
M app/templates/
A app/templates/
M app/templates/
M app/views/
M app/views/charm.js
M app/views/
M app/views/
M app/views/
A app/views/
A app/views/
A app/views/
A app/views/
A app/views/
M app/views/unit.js
M app/views/utils.js
A app/widgets/
A bin/merge-files
M docs/style-
M grunt.js
A lib/merge-files.js
M lib/server.js
M lib/templates.js
M lib/views/
M package.json
M test-server.js
M test/index.html
M test/test_app.js
A test/test_app_...