Code review comment for lp:~deryck/launchpad/hot-bugs-list-color-icons-439128

Revision history for this message
Deryck Hodge (deryck) wrote :

= 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
because the test was unpredictable otherwise. Since 10 bugs are created
via the LaunchpadObjectFactory and all had the same timestamp, I needed
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:
  lib/lp/bugs/templates/malone-index.pt
  lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt
  lib/canonical/launchpad/systemhomes.py
  lib/lp/bugs/templates/bugtarget-bugs.pt
  lib/lp/bugs/templates/bug-listing-detailed.pt

== Pylint notices ==

lib/canonical/launchpad/systemhomes.py
    51: [F0401] Unable to import 'lazr.restful' (No module named restful)
    52: [F0401] Unable to import 'lazr.restful.interfaces' (No module
named restful)
    378: [E1002, WebServiceApplication.toWADL] Use super on an old style
class

« Back to merge proposal