Merge lp://staging/~sinzui/launchpad/css-ui-0 into lp://staging/launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 12097
Proposed branch: lp://staging/~sinzui/launchpad/css-ui-0
Merge into: lp://staging/launchpad
Diff against target: 560 lines (+149/-117)
16 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+2/-2)
lib/canonical/launchpad/icing/style.css (+0/-1)
lib/canonical/launchpad/offline-maintenance-haproxy.html (+42/-32)
lib/canonical/launchpad/offline-maintenance.html (+11/-1)
lib/canonical/launchpad/offline-staging-code-update.html (+11/-1)
lib/canonical/launchpad/offline-staging-db-update.html (+11/-1)
lib/canonical/launchpad/offline-unplanned-haproxy.html (+42/-32)
lib/canonical/launchpad/offline-unplanned.html (+11/-1)
lib/canonical/launchpad/webapp/interfaces.py (+5/-13)
lib/canonical/launchpad/webapp/login.py (+2/-2)
lib/canonical/launchpad/webapp/notifications.py (+3/-12)
lib/lp/app/browser/tests/test_launchpad.py (+1/-1)
lib/lp/app/stories/basics/xx-notifications.txt (+2/-8)
lib/lp/app/templates/base-layout-macros.pt (+0/-4)
lib/lp/blueprints/browser/tests/test_specification.py (+3/-3)
lib/lp/registry/browser/person.py (+3/-3)
To merge this branch: bzr merge lp://staging/~sinzui/launchpad/css-ui-0
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) code Approve
Review via email: mp+43936@code.staging.launchpad.net

Description of the change

Update browser notices and offline pages.

    Launchpad bug:
        https://bugs.launchpad.net/bugs/36287
        https://bugs.launchpad.net/bugs/253558
        https://bugs.launchpad.net/bugs/330035
    Pre-implementation: no one
    Test command: ./bin/test -vv -t notifications -t test_launchpad

Bug #36287 [NOTICE and INFO logging levels should be merged]
    NOTICE and INFO messages are shown identically. NOTICE seems to be
    custom fluff and should be removed.

Bug #253558 [New message styling obscures useful content]
     the message class styles obscure page content in multiple locations.

Bug #330035 ["Please try again" page is crooked]
    "Please try again" page <https://launchpad.net/offline.html>, the heading
    is correctly horizontally centered with respect to the whole viewport; but
    when the browser window is wider than 60em, the body text is way off to
    the left.

--------------------------------------------------------------------

RULES

Bug #36287 [NOTICE and INFO logging levels should be merged]
    * Remove NOTICE. Update the few callsite that use it to use INFO instead.

Bug #253558 [New message styling obscures useful content]
    * Add a top margin of 1em to clear the previous content. Use em units
      for margin and padding to keep the distance proportional to the font.

Bug #330035 ["Please try again" page is crooked]
    * The offline css needs a margin rule.
    * Several of the offline pages are trying to load the mast css file
      which cannot be guaranteed to be served. Inline the font and offline
      rules to ensure all pages are centered with the correct font.
    * Remove the unused .offline style from the style sheet.

QA

Bug #36287 [NOTICE and INFO logging levels should be merged]
    * Mark a blueprint as started.
    * Verify an info notice is shown. (This will look identical to
      product because the template macro converted NOTICE to INFO)

Bug #253558 [New message styling obscures useful content]
    * Mark a blueprint as started.
    * Verify the info icon is below the registration line.

Bug #330035 ["Please try again" page is crooked]
    * Not QAable while the server is up. The html file in the tree can
      be looked at with a browser without a running server.

LINT

    lib/canonical/launchpad/offline-maintenance-haproxy.html
    lib/canonical/launchpad/offline-maintenance.html
    lib/canonical/launchpad/offline-staging-code-update.html
    lib/canonical/launchpad/offline-staging-db-update.html
    lib/canonical/launchpad/offline-unplanned-haproxy.html
    lib/canonical/launchpad/offline-unplanned.html
    lib/canonical/launchpad/browser/tests/test_launchpad.py
    lib/canonical/launchpad/icing/style-3-0.css.in
    lib/canonical/launchpad/icing/style.css
    lib/canonical/launchpad/webapp/interfaces.py
    lib/canonical/launchpad/webapp/login.py
    lib/canonical/launchpad/webapp/notifications.py
    lib/lp/app/stories/basics/xx-notifications.txt
    lib/lp/app/templates/base-layout-macros.pt
    lib/lp/blueprints/browser/tests/test_specification.py
    lib/lp/registry/browser/person.py

^ There is a lot of lint in these files. I can fix this after the review.

IMPLEMENTATION

Bug #36287 [NOTICE and INFO logging levels should be merged]
    Removed NOTICE and and its tests. Updated the account and spec uses
    notices to use INFO.
    lib/canonical/launchpad/browser/tests/test_launchpad.py
    lib/canonical/launchpad/webapp/interfaces.py
    lib/canonical/launchpad/webapp/login.py
    lib/canonical/launchpad/webapp/notifications.py
    lib/lp/app/templates/base-layout-macros.pt
    lib/lp/blueprints/browser/tests/test_specification.py
    lib/lp/registry/browser/person.py
    lib/lp/app/stories/basics/xx-notifications.txt

Bug #253558 [New message styling obscures useful content]
    Added 1em to the top margin and updated the padding to be in em units.
    lib/canonical/launchpad/icing/style-3-0.css.in

