Merge lp://staging/~rvb/launchpad/dds-fix-spinner-50391 into lp://staging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12740 | ||||
Proposed branch: | lp://staging/~rvb/launchpad/dds-fix-spinner-50391 | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
89 lines (+39/-15) 2 files modified
lib/lp/registry/javascript/distroseriesdifferences_details.js (+27/-15) lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js (+12/-0) |
||||
To merge this branch: | bzr merge lp://staging/~rvb/launchpad/dds-fix-spinner-50391 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email: mp+56199@code.staging.launchpad.net |
Commit message
[r=benji][bug=750391] Fix the location of the spinner displayed when requesting package diffs.
Description of the change
This branch fixes the location of the spinner displayed when requesting package diffs.
There is no unit test for this because I'm not sure how to test for the location of this _very transient_ spinner.
== QA ==
- Turn on the feature flag :
'soyuz.
- On a local instance access this page:
https:/
- Open the alsa-utils row
- Click the "Compute differences from last common version:"
This should fail but the (short lived) spinner should replace the link you just clicked on (before being replaced by an error message).
This branch looks good.
As for testing, it would be sufficient to check that the nodes selected
are correct. The easiest way I can see to do that would be to do a
small refactoring such that the code to select the node to apply the
animation to is in its own function. You can then call the function and
verify that the element is of the right description (e.g., class).
I don't know if there's a practical difference between the two, but I've ',''). Also,
seen us use .empty() more often than .set('innerHTML
.empty() is chainable, so instead of
var placeholder = container. one('.package- diff-placeholde r'); .set('innerHTML ',''); .appendChild( in_progress_ message) ;
placeholder
placeholder
you could do (note the removal of "var placeholder"):
container. one('.package- diff-placeholde r')
.append( in_progress_ message) ;
.empty()
Here are a couple of tiny whitespace fixes:
- container. append( in_progress_ message) ; one('.package- diff-placeholde r').set( one('.package- diff-placeholde r'); set('innerHTML' ,'');
- container.
- 'text',
- 'Differences from last common version:');
+ var placeholder = container.
+ placeholder.
There is a missing space after the comma.
+ placeholder. appendChild( in_progress_ message) ; transaction_ id, response, args) {
container. one('p. update- in-progress- message' ).remove( ); one('.package- diff-placeholde r').set(
container. all('.request- derived- diff'). each(function( sub_container) {
var success_cb = function(
+ container.
+ 'text',
+ 'Differences from last common version:');
The above line wasn't changed in your branch, but it needs a space
before the open brace.