Merge lp:~deryck/launchpad/hot-bugs-list-color-icons-439128 into lp:launchpad
| Status: | Merged | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Approved by: | Deryck Hodge on 2010-01-20 | ||||||||||||||||
| Approved revision: | not available | ||||||||||||||||
| Merged at revision: | not available | ||||||||||||||||
| Proposed branch: | lp:~deryck/launchpad/hot-bugs-list-color-icons-439128 | ||||||||||||||||
| Merge into: | lp:launchpad | ||||||||||||||||
| Diff against target: |
219 lines (+105/-15) 9 files modified
lib/canonical/launchpad/javascript/bugs/bugtask-index.js (+1/-1) lib/canonical/launchpad/systemhomes.py (+1/-1) lib/canonical/launchpad/templates/bugs-listing-table-without-navlinks.pt (+1/-1) lib/canonical/launchpad/webapp/tales.py (+1/-1) lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt (+97/-8) lib/lp/bugs/templates/bug-listing-detailed.pt (+1/-1) lib/lp/bugs/templates/bugtarget-bugs.pt (+1/-1) lib/lp/bugs/templates/bugtask-index.pt (+1/-0) lib/lp/bugs/templates/malone-index.pt (+1/-1) |
||||||||||||||||
| To merge this branch: | bzr merge lp:~deryck/launchpad/hot-bugs-list-color-icons-439128 | ||||||||||||||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | code | 2010-01-19 | Approve on 2010-01-20 |
|
Review via email:
|
|||
Commit Message
Use the correct color icons for hot bug and bugs home page listings.
| Deryck Hodge (deryck) wrote : | # |
| Brad Crittenden (bac) wrote : | # |
Hi Deryck,
Thanks for the branch. It all looks good...except it's a huge regression for webkit-based browsers. We go from always having a grey icon to having NO icon at all.
As Curtis immediately saw, your <span> is wrong in that it is invalid to do a self-closing <span />. So your changes like:
<span tal:attributes=
need to be:
<span tal:attributes=
Please be a superstar and find the other places in the codebase where this happens. Your demo URL https:/
Looking at your new test code I'm a bit confused by:
+ >>> print high_bugs[0]
61 + <span class="sprite bug-high">
62 + </span>
Because when I look at the html for bugs.launchpad.dev I see self-closing spans. Can you figure out why that is happening?
| Brad Crittenden (bac) wrote : | # |
Deryck would you like to consider rolling in a fix to bug 393825 at the same time? It seems to be the same class of problem.
| Deryck Hodge (deryck) wrote : | # |
I've updated the branch to fix both bug 393825 and bug 397457. I fixed the tales formatter for icon to include a nbsp and updated the js generating the privacy icon to also add an nbsp. Some minor style changes were required on the bug page to make sure the privacy icon didn't get a link hover underline.
I'm running tests now to see fallout from these changes.
| Brad Crittenden (bac) wrote : | # |
The new changes look good Deryck and work well with webkit. Thanks for the fix.

= Summary =
This branch fixes Bug #439128, hot bugs list not having correct color
icons. I also did a drive-by fix for Bug #144101, color icons missing
from the top-level bugs.lp.net home page.
== Proposed fix ==
The correct fix is to use sprite classes rather than img tags.
== Pre-implementation notes ==
I discussed this with Graham and Tom during our standup call.
== Implementation details ==
The fix is pretty simple, but I spent some time on this branch getting
the test updated to check both bug lists -- recently reported and
recently fixed -- and also checking that sprite classes are used.
I also needed to add a secondary sort order to the latest_bugs method Factory and all had the same timestamp, I needed
because the test was unpredictable otherwise. Since 10 bugs are created
via the LaunchpadObject
to have a secondary sort on ID to make the test consistent. I don't see
harm in this change otherwise, but welcome some scrutiny of this
particular change.
== Tests ==
./bin/test -cvvt xx-front- page-bug- lists.txt
== Demo and Q/A ==
To demo, visit bugs.lp. net/ANYPROJECT and confirm that the bugs icons
are color coded.
Also, visit bugs.lp.net itself and verify that bug icon use colors.
(Note: recently reported bugs can all be gray if no importance has been
set.)
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: bugs/templates/ malone- index.pt bugs/stories/ bugs/xx- front-page- bug-lists. txt /launchpad/ systemhomes. py bugs/templates/ bugtarget- bugs.pt bugs/templates/ bug-listing- detailed. pt
lib/lp/
lib/lp/
lib/canonical
lib/lp/
lib/lp/
== Pylint notices ==
lib/canonical/ launchpad/ systemhomes. py interfaces' (No module cation. toWADL] Use super on an old style
51: [F0401] Unable to import 'lazr.restful' (No module named restful)
52: [F0401] Unable to import 'lazr.restful.
named restful)
378: [E1002, WebServiceAppli
class