← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/rollback-15305 into lp:launchpad

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/rollback-15305 into lp:launchpad.

Requested reviews:
  Curtis Hovey (sinzui)

For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/rollback-15305/+merge/107780

This rolls back the change that introduced changing text in the privacy banner--while that behavior works fine, it needs to be tied to the feature flag that determines the display of info type in the privacy portlet.

Those changes will be relanded along with the feature flag code shortly, but this branch prevents the changing text from being out in the wild until then.
-- 
https://code.launchpad.net/~jcsackett/launchpad/rollback-15305/+merge/107780
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/app/templates/banner-macros.pt'
--- lib/lp/app/templates/banner-macros.pt	2012-05-24 20:47:16 +0000
+++ lib/lp/app/templates/banner-macros.pt	2012-05-29 13:26:19 +0000
@@ -13,16 +13,7 @@
       <div class="yui3-privacybanner-content">
         <div class="global-notification">
           <span class="sprite notification-private"></span>
-          <tal:info_type
-             define="info_type python: getattr(view, 'information_type', None)">
-            <span tal:condition="not: info_type" class="banner-text">
-              The information on this page is private.
-            </span>
-            <span tal:condition="info_type" class="banner-text">
-              <tal:text
-                content="string: This page contains ${info_type} information."/>
-            </span>
-          </tal:info_type>
+          <span class="banner-text">The information on this page is private.</span>
         </div>
       </div>
     </div>

=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py	2012-05-24 15:42:31 +0000
+++ lib/lp/bugs/browser/bugtask.py	2012-05-29 13:26:19 +0000
@@ -702,10 +702,6 @@
     def recommended_canonical_url(self):
         return canonical_url(self.context.bug, rootsite='bugs')
 
-    @property
-    def information_type(self):
-        return self.context.bug.information_type.title
-
     def initialize(self):
         """Set up the needed widgets."""
         bug = self.context.bug

=== modified file 'lib/lp/bugs/javascript/information_type_choice.js'
--- lib/lp/bugs/javascript/information_type_choice.js	2012-05-24 15:46:37 +0000
+++ lib/lp/bugs/javascript/information_type_choice.js	2012-05-29 13:26:19 +0000
@@ -42,9 +42,6 @@
     subscription_ns.update_subscription_status();
     update_information_type_description(value);
     if (private_type) {
-        privacy_banner.updateText(Y.Lang.substitute(
-            "This page contains {info_type} information.",
-            { info_type: value }));
         body.replaceClass('public', 'private');
         privacy_banner.show();
     } else {

=== modified file 'lib/lp/bugs/javascript/tests/test_information_type_choice.js'
--- lib/lp/bugs/javascript/tests/test_information_type_choice.js	2012-05-24 16:07:39 +0000
+++ lib/lp/bugs/javascript/tests/test_information_type_choice.js	2012-05-29 13:26:19 +0000
@@ -54,8 +54,7 @@
             Y.lp.app.banner.privacy.getPrivacyBanner = function () {
                 return {
                     show: function () { Y.fire('test:banner:show'); },
-                    hide: function () { Y.fire('test:banner:hide'); },
-                    updateText: function () { Y.fire('test:banner:update'); }
+                    hide: function () { Y.fire('test:banner:hide'); }
                 };
             };
             return old_func;
@@ -89,20 +88,15 @@
                 'Everyone can see this information.',
                 description_node.get('text'));
             var old_func = this._shim_privacy_banner();
-            var hide_flag = false;
-            var update_flag = false;
+            var flag = false;
             Y.on('test:banner:show', function() {
-                hide_flag = true;
-            });
-            Y.on('test:banner:update', function() {
-                update_flag = true;
+                flag = true;
             });
 
             ns.information_type_save_success('Private');
             var body = Y.one('body');
             Y.Assert.isTrue(body.hasClass('private'));
-            Y.Assert.isTrue(hide_flag);
-            Y.Assert.isTrue(update_flag);
+            Y.Assert.isTrue(flag);
             Y.Assert.areEqual('Private', description_node.get('text'));
             this._unshim_privacy_banner(old_func);
         },


Follow ups