Merge lp:~abentley/launchpad/js-translation into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | 12718 |
Proposed branch: | lp:~abentley/launchpad/js-translation |
Merge into: | lp:launchpad |
Diff against target: |
639 lines (+506/-16) 7 files modified
lib/lp/translations/browser/sourcepackage.py (+37/-3) lib/lp/translations/browser/tests/test_sharing_details.py (+18/-4) lib/lp/translations/javascript/sourcepackage_sharing_details.js (+233/-0) lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html (+34/-0) lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.js (+105/-0) lib/lp/translations/templates/sourcepackage-sharing-details.pt (+22/-9) lib/lp/translations/windmill/tests/test_sourcepackage_sharing_details.py (+57/-0) |
To merge this branch: | bzr merge lp:~abentley/launchpad/js-translation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Deryck Hodge (community) | code | Approve | |
Review via email: mp+54067@code.launchpad.net |
Description of the change
= Summary =
Start implementing ajax support for sharing details page.
== Proposed fix ==
== Pre-implementation notes ==
Discussed with deryck
== Implementation details ==
Implemented TranslationShar
the state of the sharing config checklist. Updated the template so that the
branch-related text is always present in the DOM, with inactive text marked
with the "unseen" class.
Added pickers to select the branch, for the productseries. Implemented
TranslationShar
Setting the branch requires multiple steps of async IO, so I provided each step
a nested function. These were then chained together through their config
parameters so that each triggers the next.
Not yet implemented:
- marking items disabled when they cannot be used
- initializing the TranslationShar
This is the first of a planned sequence of branches.
== Tests ==
Load lib/lp/
bin/test sharing_details
bin/test --layer=
== Demo and Q/A ==
enable the feature flag
ensure you control a productseries that is linked to by a sourcepackage
go to the +sharing-details page.
Click the branch edit link. You should get an inline branch picker.
When you select a branch, the page should be updated correctly. You should be
able to confirm the branch link on the productseries page.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
331: Line exceeds 78 characters.
Hi, Aaron.
This looks very good as a first branch in this work. Thanks!
Beyond the things I mentioned on IRC, I noticed you have several variables in the JavaScript test that are not bound locally with the var keyword. I'm assuming this is oversight and would ask you to fix this, unless you have a good reason to do so. While there is no negative consequence of this in the test that I see, I still think it's good practice unless you really mean the variables to be global. Especially since the behavior of js is opposite of Python in this regard.
Cheers,
deryck