Merge lp:~gmb/launchpad/use-subscribe-form-for-fun-and-profit-bug-687747 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Graham Binns on 2010-12-17 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 12100 |
| Proposed branch: | lp:~gmb/launchpad/use-subscribe-form-for-fun-and-profit-bug-687747 |
| Merge into: | lp:launchpad |
| Diff against target: |
480 lines (+320/-67) 3 files modified
lib/lp/bugs/javascript/bug_subscription_widget.js (+93/-57) lib/lp/bugs/javascript/tests/test_bug_subscription_widget.html (+9/-0) lib/lp/bugs/javascript/tests/test_bug_subscription_widget.js (+218/-10) |
| To merge this branch: | bzr merge lp:~gmb/launchpad/use-subscribe-form-for-fun-and-profit-bug-687747 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Deryck Hodge (community) | code | 2010-12-14 | Approve on 2010-12-17 |
|
Review via email:
|
|||
Commit Message
[r=deryck]
Description of the Change
This branch is the latest in a line of branches to get the new
subscription wizard widget ready to be linked up with the Launchpad
code.
In this branch, the existing code, which was pretty much a placeholder
and very linear, is replaced with lots of asynchronous, event-driven
stuff. This leaves us ready for a final branch or two that will allow us
to start using the subscription wizard.
Changes made in this branch (no lint):
== lib/lp/
- I've updated the existing code to make it event driven, so that
calling the initialize_
of event handlers and then calls the load_subscripti
order to get the ball rolling.
== lib/lp/
- I've imported a few more bits of JS needed to make the tests work.
== lib/lp/
- I've updated the tests to reflect the event-driven nature of the new
code and I've added tests to cover the new event handling stuff.

This looks good. Thanks for the nice testing! I'm glad to see you working on the widget's base functionality like this first, and testing well, before moving on to implementation. Nicely done.
One minor tip, if you're curious about his:
I had to disable fetchCSS when Windmill was running to prevent YUI trying to go off-site for resources, so as you may have noticed, the logger is hard to read. If you apply this diff locally (setting fetchCSS to true) you can have an easier to read test:
=== modified file 'lib/lp/ bugs/javascript /tests/ test_bug_ subscription_ widget. js' bugs/javascript /tests/ test_bug_ subscription_ widget. js 2010-12-14 10:42:45 +0000 bugs/javascript /tests/ test_bug_ subscription_ widget. js 2010-12-17 16:12:40 +0000 ../../canonical /launchpad/ icing/yui/ ', mockio' ,
'lp.bugs. bug_subscriptio n_wizard' , 'node', 'test',
--- lib/lp/
+++ lib/lp/
@@ -4,7 +4,7 @@
base: '../../
filter: 'raw',
combine: false,
- fetchCSS: false
+ fetchCSS: true
}).use(
'event', 'event-simulate', 'lazr.testing.
Of course, don't commit this until we can work out testing better. But locally it makes the test easier on the eyes.
Cheers,
deryck