Bug #330035 ["Please try again" page is crooked]
    Inlined the CSS rules for the pages and removed the rule that was never
    loaded.
    lib/canonical/launchpad/offline-maintenance-haproxy.html
    lib/canonical/launchpad/offline-maintenance.html
    lib/canonical/launchpad/offline-staging-code-update.html
    lib/canonical/launchpad/offline-staging-db-update.html
    lib/canonical/launchpad/offline-unplanned-haproxy.html
    lib/canonical/launchpad/offline-unplanned.html
    lib/canonical/launchpad/icing/style.css

To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (3.4 KiB)

Hi Curtis,

This branch looks good. I just have some minor comments.

-Edwin

>=== modified file 'lib/canonical/launchpad/offline-maintenance-haproxy.html'
>--- lib/canonical/launchpad/offline-maintenance-haproxy.html 2010-04-01 13:43:01 +0000
>+++ lib/canonical/launchpad/offline-maintenance-haproxy.html 2010-12-16 18:25:39 +0000
>@@ -6,7 +6,17 @@
> <head>
> <title>Launchpad is offline for maintenance</title>
> <style type="text/css" media="screen, print">
>- .offline{text-align:center;margin:2em 0}
>+ html, body {
>+ font-family: UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif;
>+ }
>+ .offline {
>+ text-align: center;
>+ max-width: 60em;
>+ }
>+ .offline > * {
>+ margin-left: auto;
>+ margin-right: auto;
>+ }
> </style>
> </head>
> <body>

This file has CR/LF. How did that happen?

>=== modified file 'lib/canonical/launchpad/offline-unplanned-haproxy.html'
>--- lib/canonical/launchpad/offline-unplanned-haproxy.html 2010-03-02 10:42:06 +0000
>+++ lib/canonical/launchpad/offline-unplanned-haproxy.html 2010-12-16 18:25:39 +0000
>@@ -6,7 +6,17 @@
> <head>
> <title>Please try again</title>
> <style type="text/css" media="screen, print">
>- .offline{text-align:center;margin:2em 0}
>+ html, body {
>+ font-family: UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif;
>+ }
>+ .offline {
>+ text-align: center;
>+ max-width: 60em;
>+ }
>+ .offline > * {
>+ margin-left: auto;
>+ margin-right: auto;
>+ }
> </style>
> </head>
> <body>

CR/LF again.

>=== modified file 'lib/canonical/launchpad/webapp/interfaces.py'
>--- lib/canonical/launchpad/webapp/interfaces.py 2010-11-02 19:55:24 +0000
>+++ lib/canonical/launchpad/webapp/interfaces.py 2010-12-16 18:25:39 +0000
>@@ -568,15 +568,12 @@
> """Matches the standard logging levels, with the addition of notice
> (which we should probably add to our log levels as well)
> """

The above docstring should be updated.

>- # XXX mpt 2006-03-22 bugs=36287:
>- # NOTICE and INFO should be merged.
> DEBUG = logging.DEBUG # A debugging message
> INFO = logging.INFO # simple confirmation of a change
>- NOTICE = logging.INFO + 5 # action had effects you might not have intended
> WARNING = logging.WARNING # action will not be successful unless you ...
> ERROR = logging.ERROR # the previous action did not succeed, and why
>
>- ALL_LEVELS = (DEBUG, INFO, NOTICE, WARNING, ERROR)
>+ ALL_LEVELS = (DEBUG, INFO, WARNING, ERROR)
>
>
> class INotification(Interface):
>=== modified file 'lib/canonical/launchpad/webapp/notifications.py'
>--- lib/canonical/launchpad/webapp/notifications.py 2010-08-20 20:31:18 +0000
>+++ lib/canonical/launchpad/webapp/notifications.py 2010-12-16 18:25:39 +0000
>@@ -334,8 +327,6 @@
> structured('Debug notification <b>%d</b>' % count))
> response.addInfoNotification(
> structured('Info notification <b>%d</b>' % count))
>- response.addNoticeNotificat...

Read more...

review: Approve (code)
Revision history for this message
Curtis Hovey (sinzui) wrote :

On Thu, 2010-12-16 at 22:15 +0000, Edwin Grubbs wrote:
> Review: Approve code
> Hi Curtis,
>
> This branch looks good. I just have some minor comments.
>
> -Edwin
>
> >=== modified file 'lib/canonical/launchpad/offline-maintenance-haproxy.html'
> >--- lib/canonical/launchpad/offline-maintenance-haproxy.html 2010-04-01 13:43:01 +0000
> >+++ lib/canonical/launchpad/offline-maintenance-haproxy.html 2010-12-16 18:25:39 +0000
> >@@ -6,7 +6,17 @@
> > <head>
> > <title>Launchpad is offline for maintenance</title>
> > <style type="text/css" media="screen, print">
> >- .offline{text-align:center;margin:2em 0}
> >+ html, body {
> >+ font-family: UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif;
> >+ }
> >+ .offline {
> >+ text-align: center;
> >+ max-width: 60em;
> >+ }
> >+ .offline > * {
> >+ margin-left: auto;
> >+ margin-right: auto;
> >+ }
> > </style>
> > </head>
> > <body>
>
>
> This file has CR/LF. How did that happen?

I think they have always been like that. Both haproxy page may have been
cargo culted from somewhere else.

--
__Curtis C. Hovey_________
http://launchpad.net/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.