launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02227
[Merge] lp:~jcsackett/launchpad/unlink-321675 into lp:launchpad
j.c.sackett has proposed merging lp:~jcsackett/launchpad/unlink-321675 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#321675 The 'Delete' button for a linked branch should be called 'Unlink'
https://bugs.launchpad.net/bugs/321675
Summary
=======
When a bug is unlinked from a branch, the button to confirm the action is "Delete." This is both confusing and scary for a user, because it's not clear if you're deleting the branch or deleting the link. A first step in fixing this ui is to rename the button to Remove link, which matches the language used in the page.
Implementation
==============
lib/lp/bugs/browser/bugbranch.py
--------------------------------
Update the action name to "Remove link" instead of "Delete"
There are also some drive by lint fixes; changes to wrap length and line spacing.
lib/lp/bugs/stories/bugs/xx-link-bug-to-branch.txt
--------------------------------------------------
Updated to match the new action name.
QA
==
1) Create a link between a bug and a branch on launchpad.dev
2) Remove the link from the bug's page
3) The button should say Remove link, not Delete. Clicking it should remove the link
Lint
====
--
https://code.launchpad.net/~jcsackett/launchpad/unlink-321675/+merge/44388
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/unlink-321675 into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/bugbranch.py'
--- lib/lp/bugs/browser/bugbranch.py 2010-11-23 23:22:27 +0000
+++ lib/lp/bugs/browser/bugbranch.py 2010-12-21 20:06:58 +0000
@@ -96,7 +96,7 @@
cancel_url = next_url
- @action('Delete', name='delete')
+ @action('Remove link', name='delete')
def delete_action(self, action, data):
self.context.bug.unlinkBranch(self.context.branch, self.user)
@@ -115,8 +115,9 @@
@property
def show_branch_status(self):
"""Show the branch status if merged and there are no proposals."""
+ lifecycle_status = self.context.branch.lifecycle_status
return (len(self.merge_proposals) == 0 and
- self.context.branch.lifecycle_status == BranchLifecycleStatus.MERGED)
+ lifecycle_status == BranchLifecycleStatus.MERGED)
class BranchLinkToBugView(LaunchpadFormView):
@@ -163,4 +164,3 @@
branch_view = getMultiAdapter(
(self.branch, self.request), name="+bug-branch")
return branch_view()
-
=== modified file 'lib/lp/bugs/stories/bugs/xx-link-bug-to-branch.txt'
--- lib/lp/bugs/stories/bugs/xx-link-bug-to-branch.txt 2009-11-17 09:08:17 +0000
+++ lib/lp/bugs/stories/bugs/xx-link-bug-to-branch.txt 2010-12-21 20:06:58 +0000
@@ -49,4 +49,4 @@
not support SVG and the branch lp://dev/~name12/firefox/main?
...
- >>> user_browser.getControl('Delete').click()
+ >>> user_browser.getControl('Remove link').click()