Merge lp:~edwin-grubbs/launchpad/bug-525956-unlink-button into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Curtis Hovey on 2010-03-03 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | not available |
| Proposed branch: | lp:~edwin-grubbs/launchpad/bug-525956-unlink-button |
| Merge into: | lp:launchpad |
| Diff against target: |
1398 lines (+373/-417) 26 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+1/-1) lib/canonical/launchpad/templates/launchpad-form.pt (+7/-0) lib/canonical/launchpad/webapp/launchpadform.py (+31/-3) lib/lp/registry/browser/configure.zcml (+16/-0) lib/lp/registry/browser/distributionsourcepackage.py (+1/-22) lib/lp/registry/browser/packaging.py (+0/-96) lib/lp/registry/browser/product.py (+11/-48) lib/lp/registry/browser/sourcepackage.py (+48/-15) lib/lp/registry/browser/tests/packaging-views.txt (+41/-46) lib/lp/registry/browser/tests/sourcepackage-views.txt (+52/-6) lib/lp/registry/browser/tests/test_packaging.py (+4/-2) lib/lp/registry/model/productseries.py (+4/-2) lib/lp/registry/model/sourcepackage.py (+5/-4) lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt (+5/-4) lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt (+9/-14) lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt (+10/-6) lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt (+1/-3) lib/lp/registry/stories/product/xx-product-package-pages.txt (+11/-8) lib/lp/registry/stories/productseries/xx-productseries-delete.txt (+4/-2) lib/lp/registry/templates/distributionsourcepackage-index.pt (+3/-29) lib/lp/registry/templates/distroseries-packaging.pt (+2/-37) lib/lp/registry/templates/product-packages.pt (+8/-19) lib/lp/registry/templates/sourcepackage-portlet-associations.pt (+1/-47) lib/lp/registry/templates/sourcepackage-remove-packaging.pt (+34/-0) lib/lp/registry/templates/sourcepackage-upstream-connections.pt (+63/-0) lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt (+1/-3) |
| To merge this branch: | bzr merge lp:~edwin-grubbs/launchpad/bug-525956-unlink-button |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | code + ui | Approve on 2010-03-03 | |
| Eleanor Berger (community) | code ui* | 2010-03-01 | Approve on 2010-03-01 |
|
Review via email:
|
|||
Commit Message
Added ability to unlink sourcepackages and project series from the sourcepackage index page.
| Edwin Grubbs (edwin-grubbs) wrote : | # |
| Curtis Hovey (sinzui) wrote : | # |
Hi Edwin.
This this was a nice feature to use on the sp page. I think we should consider using it on the dsp page: https:/
I think we should remove the edit/remove links from the +packaging listing. There is not enough information on this page to make that decision.
| Edwin Grubbs (edwin-grubbs) wrote : | # |
> Hi Edwin.
>
> This this was a nice feature to use on the sp page. I think we should consider
> using it on the dsp page: https:/
> have a post back that some people have expressed concern about how easy it is
> to make a mistake. I would not say this is change we must do because the post
> back always returns the user to the dsp page--using the sp as the next_url
> would be confusing.
>
> I think we should remove the edit/remove links from the +packaging listing.
> There is not enough information on this page to make that decision.
This was supposed to be a simple change for the UI review. It has grown
quite large, so I can create a new merge proposal if you would like.
I started off trying to use +remove-packaging page for the
$distrosourcepa
was also used by $product/+packages page, so I changed that page also.
After I got the +remove-packaging page to return to the previous page, I
discovered that the edit link on the $distrosourcepa
returning you to a different page.
All these changes broke a ton of tests.
Pages to check
--------------
The edit and remove buttons for each series are hidden now.
https:/
The remove button now takes you to the $sourcepackage/
and the edit button no
https:/
The remove button now takes you to the $sourcepackage/
https:/
This page shouldn't have changed, but if you want to check that the
show_edit_buttons annotation is passed correctly, you'll need to look at it.
https:/
Implementation details
-------
Removed trailing white-space.
lib/
Added Mixin to enable forms to return to their referring page.
lib/
lib/
Use the ReturnToReferre
Hide the edit/remove buttons by default, but show them in the
annotations portlet, because its view sets
request.
sourcepackage-
it can't share the view with annotations portlet or show_edit_buttons
would always be true.
lib/
lib/
lib/
lib/
Removed PackagingDeleteView and related code.
lib/
lib/
lib/
lib/
lib/
Added error message for when a user loads this page after the
upstream link has been deleted by someone else.
lib/
Tests:
lib/
lib/lp/...
| Curtis Hovey (sinzui) wrote : | # |
Hi Edwin.
in retrospect, saying no to updating the DSP page would have been better. On the other hand, I and Adi have wanted a mixin as you have created for sometime. I think the pain was worth it, though it was untimely.
I have one question from the diff. What is "irumpy hotter" in lp/registry/
| Edwin Grubbs (edwin-grubbs) wrote : | # |
> I have one question from the diff. What is "irumpy hotter" in
> lp/registry/
> I am not aware of a irumpty test distroseries in the test
Doh. "irumpy" is so nonsensical and undesirable that irumpy.com is available. Fixed.

Summary
-------
The sourcepackage index page had an edit button but no way to remove
a link to the upstream via the project series.
The $distroseries/ +packaging page also displayed identical info,
so I moved that into a template that could be shared.
Implementation details ------- ------- -
-------
Moved identical formatting of upstream connection info from packaging. pt and sourcepackage- portlet- associations. pt upstream- connections. pt. Added the (-) removal link project/ series info. lp/registry/ browser/ configure. zcml lp/registry/ templates/ distroseries- packaging. pt lp/registry/ templates/ sourcepackage- portlet- associations. pt lp/registry/ templates/ sourcepackage- upstream- connections. pt
distroseries-
into sourcepackage-
and moved the edit link next to the projectgroup/
lib/
lib/
lib/
lib/
Added $sourcepackage/ +remove- packaging and $sourcepackage/ upstream- connections. lp/registry/ browser/ sourcepackage. py lp/registry/ browser/ tests/sourcepac kage-views. txt lp/registry/ stories/ distroseries/ xx-show- distroseries- packaging. txt lp/registry/ templates/ sourcepackage- remove- packaging. pt
lib/
lib/
lib/
lib/
Drive-by improvement of formatting. lp/registry/ model/productse ries.py lp/registry/ model/sourcepac kage.py
lib/
lib/
Tests
-----
./bin/test -vv -t 'sourcepackage- views.txt| xx-show- distroseries- packaging. txt'
Demo and Q/A
------------
* Open https:/ /launchpad. dev/ubuntu/ hoary/+ source/ evolution /launchpad. dev/ubuntu/ hoary/+ packaging project/ series like so:
* If there is a "Link to Upstream Project" button, use that
since the removal button won't show up without an existing link.
* The Upstream Connections portlet should show:
GNOME ⇒ Evolution ⇒ trunk (E) (-)
where (E) is the edit button, and (-) is the remove button.
* Click on the (-) button.
* Click on the Unlink button.
* The Upstream Connections portlet should now show the
"Link to Upstream Project" button again.
* Open https:/
* The table should now show the projectgroup/
GNOME ⇒ Evolution ⇒ trunk (E) (-)