Merge lp:~bac/launchpad/bug-499351-batching-dls into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Curtis Hovey on 2010-01-15 |
| Approved revision: | not available |
| Merged at revision: | not available |
| Proposed branch: | lp:~bac/launchpad/bug-499351-batching-dls |
| Merge into: | lp:launchpad |
| Diff against target: |
617 lines (+271/-133) 12 files modified
configs/development/launchpad-lazr.conf (+1/-0) lib/canonical/config/schema-lazr.conf (+4/-0) lib/canonical/launchpad/icing/style.css (+5/-6) lib/canonical/launchpad/templates/batchnavigator-navigation-links.pt (+3/-2) lib/canonical/launchpad/webapp/batching.py (+4/-0) lib/lp/registry/browser/product.py (+34/-2) lib/lp/registry/browser/tests/product-files-views.txt (+70/-0) lib/lp/registry/browser/tests/test_views.py (+1/-0) lib/lp/registry/stories/product/xx-product-files.txt (+2/-1) lib/lp/registry/templates/product-files.pt (+129/-114) lib/lp/registry/templates/productreleasefile-macros.pt (+1/-1) lib/lp/testing/factory.py (+17/-7) |
| To merge this branch: | bzr merge lp:~bac/launchpad/bug-499351-batching-dls |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | ui | 2010-01-15 | Approve on 2010-01-20 |
| Martin Albisetti | ui | 2010-01-19 | Pending |
|
Review via email:
|
|||
Commit Message
Add batching to +download page.
| Brad Crittenden (bac) wrote : | # |
| Curtis Hovey (sinzui) wrote : | # |
Thanks for doing this. As I noted on IRC, the casting of a list to a list on line 87 of the diff looks redundant. You can fix the code before landing this if it is redundant.
| Brad Crittenden (bac) wrote : | # |
Requesting a UI review. Screenshots are attached to the bug.
| Brad Crittenden (bac) wrote : | # |
Preparing for the UI review I discovered I neglected to put the batch navigator links into the page template. I've done that and updated one of the factories to allow a release to be re-used.
| Curtis Hovey (sinzui) wrote : | # |
Hi brad.
Your diff exposes an issue in the markup. The template is using:
<h2 style="font-size: 1.2em;">
Which is inconsistent in browsers. We should either remove the style attribute or change the unit to percentage (116, 123.1):
<h2 style="font-size: 116%;">
| Curtis Hovey (sinzui) wrote : | # |
Hi Brad.
I am looking at the UI, (lp does not let me vote twice). There are some improvement we can make.
1 - 4 of 12 results => 1 - 4 of 12 releases
You can doo this subclassing the batch navigator or by setting after __init__:
batch = BatchNavigator(
batch = batch.setHeadin
My eye gets lost scanning from the batch summary to the navigation. This is not a problem on other pages because the table border creates horizontal line for my eye to follow. I am not sure what to do in this case. This is also a reason I was aprehensive about using a batch navigator on with this layout. +search solved the problem by setting the background-color of the table and a lower/upper border to create a bar (see style.css: upper-batch-nav, lower-batch-nav). I think we could modify batchnavigator-
/me sees there is extra white space between the files table and the (+) Add download file when the page is viewed in webkit :(
| Brad Crittenden (bac) wrote : | # |
Comments from Martin on IRC:
bueno bac, I think sinzui is right on the mark with the problem 16:45
bac beuno: ok 16:45
beuno bac, one way of fixing this could be 16:46
beuno to isntead of presenting it as a navigation 16:46
beuno have an "See older releases >" link
| Brad Crittenden (bac) wrote : | # |
Thanks for the suggestions Curtis and the help with the css.
The diff is at http://
| Curtis Hovey (sinzui) wrote : | # |
Thanks for adding rules for consistent batch navigator presenations.

= Summary =
For products with a large number of series or releases the +download page becomes too
big, loads slowly, and sometimes times out. There is too much information to be useful.
== Proposed fix ==
Batch the releases shown.
== Pre-implementation notes ==
Talked with Curtis.
== Implementation details ==
Create a class with a tuple of (series, release) and batch those.
For product administrators the links to all series and releases are maintained at the
bottom of each page.
== Tests ==
bin/test -vv -t product- files-views. txt -t xx-product- files.txt
== Demo and Q/A ==
Look at a big project like https:/ /edge.launchpad .net/bzr/ +download and see that the
batching works right.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /config/ schema- lazr.conf registry/ browser/ tests/product- files-views. txt registry/ templates/ product- files.pt registry/ templates/ productreleasef ile-macros. pt registry/ browser/ product. py testing/ factory. py registry/ stories/ product/ xx-product- files.txt registry/ browser/ tests/test_ views.py development/ launchpad- lazr.conf
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
configs/
== Pylint notices ==
lib/lp/ registry/ browser/ product. py
54: [F0401] Unable to import 'lazr.delegates' (No module named delegates)
lib/lp/ testing/ factory. py MIMEMultipart' (No module named MIMEMultipart)
17: [F0401] Unable to import 'email.Encoders' (No module named Encoders)
18: [F0401] Unable to import 'email.Utils' (No module named Utils)
19: [F0401] Unable to import 'email.Message' (No module named Message)
20: [F0401] Unable to import 'email.MIMEText' (No module named MIMEText)
21: [F0401] Unable to import 'email.