← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~danilo/launchpad/bugtask-index-portlet-setup into lp:launchpad

 

The proposal to merge lp:~danilo/launchpad/bugtask-index-portlet-setup into lp:launchpad has been updated.

Description changed to:

= Split bugtask-index.js into two files =

Warning: this is a branch with a huge diff, but it's a move of ~1100 lines of JS from bugtask_index.js to a new bugtask_index_portlets.js.  Changes other than the move are minimal.

At the moment, bugtask-index.js is a behemoth of >2k lines of JS, doing many unrelated things:
 - handling duplication
 - handling branch linking
 - handling "me too" functionality
 - handling subscription portlets

The idea is to eventually split it all up by functionality, but a first step is to start with setup_portlet_handlers and move that all out into a separate file.  That includes duplication and subscribing portlets set-up.

Future branches will split duplication from subscription stuff.

== Pre-implementation notes ==

Talked this over with Graham who suggested starting with setup_portlet_handlers.

== Implementation details ==

Only two functions are namespaced using lp.bugs.bugtask_index.portlets, because they are the actual entry points. If it is agreed to namespace all the other methods, I'd kind of prefer to do it in a separate branch (to make it easier to bisect if any problems).

Rest of it is a simple code move from bugtask-index.js to bugtask-index-portlets.js.

Fixes in other parts of the tree are due to failing windmill tests.

I am not sure how to best figure out what is the minimum list of required modules for a certain module (I just copied the list over from bugtask_index.js), so if a reviewer has any suggestions, I'd be happy to hear them out.

== Tests ==

bin/test -cvvm lp.bugs --layer=WindmillLayer

== Demo and Q/A ==

Go to eg. https://bugs.launchpad.dev/tomcat/+bug/2 and try setting a bug as a duplicate of another bug (say number 3), subscribing and unsubscribing from a bug.  Nothing should change compared to the existing behaviour.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/bugs/templates/bug-portlet-subscribers.pt
  lib/lp/bugs/javascript/bugtask_index_portlets.js
  lib/lp/bugs/javascript/bugtask_index.js

For more details, see:
https://code.launchpad.net/~danilo/launchpad/bugtask-index-portlet-setup/+merge/49818
-- 
https://code.launchpad.net/~danilo/launchpad/bugtask-index-portlet-setup/+merge/49818
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~danilo/launchpad/bugtask-index-portlet-setup into lp:launchpad.



References