Merge lp:~rharding/launchpad/fix_banner_cleanup into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | j.c.sackett | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 16113 | ||||
Proposed branch: | lp:~rharding/launchpad/fix_banner_cleanup | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
171 lines (+28/-50) 5 files modified
lib/lp/app/javascript/banners/banner.js (+7/-2) lib/lp/app/javascript/banners/privacy.js (+8/-8) lib/lp/app/javascript/banners/tests/test_privacy.js (+7/-39) lib/lp/app/javascript/information_type.js (+2/-0) lib/lp/app/javascript/tests/test_information_type.js (+4/-1) |
||||
To merge this branch: | bzr merge lp:~rharding/launchpad/fix_banner_cleanup | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Review via email: mp+128026@code.launchpad.net |
Commit message
Slight clean and decouple of the banner and information type JS.
Description of the change
= Summary =
Originally I introduced a bug in the privacy banner and information type
updates. I had moved a function off the JS module namespace that was used
elsewhere. In the process of updating that, some other code was added that
isn't required. This tries to decouple back up the banner from the information
type as much as possible.
== Implementation Notes ==
The test for the text_node is purely because of the testing. It's a lot of extra html to bootstrap that we don't need to test against.
We force the event driven code to pass the banner text so that the information_type method get_banner_text is kept within it's module and privacy.js isn't calling into it.
The test_privacy then no longer needs to bootstrap all the information_type data in the LP.cache and the tests are updated to make sure the text data is passed into the event.
The event drive code isn't currently used, but will be tied into place in a future branch.
== Q/A ==
The banner should fire and work when a bug is changed to private, to public,
and security related information types.
== Tests ==
test_informatio
test_privacy.html
Looks fine.