Code review comment for lp:~deryck/launchpad/icon-positioning-js-400057

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

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

= Summary =

After the addition of r8886 in devel, the add/remove icons are set via
sprite classes and positioned differently than when the JavaScript for
handling inline subscribing was originally written. So when subscribing
inline the icons are positioned incorrectly currently. This problem is
captured in bug 400057.

== Proposed fix ==

The correct fix is to get have the js that generates HTML use sprite
classes instead of inserting images.

== Pre-implementation notes ==

I didn't have any specific pre-imp discussions but plenty of discussion
happened on bug 383555 and bug 401658.

== Implementation details ==

This fix is pretty simple, just matching the current UI classes in js.
There are some outstanding questions about alignment from mpt in bug 401658.

== Tests ==

A Windmill test has been updated, and can be run with:

./bin/lp-windmill -e
test=lib/lp/bugs/windmill/tests/test_bugs/test_bug_inline_subscriber.py
firefox http://bugs.launchpad.dev:8085

== Demo and Q/A ==

Subscribe and unsubscribe yourself a couple times and note that the
remove icon should appear to the right of the "Unsubscribe" link and
should be flush with the link. The add icon should always be to the
left of the link.

= Launchpad lint =

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

Linting changed files:
  lib/canonical/launchpad/javascript/bugs/subscriber.js
  lib/canonical/launchpad/javascript/bugs/bugtask-index.js
  lib/lp/bugs/windmill/tests/test_bugs/test_bug_inline_subscriber.py

== JSLint notices ==
jslint: Lint found in
'/home/deryck/canonical/lp-branches/icon-positioning-js-400057/lib/canonical/launchpad/javascript/bugs/bugtask-index.js':
Line 1263 character 58: Missing semicolon.
        status_content.on('click', function(e) { e.halt() });

Line 1264 character 62: Missing semicolon.
        importance_content.on('click', function(e) { e.halt() });

jslint: No problem found in
'/home/deryck/canonical/lp-branches/icon-positioning-js-400057/lib/canonical/launchpad/javascript/bugs/subscriber.js'.

jslint: 2 files to lint.

(Note: These lint notices are fixed in another, not yet landed, branch.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpp+FkACgkQ4glRK0DaE8j69ACgt9PkUAVbefqAgoZMthVAwuTg
B9IAoK2TEaVe6IAfg1L76ulTBQF0gGA+
=MhGd
-----END PGP SIGNATURE-----

« Back to merge proposal