← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wallyworld/launchpad/refactor-subscribers_list-javascript into lp:launchpad

 

Ian Booth has proposed merging lp:~wallyworld/launchpad/refactor-subscribers_list-javascript into lp:launchpad with lp:~wallyworld/launchpad/question-canBeUnsubscribedByUser as a prerequisite.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/refactor-subscribers_list-javascript/+merge/69025

There's a need to allow users to unsubscribe people from questions without needed to ask an admin to run SQL. See bug 134577. A nice javascript enabled subscription portlet would be useful.

The bug subscription javascript has a subscribers_list module which is generic and which is very loosely coupled to bugs. The coupling is really just the supported subscription levels which are bug specific. The subscribers list implementation is several 100 lines of Javascript providing nice animations etc etc so it really makes sense to reuse that for other types of subscriptions.

This branch moves the lib/lp/bugs/javascript/subscribers_list.js module to lib/lp/app/javascript/subscribers and parameterises the bug specific subscription levels. The end result is that there's a generic subscribers_list module which simply requires that the context supports web service enabled subscribe/unsubscribe methods. The existing bugs usage is ported to use this new generic implementation. 

== Tests ==

The existing bug test_subscribers_list.js were moved to lib/lp/app/javascript/subscribers/tests and modified to work with the changed implementation. Additionally, yui tests were written to ensure the bugs javascript wrapper used to instantiate the subscribers portlet on the bug page works as expected:
  lib/lp/bugs/javascript/tests/test_subscribers.js

== Lint ==

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/app/javascript/subscribers/
  lib/lp/app/javascript/subscribers/subscribers_list.js
  lib/lp/app/javascript/subscribers/tests/
  lib/lp/app/javascript/subscribers/tests/test_subscribers_list.html
  lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js
  lib/lp/bugs/javascript/subscribers.js
  lib/lp/bugs/javascript/tests/test_subscribers.html
  lib/lp/bugs/javascript/tests/test_subscribers.js
  lib/lp/bugs/templates/bugtask-index.pt

-- 
https://code.launchpad.net/~wallyworld/launchpad/refactor-subscribers_list-javascript/+merge/69025
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wallyworld/launchpad/refactor-subscribers_list-javascript into lp:launchpad.