Merge lp:~jcsackett/launchpad/diff-overlay-close into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12627 | ||||
Proposed branch: | lp:~jcsackett/launchpad/diff-overlay-close | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
25 lines (+10/-0) 1 file modified
lib/lp/code/javascript/branchmergeproposal.diff.js (+10/-0) |
||||
To merge this branch: | bzr merge lp:~jcsackett/launchpad/diff-overlay-close | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+54032@code.launchpad.net |
Commit message
[r=bac][bug=720122] Adds a close event handler to the diff overlay so the close button actually works.
Description of the change
Summary
=======
The diff overlay for merge proposals (as seen on the branch index or bug index page) has a close button that doesn't do anything. This just adds a simple close function to the overlay bound to the close button's click event.
Preimplementation
=================
Spoke with Deryck Hodge about the reason for the breakage and ways to fix it.
Implementation
==============
lib/lp/
-------
A click handler is bound to the close button that dismisses the diff overlay.
Tests
=====
There's not really a good test for this that I can see; we're testing a lot of interaction between things. Similarly, windmill tests are bad, because they suck, and we're not testing data back and forth between page and server. I'm at a loss. If my assumptions are wrong, call me out and I'll add tests.
QA
==
The diff overlay in the example in the bug should be dismissable via the close button.
Hi Jonathan,
Thanks for talking me through the semantics of Y.after. Totally unintuitive.
As we discussed, I think _dismissDiff is poorly named as it isn't doing the dismissal but is instead setting up the click handler to do the dismissing at the appropriate time.
I do note the dismiss button (X) is oddly located. Is that a function of PrettyOverlay?
I've never used the diff overlay before so I'm happy to have seen this branch and that you're making it work properly.