← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/kill-lazr-0 into lp:launchpad

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/kill-lazr-0 into lp:launchpad.

Requested reviews:
  Richard Harding (rharding)

For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/kill-lazr-0/+merge/120650

Summary
=======
We want to get move the various lazr bits and pieces into a unified lp.ui
namespace, but that's going to take a lot of work.

First, we've discovered that there already is an lp.ui namespace, containing
one file, that provides one questionably useful method. After discussion,
we've created a new namespace -- lp.deprecated -- and moved this into that.
We've also moved the file to deprecated.js, so as to discourage anything but
deletion.

Preimp
======
Spoke with Rick Harding.

Implementation
==============
* lp.ui.js is now deprecated.js
* The namespace is now lp.deprecated
* The module is lp.deprecated-ui

LoC
===
This is LoC neutral.

Lint
====

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/blueprints/templates/specification-index.pt
  lib/lp/app/javascript/deprecated.js
  lib/lp/code/templates/sourcepackagerecipe-index.pt
-- 
https://code.launchpad.net/~jcsackett/launchpad/kill-lazr-0/+merge/120650
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== renamed file 'lib/lp/app/javascript/lp.ui.js' => 'lib/lp/app/javascript/deprecated.js'
--- lib/lp/app/javascript/lp.ui.js	2012-03-14 12:51:18 +0000
+++ lib/lp/app/javascript/deprecated.js	2012-08-21 20:29:36 +0000
@@ -1,13 +1,13 @@
-/* Copyright 2011 Canonical Ltd.  This software is licensed under the
+/* Copyright 2011-2012 Canonical Ltd.  This software is licensed under the
  * GNU Affero General Public License version 3 (see the file LICENSE).
  *
- * Launchpad helper methods for generic UI stuff.
+ * Deprecated javascript in Launchpad.
  *
- * @module Y.lp.ui
+ * @module Y.lp.deprecated-ui
  */
-YUI.add('lp.ui', function(Y) {
+YUI.add('lp.deprecated-ui', function(Y) {
 
-    var module = Y.namespace('lp.ui');
+    var module = Y.namespace('lp.deprecated');
 
     module.update_field = function(selector, content)
     {

=== modified file 'lib/lp/blueprints/templates/specification-index.pt'
--- lib/lp/blueprints/templates/specification-index.pt	2012-07-07 14:00:30 +0000
+++ lib/lp/blueprints/templates/specification-index.pt	2012-08-21 20:29:36 +0000
@@ -310,7 +310,7 @@
     </div>
 
   <script type="text/javascript">
-    LPJS.use('lp.anim', 'lp.ui', 'node', 'widget', function(Y) {
+    LPJS.use('lp.anim', 'lp.deprecated-ui', 'node', 'widget', function(Y) {
 
         Y.on('lp:context:implementation_status:changed', function(e) {
             var icon = Y.one('#informational-icon');
@@ -321,7 +321,7 @@
             }
         });
         Y.on('lp:context:lifecycle_status:changed', function(e) {
-            Y.lp.ui.update_field('#lifecycle-status', e.new_value);
+            Y.lp.deprecated.update_field('#lifecycle-status', e.new_value);
         });
         Y.on('lp:context:is_started:changed', function(e) {
             var started = Y.one('#started-by');
@@ -345,7 +345,7 @@
         });
         Y.on('lp:context:title:changed', function(e) {
             // change the window title and breadcrumb.
-            Y.lp.ui.update_field('ol.breadcrumbs li:last-child', e.new_value);
+            Y.lp.deprecated.update_field('ol.breadcrumbs li:last-child', e.new_value);
             var title = window.document.title;
             title = e.new_value + title.substring(e.old_value.length);
             window.document.title = title;

=== modified file 'lib/lp/code/templates/sourcepackagerecipe-index.pt'
--- lib/lp/code/templates/sourcepackagerecipe-index.pt	2012-07-07 14:00:30 +0000
+++ lib/lp/code/templates/sourcepackagerecipe-index.pt	2012-08-21 20:29:36 +0000
@@ -146,13 +146,13 @@
   </div>
 
   <script type="text/javascript">
-    LPJS.use('io-base', 'lp.ui', 'lp.code.requestbuild_overlay', function(Y) {
+    LPJS.use('io-base', 'lp.deprecated-ui', 'lp.code.requestbuild_overlay', function(Y) {
 
         Y.on('lp:context:deb_version_template:changed', function(e) {
-            Y.lp.ui.update_field('#debian-version dd', e.new_value);
+            Y.lp.deprecated.update_field('#debian-version dd', e.new_value);
         });
         Y.on('lp:context:base_branch_link:changed', function(e) {
-            Y.lp.ui.update_field('#base-branch dd', e.new_value_html);
+            Y.lp.deprecated.update_field('#base-branch dd', e.new_value_html);
         });
         Y.on('load', function() {
             Y.lp.code.requestbuild_overlay.hookUpDailyBuildsSchedule();


Follow ups