← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~huwshimi/launchpad/privacy-notification-firefox-753423 into lp:launchpad

 

Huw Wilkins has proposed merging lp:~huwshimi/launchpad/privacy-notification-firefox-753423 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #753423 in Launchpad itself: "Privacy notification overlay broken in Firefox"
  https://bugs.launchpad.net/launchpad/+bug/753423

For more details, see:
https://code.launchpad.net/~huwshimi/launchpad/privacy-notification-firefox-753423/+merge/56872

Privacy notifications were broken in Firefox due to YUI crashing when trying to animate certain CSS properties in Firefox. I have rewritten how it goes about creating a space at the top of the page to use working parts of YUI.
-- 
https://code.launchpad.net/~huwshimi/launchpad/privacy-notification-firefox-753423/+merge/56872
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~huwshimi/launchpad/privacy-notification-firefox-753423 into lp:launchpad.
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css	2011-03-30 10:47:41 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css	2011-04-08 04:18:32 +0000
@@ -1932,13 +1932,6 @@
 /* ====================
    Global notifications
 */
-/* Move the content down so the notification banner doesn't hide any content. */
-body.global-notification-visible {
-    padding-top: 40px;
-    }
-body.global-notification-visible .login-logout {
-    top: 45px;
-    }
 .global-notification {
     position: fixed;
     z-index: 10;

=== modified file 'lib/lp/bugs/javascript/bugtask_index.js'
--- lib/lp/bugs/javascript/bugtask_index.js	2011-03-22 05:56:34 +0000
+++ lib/lp/bugs/javascript/bugtask_index.js	2011-04-08 04:18:32 +0000
@@ -440,9 +440,12 @@
          this is because we have no way to use feature flags in
          css directly. This should be remove if the feature
          is accepted. */
-        Y.one('body').addClass('feature-flag-bugs-private-notification-enabled');
-        /* Set the visible flag so that the content moves down. */
-        Y.one('body').addClass('global-notification-visible');
+        var body_node = Y.one('body');
+        body_node.addClass('feature-flag-bugs-private-notification-enabled');
+        Y.one('.login-logout').setStyle('top', '45px');
+        var spacer_node = Y.Node.create('<div id="global-notification-spacer"/>');
+        spacer_node.setStyle('height', '40px');
+        body_node.prepend(spacer_node);
         
         if (Y.one('.global-notification').hasClass('hidden')) {
             Y.one('.global-notification').addClass('transparent');
@@ -452,9 +455,9 @@
                 to: {opacity: 1},
                 duration: 0.3
             });
-            var body_space = new Y.Anim({
-                node: 'body',
-                to: {'padding-top': '40px'},
+            var spacer_height = new Y.Anim({
+                node: '#global-notification-spacer',
+                to: {height: '40px'},
                 duration: 0.2,
                 easing: Y.Easing.easeOut
             });
@@ -466,7 +469,7 @@
             });
             
             fade_in.run();
-            body_space.run();
+            spacer_height.run();
             login_space.run();
         }
         
@@ -491,9 +494,9 @@
                 to: {opacity: 0},
                 duration: 0.3
             });
-            var body_space = new Y.Anim({
-                node: 'body',
-                to: {'padding-top': 0},
+            var spacer_height = new Y.Anim({
+                node: '#global-notification-spacer',
+                to: {height: 0},
                 duration: 0.2,
                 easing: Y.Easing.easeOut
             });
@@ -506,12 +509,9 @@
             fade_out.on('end', function() {
                 fade_out.get('node').addClass('hidden');
             });
-            body_space.on('end', function() {
-                Y.one('body').removeClass('global-notification-visible');
-            });
             
             fade_out.run();
-            body_space.run();
+            spacer_height.run();
             login_space.run();
             
             if (highlight_portlet) {