Merge lp:~sinzui/launchpad/dsp-vocab-ui into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 14104 | ||||
Proposed branch: | lp:~sinzui/launchpad/dsp-vocab-ui | ||||
Merge into: | lp:launchpad | ||||
Prerequisite: | lp:~sinzui/launchpad/dsp-historic-attributes | ||||
Diff against target: | 0 lines | ||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/dsp-vocab-ui | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Kowalik (community) | code | Needs Information | |
Review via email: mp+78194@code.launchpad.net |
Description of the change
Update the DSP picker UI.
Launchpad bug: https:/
Pre-
The DSP picker contains not one but two redundant title bug two. eg:
ubuntu/
> commercialpackage
-------
RULES
* The vocab and the picker entry are constructing the same data. The data
is redundant with the actual package title because the title comes
from Lp ids. Both parenthetical names can be removed.
* There is often an extra blank line between the entry details and the
maintainer. This is because empty strings/lists are being appended
even though there is nothing to show.
* ADDENDUM: While writing a test, I discovered that the entry can oops
trying to get the maintainer for an unbuilt package.
* The vocabulary has already retrieved the binary package names and it
would be nice to include them in the entry without a DB call. In the
case of official package branches, the vocabulary knows more about the
binary names than the publishing history.
QA
See http://
to compare the final result with the picture in the reported bug.
To verify that the vocab, enable the feature:
disclosure.
* Visit an ubuntu bug on qastaging.
* Expand the Ubuntu package task.
* Open the package field's picker using the choose link.
* Search for 'mozilla'.
* Verify each entry does *not* have a parenthetical package name; only
the ubuntu/<package> text is used for the title.
* Expand the details for the entries.
* Verify there is not a blank link between the binary package names
and the maintainer.
* Visit a charm bug on on qastaging.
* Search for 'mysql'
* The details *may* say the package is unbuilt.
* Expand the details.
* Verify that there is no maintainer text.
Looking at a dev instance also requires the feature flag to be enabled.
Search requires an update to the sample db because the data is incomplete.
Insert into distributionsou
select sourcepackagename, distribution
from distributionsou
LINT
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
TEST
./bin/test -vvc lp.app.
./bin/test -vvc lp.registry.
./bin/test -vvc -t TestDistributio
IMPLEMENTATION
Redefined the DSP picker adapter's getPickerEntries() to not set the alt_title
property because it is redundant with the token that is used for the title.
Added a rule to only append the second_line tot he details if it is not empty.
Add a rule return None for the maintainer when there is no current release.
lib/
lib/
Moved the rules to get the binary package names for a DSP into the model.
Created a cachedproperty called binary_names. The intent is to permit other
processes to prefill the cache so that extra db calls are not needed.
lib/
lib/
lib/
lib/
Removed the summary rule used to make the term.title because it is redundant
with the token. Updated the DSP vocabulary's toTerm() method to accept a tuple
as well as a package. The tuple is the package and the binary_names to
prepopulate the binary_names cache with. Updated the search method to pass the
DSP and binary_names.
lib/
lib/
I question the usefulness of pulling out Maintainer from built packages -- I suspect a better suggestion is the short description for binary packages, and maybe one or two binary packages names for a source package.
Why do all of the entries say 'package', is the plan to have it distinguish between source and binary packages?
However, this looks loads better than we have currently, great work!