← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/remove-privacy-ff into lp:launchpad

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/remove-privacy-ff into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #855682 in Launchpad itself: "Remove bugs.private_notification.enabled flag"
  https://bugs.launchpad.net/launchpad/+bug/855682

For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/remove-privacy-ff/+merge/76492

Summary
=======
We're ready to remove the feature flag guarding the new privacy ribbon. This does that.

Preimp
======
Spoke with Curtis Hovey

Implementation
==============
* Killed the flag
* There were two templates using the flag; bugtask_index and base-layout-macros. Removed the guard on base layout and completely removed the section in bugtask_index since it set another variable used in bugtask_index.js
* Updated bugtask_index.js to not check the enabled var set in bugtask_index.pt

QA
==
Confirm that the privacy ribbon shows without any flags set in feature-rules.
-- 
https://code.launchpad.net/~jcsackett/launchpad/remove-privacy-ff/+merge/76492
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/remove-privacy-ff into lp:launchpad.
=== modified file 'lib/lp/app/templates/base-layout-macros.pt'
--- lib/lp/app/templates/base-layout-macros.pt	2011-09-08 05:14:28 +0000
+++ lib/lp/app/templates/base-layout-macros.pt	2011-09-21 22:14:19 +0000
@@ -106,7 +106,6 @@
 
   <metal:load-lavascript use-macro="context/@@+base-layout-macros/load-javascript" />
 
-    <tal:if condition="request/features/bugs.private_notification.enabled">
     <script type="text/javascript">
       LPS.use('base', 'node', 'oop', 'event', 'lp.bugs.bugtask_index',
                 'lp.bugs.subscribers',
@@ -120,7 +119,6 @@
           });
       });
     </script>
-    </tal:if>
 
   <script id="base-layout-load-scripts" type="text/javascript">
     LPS.use('node', 'event-delegate', 'lp', 'lp.app.links', 'lp.app.longpoll', function(Y) {

=== modified file 'lib/lp/bugs/javascript/bugtask_index.js'
--- lib/lp/bugs/javascript/bugtask_index.js	2011-09-16 00:11:16 +0000
+++ lib/lp/bugs/javascript/bugtask_index.js	2011-09-21 22:14:19 +0000
@@ -404,17 +404,13 @@
                     privacy_text.set(
                         'innerHTML',
                         'This report is <strong>private</strong> ');
-                    if (privacy_notification_enabled) {
-                        Y.lp.app.privacy.display_privacy_notification();
-                    }
+                    Y.lp.app.privacy.display_privacy_notification();
                 } else {
                     Y.one('body').replaceClass('private', 'public');
                     privacy_div.replaceClass('private', 'public');
                     privacy_text.set(
                         'innerHTML', 'This report is public ');
-                    if (privacy_notification_enabled) {
-                        Y.lp.app.privacy.hide_privacy_notification();
-                    }
+                    Y.lp.app.privacy.hide_privacy_notification();
                 }
                 privacy_text.appendChild(privacy_link);
                 privacy_text.appendChild(privacy_spinner);

=== modified file 'lib/lp/bugs/templates/bugtask-index.pt'
--- lib/lp/bugs/templates/bugtask-index.pt	2011-09-10 01:11:45 +0000
+++ lib/lp/bugs/templates/bugtask-index.pt	2011-09-21 22:14:19 +0000
@@ -34,17 +34,6 @@
             });
          });
       </script>
-      <tal:if condition="request/features/bugs.private_notification.enabled">
-      <script type="text/javascript">
-          // We need to set up some bugtask
-            var privacy_notification_enabled = true;
-      </script>
-      </tal:if>
-      <tal:if condition="not: request/features/bugs.private_notification.enabled">
-      <script type="text/javascript">
-            var privacy_notification_enabled = false;
-      </script>
-      </tal:if>
       <tal:if
         condition="request/features/bugs.batched_comment_loading.enabled">
       <script type="text/javascript">

=== modified file 'lib/lp/services/features/flags.py'
--- lib/lp/services/features/flags.py	2011-09-16 16:19:22 +0000
+++ lib/lp/services/features/flags.py	2011-09-21 22:14:19 +0000
@@ -104,10 +104,6 @@
      'boolean',
      'Shows the server-side page render time in the login widget.',
      ''),
-    ('bugs.private_notification.enabled',
-     'boolean',
-     'Changes the appearance of notifications on private bugs.',
-     ''),
     ('disclosure.dsp_picker.enabled',
      'boolean',
      'Enables the use of the new DistributionSourcePackage vocabulary for '