Merge lp:~cprov/launchpad/bug-417159-build-ui-tweaks into lp:launchpad

Proposed by Celso Providelo
Status: Merged
Merged at revision: not available
Proposed branch: lp:~cprov/launchpad/bug-417159-build-ui-tweaks
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~cprov/launchpad/bug-417159-build-ui-tweaks
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+11703@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

= Summary =

This branch fixes 2 trivial UI bugs in Build:+index:

https://bugs.edge.launchpad.net/bugs/417159
https://bugs.edge.launchpad.net/bugs/416365

The first issues was fixes by moving the binary-packages and the binary-files sections to separate rows, it should mitigate the issue with long filenames.

The second issue is easier, we now include a label for the 'retry' action.

== Tests ==

./bin/test -vv -t stories.ppa -t stories.soyuz

== Demo and Q/A ==

https://launchpad.dev/~cprov/+archive/ppa/+build/27

https://launchpad.dev/~cprov/+archive/ppa/+build/26 (logged in as cprov or foo.bar)

= 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/soyuz/templates/build-index.pt
  lib/lp/soyuz/browser/build.py
  lib/lp/soyuz/stories/soyuz/xx-build-record.txt
  lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkquX/EACgkQ7KBXuXyZSjDqwgCfRhP+sYl6DP1a9uGsPvGJez+r
NwIAoKhO4EvLnlW3PQZmQ2AZvKF6YEhB
=xiy1
-----END PGP SIGNATURE-----

Revision history for this message
Aaron Bentley (abentley) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/browser/build.py'
2--- lib/lp/soyuz/browser/build.py 2009-08-18 17:52:41 +0000
3+++ lib/lp/soyuz/browser/build.py 2009-09-14 14:40:18 +0000
4@@ -106,7 +106,7 @@
5 @enabled_with_permission('launchpad.Edit')
6 def retry(self):
7 """Only enabled for build records that are active."""
8- text = 'Retry build'
9+ text = 'Retry this build'
10 return Link(
11 '+retry', text, icon='retry',
12 enabled=self.context.can_be_retried)
13
14=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt'
15--- lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2009-09-12 06:49:56 +0000
16+++ lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2009-09-14 14:40:18 +0000
17@@ -395,7 +395,7 @@
18 ... "http://launchpad.dev/~cprov/+archive/ppa/+packages")
19
20 >>> cprov_browser.getLink('i386').click()
21- >>> cprov_browser.getLink("Retry build").click()
22+ >>> cprov_browser.getLink("Retry this build").click()
23 >>> cprov_browser.getControl("Retry Build").click()
24
25 At this point anyone can also visualise that 'cdrkit' source is being
26
27=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
28--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2009-09-10 20:12:12 +0000
29+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2009-09-14 14:40:18 +0000
30@@ -207,19 +207,19 @@
31 >>> print extract_text(
32 ... find_tag_by_id(admin_browser.contents, 'status'))
33 Build status
34- Failed to upload Retry build on Bob The Builder
35+ Failed to upload on Bob The Builder Retry this build
36 Started ... ago
37 Finished ... (took 1 minute, 0.0 seconds)
38 buildlog (7 bytes)
39 uploadlog (7 bytes)
40
41- >>> print admin_browser.getLink('Retry build').url
42+ >>> print admin_browser.getLink('Retry this build').url
43 http://launchpad.dev/ubuntutest/+source/testing/1.0/+build/31/+retry
44
45-By clicking on the 'Retry build' link, administrators are informed of
46+By clicking on the 'Retry this build' link, administrators are informed of
47 the consequences of this action.
48
49- >>> admin_browser.getLink('Retry build').click()
50+ >>> admin_browser.getLink('Retry this build').click()
51 >>> print extract_text(find_main_content(admin_browser.contents))
52 Retry i386 build of testing 1.0 in ubuntutest breezy-autotest RELEASE
53 ...
54@@ -238,7 +238,7 @@
55 >>> print extract_text(
56 ... find_tag_by_id(admin_browser.contents, 'status'))
57 Build status
58- Failed to upload Retry build on Bob The Builder
59+ Failed to upload on Bob The Builder Retry this build
60 Started ... ago
61 Finished ... (took 1 minute, 0.0 seconds)
62 buildlog (7 bytes)
63@@ -248,7 +248,7 @@
64 performed, but then the failed build will be pending again and
65 retrying the build is not a possibility anymore.
66
67- >>> admin_browser.getLink("Retry build").click()
68+ >>> admin_browser.getLink("Retry this build").click()
69 >>> admin_browser.getControl("Retry Build").click()
70 >>> for text in get_feedback_messages(admin_browser.contents):
71 ... print text
72@@ -259,7 +259,7 @@
73 Needs building
74 Start in ... (0) Rescore build What's this?
75
76- >>> admin_browser.getLink("Retry build").click()
77+ >>> admin_browser.getLink("Retry this build").click()
78 Traceback (most recent call last):
79 ...
80 LinkNotFoundError
81
82=== modified file 'lib/lp/soyuz/templates/build-index.pt'
83--- lib/lp/soyuz/templates/build-index.pt 2009-08-19 15:12:29 +0000
84+++ lib/lp/soyuz/templates/build-index.pt 2009-09-14 14:40:18 +0000
85@@ -42,24 +42,16 @@
86
87 </div> <!-- yui-g -->
88
89- <div class="yui-g">
90-
91- <div id="binaries" class="yui-u first"
92- tal:define="uploaded view/has_done_upload;"
93- tal:condition="context/binarypackages">
94- <div class="portlet">
95- <div metal:use-macro="template/macros/binaries" />
96- </div>
97- </div>
98-
99- <div id="files" class="yui-u"
100- tal:condition="context/binarypackages">
101- <div class="portlet">
102- <div metal:use-macro="template/macros/files" />
103- </div>
104- </div>
105-
106- </div> <!-- yui-g -->
107+ <div id="binaries" class="portlet"
108+ tal:define="uploaded view/has_done_upload;"
109+ tal:condition="context/binarypackages">
110+ <div metal:use-macro="template/macros/binaries" />
111+ </div>
112+
113+ <div id="files" class="portlet"
114+ tal:condition="context/binarypackages">
115+ <div metal:use-macro="template/macros/files" />
116+ </div>
117
118 <div id="buildlog" class="portlet"
119 tal:condition="context/buildstate/enumvalue:BUILDING">
120@@ -141,10 +133,6 @@
121 <span tal:attributes="
122 class string:buildstatus${context/buildstate/name};"
123 tal:content="context/buildstate/title">Fully built</span>
124- <tal:retry
125- define="link context/menu:context/retry"
126- condition="link/enabled"
127- replace="structure link/fmt:icon" />
128 <tal:building condition="context/buildstate/enumvalue:BUILDING">
129 on <a tal:content="view/buildqueue/builder/title"
130 tal:attributes="href view/buildqueue/builder/fmt:url"/>
131@@ -153,6 +141,9 @@
132 on <a tal:content="context/builder/title"
133 tal:attributes="href context/builder/fmt:url"/>
134 </tal:built>
135+ <tal:retry define="link context/menu:context/retry"
136+ condition="link/enabled"
137+ replace="structure link/fmt:link" />
138 </p>
139
140 <ul>