Merge lp:~bac/launchpad/bug-419742 into lp:launchpad

Proposed by Brad Crittenden
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~bac/launchpad/bug-419742
Merge into: lp:launchpad
Diff against target: 242 lines
4 files modified
lib/canonical/launchpad/icing/style-3-0.css (+4/-0)
lib/lp/registry/stories/product/xx-product-files.txt (+11/-10)
lib/lp/registry/templates/product-files.pt (+57/-32)
lib/lp/registry/templates/productrelease-portlet-data.pt (+6/-8)
To merge this branch: bzr merge lp:~bac/launchpad/bug-419742
Reviewer Review Type Date Requested Status
Martin Albisetti (community) ui Approve
Paul Hummer (community) Approve
Review via email: mp+13807@code.launchpad.net

Commit message

Update the +download page providing more information about releases and re-arranging to better present existing information.

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

= Summary =

Bug 419742 suggested new information to present on the $product/+download page and
ways to make it more presentable.

== Proposed fix ==

Re-arrange lots of the data:
* Remove the extra information about verification and just present the help link.
* Move the release date into the header.
* Put 'release notes' and 'changelog' into a collapsible field called 'Release
information'.
* Add '(+) Add download file' under the release table.
* Keep the link at the end for each release but add the series name to it for
distinguishing it.[1]
* Make each release a portlet.[2]

[1] beuno had asked that this entire line be removed. I restored it because if a
release has no download files there is no place to add the '(+) Add download file'
menu link. Releases with no files are just skipped in the body of this page. So it
made sense to bring it back and just list all of the releases in one place. We often
get complaints from users that it is too hard to figure out where to go to add
download files I was hesitant to remove one place they may have grown used to using.

[2] I have made each use the 'top-portlet' class and conditionally insert the border.
 This requires less code reorganization than conditionally choosing a class. TAL is
really bad when you need to select attributes conditionally, basically you have to
violate DRY all over the place.

== Pre-implementation notes ==

Lots of discussion with beuno. Unfortunately I have not been able to have a
discussion with mbp but hope to early next week to see if he still has any issues.

== Implementation details ==

As above.

== Tests ==

bin/test -vv -t xx-product-files.txt

== Demo and Q/A ==

https://launchpad.dev/firefox/+download

Also go to any other project and add some releases and download files.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/registry/templates/product-files.pt
  lib/canonical/launchpad/icing/style-3-0.css
  lib/lp/registry/stories/product/xx-product-files.txt
  lib/lp/registry/templates/productrelease-portlet-data.pt

Revision history for this message
Brad Crittenden (bac) wrote :

Screenshots:
http://people.canonical.com/~bac/download-bazaar.png

Shows a project with a couple of releases within a single series.

http://people.canonical.com/~bac/download-firefox.png

Shows a project with multiple series and releases. Some releases have no download files and are skipped.

