Merge lp:~jtv/launchpad/bug-827347 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13730 |
Proposed branch: | lp:~jtv/launchpad/bug-827347 |
Merge into: | lp:launchpad |
Diff against target: |
428 lines (+224/-84) 3 files modified
lib/lp/registry/browser/distroseries.py (+90/-22) lib/lp/registry/browser/tests/test_distroseries.py (+97/-27) lib/lp/registry/templates/distroseries-portlet-derivation.pt (+37/-35) |
To merge this branch: | bzr merge lp:~jtv/launchpad/bug-827347 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+72030@code.launchpad.net |
Commit message
[r=allenap][bug=827347] Link to +localpackagediffs from DistroSeries if there are any differences at all in it.
Description of the change
= Summary =
On the page for a derived distroseries, there's a link to the +localpackagediffs page. The latter page shows only DistroSeriesDif
Unfortunately the link only shows up if there are DSDs that need attention. If you want to have a look at resolved differences, say, well you could but there's not going to be any link to the page.
== Proposed fix ==
Link to +localpackagediffs (but one that shows all of the DSDs) when the series has any DSDs at all. Show the overall count of DSDs with that link. Add a parenthesized count of DSDs that need attention, if there are any.
The links and counts for the other two types of DSD (present in the parent but not in the derived series, or the other way around) stay essentially the same. A small difference is that the link no longer comprises the full phrase describing the differences; that was altogether too blue and made the separation between the adjacent +localpackagediffs links a bit hard to notice.
So now, the link goes "1234 packages <with differences> (60 _needing attention_)".
== Pre-implementation notes ==
Went through a bit of UI prototyping with Julian and Raphaƫl. Also discussed desired functionality.
== Implementation details ==
I moved some logic, including the construction of links and the formulation of plurals, from the TAL into the browser code. That also lets me test the details at a lower level, without needing to render the view and search the HTML or DOM.
Hopefully you won't find my method names too lofty: wordVersionDiff
You'll also notice a bit of unrelated cleanup where I replace DistroSeriesDif
== Tests ==
{{{
./bin/test -vvc lp.registry.
}}}
== Demo and Q/A ==
Go over the Derived section of a bunch of derived DistroSeries. There should be no differences links where there are no differences. The two links for different versions should distinguish differences that need attention from differences overall, and either should appear only when they have something to display.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/