Merge lp:~salgado/launchpad/edge-redirect-bugs into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~salgado/launchpad/edge-redirect-bugs |
Merge into: | lp:launchpad |
Diff against target: |
228 lines (+59/-47) 7 files modified
lib/canonical/launchpad/doc/timeout.txt (+1/-1) lib/canonical/launchpad/pagetests/basics/demo-and-lpnet.txt (+7/-6) lib/canonical/launchpad/templates/launchpad-requestexpired.pt (+9/-20) lib/canonical/launchpad/templates/oops.pt (+24/-0) lib/canonical/launchpad/webapp/error.py (+3/-3) lib/lp/app/stories/basics/xx-beta-testers-redirection.txt (+7/-7) lib/lp/app/templates/base-layout-macros.pt (+8/-10) |
To merge this branch: | bzr merge lp:~salgado/launchpad/edge-redirect-bugs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | code | Approve | |
Review via email: mp+21054@code.launchpad.net |
Description of the change
This branch fixes bug 403863, bug 512295 and bug 528184.
I've changed lib/lp/
the enable/disable redirect link when is_edge is True.
In oops.pt I added a notification message (together with a button to
disable redirects) when we're on edge. Also had to include lp.js, for
the JS function that actually disables redirection (setBetaRedirect).
Need to do all this here because oops.pt doesn't use our main template.
And in launchpad-
hidden (display:none) div when it was seen on edge with a tal:condition
around that div. However, thanks to the change to base-layout-
above, the timeout page now has one link to disable redirection at the
bottom and one button for the same purpose at the top. I think we
should remove the notification and leave just the link at the bottom.
== Demo and Q/A ==
First, set is_edge to true on configs/
To see the new notification on the OOPS page you need to manually edit a
template so that it crashes when rendering and load a page that uses
that template. This will cause an OOPS and you should see the
notification.
To see it on the timeout page, set db_statement_
configs/
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files:
lib/canonical
lib/canonical
lib/canonical
lib/lp/
lib/canonical
lib/canonical
lib/lp/
Hi,
The "Disable edge redirect" message is only shown when is_edge is true
*and* site_message is set. The cover letter didn't mention that, but I
assume that's fine.
I have a few comments, but nothing terrible :)
Gavin.
> === modified file 'lib/canonical/ launchpad/ doc/timeout. txt' launchpad/ doc/timeout. txt 2008-05-17 02:36:00 +0000 launchpad/ doc/timeout. txt 2010-03-10 16:32:41 +0000 lazr.timeout import get_default_ timeout_ function launchpad. webapp. servers import ( default_ timeout) timeout_ function( ) timeout_ function( ) launchpad/ pagetests/ basics/ demo-and- lpnet.txt' launchpad/ pagetests/ basics/ demo-and- lpnet.txt 2010-02-09 17:25:13 +0000 launchpad/ pagetests/ basics/ demo-and- lpnet.txt 2010-03-10 16:32:41 +0000 "setBetaRedirec t(false) ")) /launchpad. net/bugs/ 160191). launchpad. dev/ubuntu') text(find_ tags_by_ class( "setBetaRedirec t(true) ")) pop('edge_ config_ data') launchpad/ templates/ launchpad- requestexpired. pt' launchpad/ templates/ launchpad- requestexpired. pt 2009-07-28 17:19:42 +0000 launchpad/ templates/ launchpad- requestexpired. pt 2010-03-10 16:32:41 +0000 slot="main" > exception" >Timeout error</h1> notice" style=" display: none" class=" informational message">
> --- lib/canonical/
> +++ lib/canonical/
> @@ -12,7 +12,7 @@
> >>> from canonical.
> >>> from canonical.
> ... set_launchpad_
> - >>> old_func = get_default_
> + >>> old_func = get_default_
>
> >>> from zope.app.appsetup import ProcessStarting
>
>
> === modified file 'lib/canonical/
> --- lib/canonical/
> +++ lib/canonical/
> @@ -103,16 +103,18 @@
> ... 'a', onclick=
> Disable edge redirect.
>
> -The disable-redirect link will not appear in the site_message when
> -browsed by non-beta users.
> +The disable-redirect link will also appear in the site_message when browsed by
> +non-beta/anonymous users. This is to reduce the annoyance when users are
> +logged into launchpad.net but haven't noticed yet that they need to log into
> +edge as well (https:/
>
> >>> browser.open('http://
> >>> print extract_
> ... browser.contents, 'sitemessage')[0])
> - This is a beta site.
> + This is a beta site. Disable edge redirect.
>
> -Similarly, once the redirection has been inhibited, the link changes to
> -enable redirects..
> +Once the redirection has been inhibited, the link changes to enable
> +redirects.
>
> # Workaround bug in mechanize where you cannot use the Cookie
> # header with the CookieJar
> @@ -135,7 +137,6 @@
> ... 'a', onclick=
> Enable edge redirect.
>
> -
> # Remove the specific site-message config data before continuing.
> >>> dummy = config.
>
>
> === modified file 'lib/canonical/
> --- lib/canonical/
> +++ lib/canonical/
> @@ -9,27 +9,16 @@
> <body>
> <div class="top-portlet" metal:fill-
> <h1 class="
> - <div
> - id="redirect_
> - <p>Our edge server has a lower timeout threshold than launchpad.net,
> - so we can catch those before they hit a wider audience.
> - As a member of the Launchpad Beta Testers team, you're more
> - likely to experience them. If this is blocking your work, you
> - can disable redirection.</p>
> - <...