Merge lp:~sinzui/launchpad/project-packages-portlet-ui into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~sinzui/launchpad/project-packages-portlet-ui |
Merge into: | lp:launchpad |
Diff against target: |
348 lines (+127/-40) 5 files modified
lib/lp/registry/browser/product.py (+32/-9) lib/lp/registry/browser/tests/product-portlet-packages-view.txt (+83/-14) lib/lp/registry/browser/tests/product-views.txt (+2/-1) lib/lp/registry/stories/product/xx-product-index.txt (+4/-3) lib/lp/registry/templates/product-portlet-packages.pt (+6/-13) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/project-packages-portlet-ui |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Nelson (community) | ui | Approve | |
Paul Hummer (community) | ui* | Approve | |
Gavin Panella (community) | Approve | ||
Canonical Launchpad Engineering | ui | Pending | |
Review via email: mp+23360@code.launchpad.net |
Description of the change
This is my branch to simplify the project package portlet suggestion form.
lp:~sinzui/launchpad/project-packages-portlet-ui
Diff size: 314
Launchpad bug: https:/
https:/
Test command: ./bin/test -vv \
-t product-
Pre-
Target release: 10.04
Simplify the project package portlet suggestion form
-------
Bug #550642 [The form in +product-
As an anonymous user, I was show the form to link /gdp to a sourcepackage.
As an anonymous user, I should never be asked to complete a form. Note
that the link to +ubuntupkg was not rendered because it does require
launchpad.View, so I saw the form ending with the "or".
Bug #556534 [Suggestion to link to an Ubuntu package is repetitive]
it says:
[ Link to this Ubuntu Package ] or (+) Link to Ubuntu package
which is a little repetitive and took me two readings to notice why there
were two links.
This problem must be solved because we need to add a third action to
allow the user to state the project is not packaged in Ubuntu.
Rules
-----
* Do not show the form to anonymous users.
* Replace the link to +ubuntupkg with an option that states what will
happen next: Choose another Ubuntu package
* This allows us to add a "This is not packaged in Ubuntu"
UI
--
There are two presentations to accommodate when there are suggestions, and
when there are none.
http://
http://
QA
--
* Visit https:/
* Verify that several packages are listed, and the last option is
"Choose another Ubuntu package"
* Visit https:/
* Verify there is only one option listed
* Select "Choose another Ubuntu package" and submit.
* Verify you are on the +ubuntupkg form.
Lint
----
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Test
----
* lib/lp/
* Updated the test to reflect the new labels for the form.
* Added a test to verify that anonymous users are not show the form.
* Added a test to verify the form works.
* Revised the test to show that selecting "Choose another Ubuntu
package" redirects to +ubuntupkg. Removed the verification of the link
to the form.
* lib/lp/
* Updated the test to verify what the user sees.
Implementation
--------------
* lib/lp/
* Updated can_show_portlet to return False when there is no user.
* Refactored package_field_name so that the string was defined once.
and updated the label to make it clear that the suggestions are
from the current Ubuntu development series.
* Added other_package to the vocabulary and made it the default value.
* Updated the form action label to accommodate the case were the
user has another step. This will also work for the case where the
user needs to say the project is not packaged.
* lib/lp/
* Removed the link to +ubuntupkg.
* Moved the paragraph about no matches into the first form so that
the second form could be removed.
Nice :)
Log from IRC:
<allenap> sinzui: In http:// people. canonical. com/~curtis/ project- without- package- suggestions. png it might work even better if no radio buttons (or the title) appeared, just the button. /edge.launchpad .net/gedit /edge.launchpad .net/gdp /edge.launchpad .net/gedit- class-browser shows just the link to choose another package, but the correct answer is Not packaged.
<sinzui> allenap, there will also be an option to say it is not packaged.
<sinzui> allenap, The previous UI proposal did have button...
<allenap> sinzui: Okay. Also, can_show_portlet() can return True if there are sourcepackages even when user is None. Is that right?
<sinzui> Correct, that is what you see now...https:/
<sinzui> The feature we are refining suggests packages when we do not know about them
<sinzui> There can be a list like this: https:/
<sinzui> allenap, https:/
<sinzui> allenap, The UI to support a list or packages, choose another package, or not packaged became very complicated and abentley, james_w, bac, and I agreed that we should try a single list and button
<allenap> sinzui: Okay, that makes sense, thanks.
<allenap> sinzui: Line 43 in the diff, is it safe to use 'OTHER_PACKAGE' because package.name can never be upper-case? If so, can you add a tiny comment to explain.
<sinzui> hmm
<sinzui> You are correct, but I think I got lucky in my name. I did not think about it
<james_w> name can never have an underscore
<sinzui> allenap, I was cargo culting a style I have reviewed in the past when Object() was used to create a unique and use all-caps to define the field name
<sinzui> james_w, you meana source package name cannot contain underscores?
<james_w> correct
<james_w> for Debian/Ubuntu at least
<james_w> "Package names (both source and binary, see Package, Section 5.6.7) must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character."
<sinzui> ah yes, I recall someone wanted to create a gentoo package with an '/' in it