Merge lp:~michael.nelson/launchpad/652838-select-diffs-for-syncing into lp:launchpad/db-devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Michael Nelson | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 9863 | ||||
Proposed branch: | lp:~michael.nelson/launchpad/652838-select-diffs-for-syncing | ||||
Merge into: | lp:launchpad/db-devel | ||||
Diff against target: |
489 lines (+264/-51) 4 files modified
lib/canonical/launchpad/templates/launchpad-form.pt (+4/-3) lib/lp/registry/browser/distroseries.py (+76/-2) lib/lp/registry/browser/tests/test_series_views.py (+161/-43) lib/lp/registry/templates/distroseries-localdifferences.pt (+23/-3) |
||||
To merge this branch: | bzr merge lp:~michael.nelson/launchpad/652838-select-diffs-for-syncing | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | ui | Approve | |
Guilherme Salgado (community) | ui* | Approve | |
Jeroen T. Vermeulen (community) | code | Approve | |
Review via email: mp+37572@code.launchpad.net |
Commit message
Allow multiple differences to be selected for syncing.
Description of the change
Overview
========
This branch fixes bug 652838 by adding (non-js) check boxes and the sync button for syncing differences.
Note: it does not add the actual sync operation itself, but just a stub action. Julian will be organising the actual operation at at later point (obviously before the feature is enabled).
UI demo
=======
http://
To demo locally:
Run http://
https:/
Details
=======
I had 2 issues, and one ongoing:
1) There doesn't seem to be a natural way to have a dynamic name for the action as required by the prototype at:
You'll see the solution in the view's initialize() method, but any better options would be gratefully accepted.
2) There doesn't seem to be a natural way to have dynamic vocabularies based on the view. I've looked at various ways that we've done this in the past, and none are ideal.
In translations a vocabulary factory is used (see lp.translations
In soyuz an extra field and widget is added to the form during view initialisation (ie. one that is not on the schema, see lp.soyuz.
I decided instead to include the field on the schema with an empty vocabulary, and then update the vocabulary during the view's setUpFields() call. But again, any better ideas are welcome.
3) Finally, two tests where I render the view and check tags are failing, it seems, because the traversal request/lp:person is returning None:
http://
I'm still looking into why this is. So far, tracked it down to the fact that, even within the person_logged_in context manager, the tests view.request.
To test
=======
bin/test -vvm test_series_views
I'll upload a quick screencast soon.
It's just a crying shame that you have to go to these lengths to include dynamic information in your view. I looked for alternatives but didn't find any.
You mentioned that you'd talk to the zope people; I think that's a good idea. If only Zope's @action accepted a callable as an alternative to a string!