Code review comment for lp:~edwin-grubbs/launchpad/bug-399554-timeline-improvements

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Summary
-------

Improves the timeline graph portlet on the project index page by allowing
more information to be seen without scrolling.

Implementation details
----------------------

Hid dates for milestones/releases when showing the graph on the project index
page. Moved horizontal series lines closer together. Added a date at the end of
the series line, if at least one of the milestones or releases has a date.
Removed the arrow from obsolete series and made its horizontal line gray.

Tests
-----

file:///./lib/canonical/launchpad/javascript/registry/tests/timeline.html
./bin/lp-windmill test=./lib/canonical/launchpad/windmill/tests/test_registry/test_timeline_graph.py firefox http://launchpad.dev:8085

Demo and Q/A
------------

* Open http://launchpad.dev/firefox
  * The timeline graph portlet should be bigger and only show dates at the
    end of the line.

Lint
----

I fixed all the lint errors except these rediculous ones regarding for-loops.

= 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/registry/tests/timeline.js
  lib/canonical/launchpad/javascript/registry/timeline.js
  lib/lp/registry/model/productseries.py
  lib/lp/registry/templates/timeline-macros.pt

== JSLint notices ==
jslint: Lint found in '/home/egrubbs/canonical/lp-branches/checkout/lib/canonical/launchpad/javascript/registry/timeline.js':
Line 110 character 5: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
    for (var i in this.series.landmarks) {

Line 133 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
        for (i in this.series.landmarks) {

Line 174 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
        for (var i in this.series.landmarks) {

Line 238 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
        for (var i in this.series.landmarks) {

Line 296 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
        for (var i in reversed_timeline) {

Line 310 character 13: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
            for (i in this.series_lines) {

Line 325 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
        for (var i in this.series_lines) {

Line 357 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
        for (var key in last_series.labels) {

Line 374 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
        for (var i in this.series_lines) {

Line 499 character 13: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
            for (var j in series_line.labels) {

Line 494 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
        for (var i in this.project_line.series_lines) {

jslint: 1 file to lint.

« Back to merge proposal