Revision history for this message
Paul Hummer (rockstar) :
review: Approve
Revision history for this message
Martin Albisetti (beuno) :
review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-10-20 16:45:23 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-10-22 20:20:27 +0000
@@ -233,6 +233,10 @@
233.footer .lp-branding {233.footer .lp-branding {
234 float: left;234 float: left;
235 }235 }
236.portlet-border {
237 border-top: 1px solid #EBEBEB;
238 padding: 1em 0;
239 }
236.portlet, .aside {240.portlet, .aside {
237 clear: both;241 clear: both;
238 border-top: 1px solid #EBEBEB;242 border-top: 1px solid #EBEBEB;
239243
=== modified file 'lib/lp/registry/stories/product/xx-product-files.txt'
--- lib/lp/registry/stories/product/xx-product-files.txt 2009-09-18 15:24:30 +0000
+++ lib/lp/registry/stories/product/xx-product-files.txt 2009-10-22 20:20:27 +0000
@@ -33,11 +33,11 @@
33 >>> anon_browser.getLink('All downloads').click()33 >>> anon_browser.getLink('All downloads').click()
34 >>> print extract_text(34 >>> print extract_text(
35 ... find_tag_by_id(anon_browser.contents, 'project-downloads'))35 ... find_tag_by_id(anon_browser.contents, 'project-downloads'))
36 0.9.2 (One (secure) Tree Hill) release, from the trunk series.36 0.9.2 (One (secure) Tree Hill) release from the trunk series released 2004-10-15
37 Release information
37 Release notes:38 Release notes:
38 Security fixes39 Security fixes
39 * 250180 - [Windows] Disallow access to insecure shell: protocol.40 * 250180 - [Windows] Disallow access to insecure shell: protocol.
40 Released: 2004-10-15
41 File Description Downloads41 File Description Downloads
42 firefox-0.9.2.orig.tar.gz (md5) -42 firefox-0.9.2.orig.tar.gz (md5) -
4343
@@ -99,7 +99,8 @@
99 Download project files99 Download project files
100 Mozilla Thunderbird...100 Mozilla Thunderbird...
101 No download files exist for this project...101 No download files exist for this project...
102 Add download file for release: 0.8102 Add download file to the trunk series for release: 0.8
103
103 >>> tbird_owner.getControl('Delete Files')104 >>> tbird_owner.getControl('Delete Files')
104 Traceback (most recent call last):105 Traceback (most recent call last):
105 ...106 ...
@@ -114,8 +115,8 @@
114 >>> firefox_owner.open('http://launchpad.dev/firefox/+download')115 >>> firefox_owner.open('http://launchpad.dev/firefox/+download')
115 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):116 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):
116 ... print extract_text(tag)117 ... print extract_text(tag)
117 Add download file for release: 0.9.2, 0.9.1, 0.9118 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9
118 Add download file for release: 1.0.0119 Add download file to the 1.0 series for release: 1.0.0
119120
120If a project has a series with no releases associated with it, that121If a project has a series with no releases associated with it, that
121series should not show up in the list.122series should not show up in the list.
@@ -129,8 +130,8 @@
129 >>> firefox_owner.open('http://launchpad.dev/firefox/+download')130 >>> firefox_owner.open('http://launchpad.dev/firefox/+download')
130 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):131 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):
131 ... print extract_text(tag)132 ... print extract_text(tag)
132 Add download file for release: 0.9.2, 0.9.1, 0.9133 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9
133 Add download file for release: 1.0.0134 Add download file to the 1.0 series for release: 1.0.0
134135
135If a release is added to the new series the series will appear in136If a release is added to the new series the series will appear in
136the list.137the list.
@@ -150,9 +151,9 @@
150 >>> firefox_owner.open('http://launchpad.dev/firefox/+download')151 >>> firefox_owner.open('http://launchpad.dev/firefox/+download')
151 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):152 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):
152 ... print extract_text(tag)153 ... print extract_text(tag)
153 Add download file for release: 0.9.2, 0.9.1, 0.9154 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9
154 Add download file for release: 3.14159155 Add download file to the 3.0 series for release: 3.14159
155 Add download file for release: 1.0.0156 Add download file to the 1.0 series for release: 1.0.0
156157
157158
158== Adding new files ==159== Adding new files ==
159160
=== modified file 'lib/lp/registry/templates/product-files.pt'
--- lib/lp/registry/templates/product-files.pt 2009-08-31 23:58:26 +0000
+++ lib/lp/registry/templates/product-files.pt 2009-10-22 20:20:27 +0000
@@ -17,13 +17,9 @@
17 tal:define="has_edit context/required:launchpad.Edit">17 tal:define="has_edit context/required:launchpad.Edit">
1818
19 <p tal:condition="view/has_download_files">19 <p tal:condition="view/has_download_files">
20 After you've downloaded a file, you can verify its authenticity using20 <a
21 <tal:hasdownloadfiles condition="view/any_download_files_with_signatures">
22 either </tal:hasdownloadfiles>its MD5 sum
23 <tal:hasdownloadfiles condition="view/any_download_files_with_signatures">
24 or signature</tal:hasdownloadfiles>. (<a
25 href="/+help/verify-downloads.html" target="help">How do I verify a21 href="/+help/verify-downloads.html" target="help">How do I verify a
26 download?</a>)22 download?</a>
27 </p>23 </p>
28 <br />24 <br />
2925
@@ -45,37 +41,52 @@
45 tal:repeat="series view/sorted_series_list"41 tal:repeat="series view/sorted_series_list"
46 tal:attributes="id string:series_${series/name}">42 tal:attributes="id string:series_${series/name}">
4743
44 <div tal:condition="not: repeat/series/start" class="portlet-border" />
45
48 <tal:seriesfilesexist condition="series/has_release_files">46 <tal:seriesfilesexist condition="series/has_release_files">
49 <tal:releases repeat="release series/releases">47 <tal:releases repeat="release series/releases">
50 <div tal:condition="release/files">48 <tal:releasefilesexist condition="release/files">
51 <h2 style="font-size: 1.2em">49 <div tal:condition="not: repeat/release/start" class="portlet-border" />
50 <div tal:condition="release/files" class="top-portlet">
51 <h2 style="font-size: 1.2em; float:left;">
52 <a tal:attributes="href release/fmt:url">52 <a tal:attributes="href release/fmt:url">
53 <span tal:replace="release/name_with_codename" /> release</a>,53 <span tal:replace="release/name_with_codename" /> release</a>
54 from the54 from the
55 <a tal:attributes="href series/fmt:url"55 <a tal:attributes="href series/fmt:url"
56 tal:content="series/name">name</a> series.56 tal:content="series/name">name</a> series released
57 <span
58 tal:attributes="title release/datereleased/fmt:datetime"
59 tal:content="release/datereleased/fmt:approximatedate" />
57 </h2>60 </h2>
5861
59 <div id="release_notes">62 <div style="clear:both;" />
60 <h3>Release notes:</h3>63
61 <tal:notes condition="release/release_notes"64 <div id="release_information"
62 define="notes release/release_notes/fmt:shorten/800">65 tal:condition="python: release.release_notes or release.changelog">
63 <div tal:content="structure notes/fmt:text-to-html">66
64 Release notes67 <fieldset class="collapsible collapsed" style="padding: 0px;">
65 </div>68 <legend>Release information</legend>
66 </tal:notes>69
67 <div tal:condition="not: release/release_notes">70 <div tal:condition="release/release_notes">
68 <em>This release does not have release notes.</em>71 <strong>Release notes:</strong>
69 </div>72 <div id="release_notes" style="margin-bottom: 0px;"
70 <div>73 tal:define="notes release/release_notes/fmt:shorten/800"
71 <strong>Released:</strong>74 tal:content="structure notes/fmt:text-to-html">
72 <span75 ProductRelease.release_notes
73 tal:attributes="title release/datereleased/fmt:datetime"76 </div>
74 tal:content="release/datereleased/fmt:approximatedate" />77 </div>
75 </div>78
76 </div>79 <div tal:condition="release/changelog">
7780 <strong>Changelog:</strong>
78 <table class="listing">81 <div id="changelog" style="margin-bottom: 0px;"
82 tal:content="structure release/changelog/fmt:obfuscate-email/fmt:text-to-html">
83 ProductRelease.changelog.
84 </div>
85 </div>
86 </fieldset>
87 </div> <!-- release information -->
88
89 <table class="listing" style="margin-top: 1em;">
79 <thead>90 <thead>
80 <tr>91 <tr>
81 <th width="35%">File</th>92 <th width="35%">File</th>
@@ -105,6 +116,17 @@
105 </tfoot>116 </tfoot>
106 </table>117 </table>
107 </div>118 </div>
119 <div tal:condition="not: release/total_downloads"
120 style="margin-top: 2em;">
121 </div>
122
123 <div style="float:right"
124 tal:define="link release/menu:context/add_file"
125 tal:condition="link/enabled">
126 <a tal:replace="structure link/fmt:link" />
127 </div>
128 <div style="clear:both" />
129 </tal:releasefilesexist>
108 </tal:releases>130 </tal:releases>
109 <br />131 <br />
110132
@@ -112,7 +134,9 @@
112134
113 <p tal:condition="has_edit" class="add-files">135 <p tal:condition="has_edit" class="add-files">
114 <tal:releases condition="series/releases">136 <tal:releases condition="series/releases">
115 Add download file for release:137 Add download file to the
138 <a tal:attributes="href series/fmt:url"
139 tal:content="series/name">name</a> series for release:
116 <tal:release repeat="release series/releases">140 <tal:release repeat="release series/releases">
117 <a tal:attributes="href string:${series/name}/${release/version}/+adddownloadfile"141 <a tal:attributes="href string:${series/name}/${release/version}/+adddownloadfile"
118 tal:content="release/version"142 tal:content="release/version"
@@ -130,4 +154,5 @@
130 </form>154 </form>
131</div>155</div>
132</body>156</body>
133</html>157</html
158>
134159
=== modified file 'lib/lp/registry/templates/productrelease-portlet-data.pt'
--- lib/lp/registry/templates/productrelease-portlet-data.pt 2009-09-11 01:25:30 +0000
+++ lib/lp/registry/templates/productrelease-portlet-data.pt 2009-10-22 20:20:27 +0000
@@ -67,10 +67,9 @@
67 </div>67 </div>
6868
69 <div class="top-portlet">69 <div class="top-portlet">
70 <h2>70 <h2 style="float:left">Release notes &nbsp;</h2>
71 Release notes71 <a tal:replace="structure view/release/menu:context/edit/fmt:icon" />
72 &nbsp; <a tal:replace="structure view/release/menu:context/edit/fmt:icon" />72 <div style="clear:both" />
73 </h2>
7473
75 <div id="release-notes"74 <div id="release-notes"
76 tal:content="structure view/release/release_notes/fmt:text-to-html"75 tal:content="structure view/release/release_notes/fmt:text-to-html"
@@ -82,10 +81,9 @@
82 <em>This release does not have release notes.</em>81 <em>This release does not have release notes.</em>
83 </p>82 </p>
8483
85 <h2>84 <h2 style="float:left">Changelog &nbsp;</h2>
86 Changelog85 <a tal:replace="structure view/release/menu:context/edit/fmt:icon" />
87 &nbsp; <a tal:replace="structure view/release/menu:context/edit/fmt:icon" />86 <div style="clear:both" />
88 </h2>
8987
90 <fieldset class="collapsible collapsed" style="padding: 0px;"88 <fieldset class="collapsible collapsed" style="padding: 0px;"
91 tal:condition="view/release/changelog">89 tal:condition="view/release/changelog">