← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rharding/launchpad/add_new_banner into lp:launchpad

 

The proposal to merge lp:~rharding/launchpad/add_new_banner into lp:launchpad has been updated.

Description changed to:

= Summary =

We need to add banner support to projects and blueprints now that they support
privacy. As these features are also in beta we really wanted to enable the
display of dual banners. Currently the banners are handled through an array of
stray modules that make working on them difficult and they do several evil
things, such as manually set style: attributes on html elements.

This branch introduces a new YUI widget for banners. It also introduces a new
JS View object that is loaded on every page to handle the interaction between
events on the page and the control of banners.

== Pre Implementation ==

Lots and lots of going through current code, discussing goals with Deryck, and
a sanity check mini-code look over from jcsackett that did much of the current
banner work.

== Implementation Notes ==

This code is not wired up at all. It's meant to introduce new modules that old
code needs to interact with. The goal is to move to all code merely firing an
event that the global view handles and deals with banners. The banners
themselves are reusable widgets and could be used to create banner nodes
anywhere in the dom as many times as you want.

The entirity of the work is viewable in the temp MP:

https://code.launchpad.net/~rharding/launchpad/new_banner_stage1/+merge/132957

However it's huge and so I'm breaking this into several parts. The next step
will alter the interaction points of the old code followed by a final branch
to remove all the old banner code once everything else is updated and working.

Since all of this involved the information type, we're relying on it's events
to be the command center. The idea is that global.js sets up event listeners.
Any code that changes information type should fire the
information_type.EV_CHANGE event with the new value and the global.js will
handle processing any banner updates/changes.

The beta banner will be setup and provided from python view as it currently
is. However, the .pt will only place an empty div on the page and the JS will
handle all rendering so that all rendered html is in one place, the Widget.

The CSS is updated so that there is no need to manually set styles. Currently
it relies on the view code adding public/private to the <body> however,
however this is ONLY required because of the way the locationbar works and
when bug #1076074 this can be cleaned up.

Just to give an idea here's a screenshot of a stacked banner we're working on 
making possible with this code.

http://uploads.mitechie.com/lp/stacked_banners.png

== Tests ==

New tests for each module.

xvfb-run ./bin/test -x -cvv --layer=YUITestLayer

== QA ==

None at this point. It's only adding in code that's not wired into use yet.

For more details, see:
https://code.launchpad.net/~rharding/launchpad/add_new_banner/+merge/133736
-- 
https://code.launchpad.net/~rharding/launchpad/add_new_banner/+merge/133736
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rharding/launchpad/add_new_banner into lp:launchpad.


References