Merge lp:~sinzui/launchpad/bug-tracker-widget-0 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Edwin Grubbs |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11028 |
Proposed branch: | lp:~sinzui/launchpad/bug-tracker-widget-0 |
Merge into: | lp:launchpad |
Diff against target: |
641 lines (+308/-40) 14 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+9/-0) lib/canonical/launchpad/vocabularies/configure.zcml (+12/-0) lib/canonical/launchpad/vocabularies/dbobjects.py (+44/-4) lib/canonical/widgets/product.py (+52/-18) lib/canonical/widgets/templates/product-bug-tracker.pt (+24/-0) lib/lp/bugs/browser/bugtarget.py (+6/-1) lib/lp/bugs/browser/tests/test_bugtarget_configure.py (+1/-1) lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt (+4/-5) lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt (+1/-1) lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt (+2/-3) lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt (+1/-1) lib/lp/bugs/tests/test_bugtracker_vocabulary.py (+123/-0) lib/lp/registry/doc/product-widgets.txt (+28/-5) lib/lp/registry/stories/project/xx-project-edit.txt (+1/-1) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/bug-tracker-widget-0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Edwin Grubbs (community) | code ui | Approve | |
Review via email: mp+27741@code.launchpad.net |
Description of the change
This is my branch to include subordinate fields in the bug tracker widget.
This change updated of the bug tracker widget to the proposed design.
http://
lp:~sinzui/launchpad/bug-tracker-widget-0
Diff size: 600
Launchpad bug:
https:/
Test command: ./bin/test -vv \
-t product-widgets -t test_bugtracker
-t test_bugtarget_
-t xx-project-
-t xx-bugtracker.txt -t xx-upstream-
Pre-
Target release: 10.06
Include subordinate fields in the bug tracker widget
-------
The bugtracker widget does not know that the remote project field is
subordinate to choosing a another bugtracker. The expiration widget is
subordinate to the launchpad bug tracker, but the field is not displayed under
the radio option.
The bugtracker widget could render all the fields in a uniformed way so that it
is clear when the fields are available.
Rules
-----
I considered updating the javascript to control the constraint on
remote_product, but the form does not have enough information to know
when the enable/disabled to field. We need to know the bug tracker type,
which cannot be provided by the picker widget. I focused on making the
widget look the the agreed design.
* Add the remote_product and expiration fields to the widget's template
* Switch the registered bug tracker widget to a picker
QA
--
* Visit a project and choose to configure bugs.
* Verify that the two fields are shown to be subordinate.
* Verify that the registered bug tracker widget is a picker
Lint
----
Linting changed files:
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Test
----
* lib/lp/
* lib/lp/
* lib/lp/
* lib/lp/
* lib/lp/
* Updated these tests to use the text field; it is not a select widget
and the tests were not good since users do not see bugtrackers ids.
* lib/lp/
* Added a test to verify the behaviours to BugTracker vocabs.
* lib/lp/
* Updated the test to recognise the subordinate fields and the
change to the registered bug tracker widget.
Implementation
--------------
* lib/canonical/
* Added a class to show subordinate controls as indented.
* lib/canonical/
* Registered the WebBugTrackerVo
gets it via the VocabularyRegistry
* lib/canonical/
* Updated BugTrackerVocab
has grown too large for a normal vocabulary. The picker requires
a IHugeVocabulary
* lib/canonical/
* Updated ProductBugTrack
the registered bug tracker field. Redefined the renderValue()
to work with a dict of item controls and create the two subordinate
controls. The method then calls the new template to do the
layout.
* Extracted the ghost rules from GhostWidget so to create GhostCheckBox
widget.
* lib/canonical/
* Added a template to render the ProductBugTrack
subordinate controls.
* lib/lp/
* Updated ProductBugConfi
continues to manage state and validation, but the ProductBugTracker
Widget does the rendering.
Hi Curtis,
This looks good. I think the radio buttons could be spaced out from each other a little more, and "In a registered bug tracker" might sound better as "In an external bug tracker".
Just one comment on the code below.
-Edwin
>=== modified file 'lib/canonical/ launchpad/ vocabularies/ dbobjects. py' launchpad/ vocabularies/ dbobjects. py 2010-05-16 23:56:51 +0000 launchpad/ vocabularies/ dbobjects. py 2010-06-16 21:35:08 +0000 ulary(SQLObject VocabularyBase) : IHugeVocabulary )
>--- lib/canonical/
>+++ lib/canonical/
>@@ -226,15 +229,52 @@
>
>
> class BugTrackerVocab
>-
>+ """All web and email based external bug trackers."""
>+ displayname = 'Select a bug tracker'
>+ implements(
> _table = BugTracker
>+ _filter = 1 == 1
Why not just use?
_filter = True