The rest of the code review. A few minor things, but nothing serious. Rock on :) Get this landed, people want to buy you beer :) > === modified file 'lib/lp/bugs/browser/configure.zcml' > --- lib/lp/bugs/browser/configure.zcml 2009-12-09 12:13:11 +0000 > +++ lib/lp/bugs/browser/configure.zcml 2009-12-09 12:13:43 +0000 > @@ -95,6 +95,13 @@ > facet="bugs" > permission="launchpad.AnyPerson"/> > + name="+filebug-inline-form" > + for="lp.bugs.interfaces.bugtarget.IBugTarget" > + class="lp.bugs.browser.bugtarget.FilebugShowSimilarBugsView" > + template="../templates/bugtarget-filebug-inline-form.pt" > + facet="bugs" > + permission="launchpad.AnyPerson"/> > + name="+manage-official-tags" > for="lp.bugs.interfaces.bugtarget.IOfficialBugTagTargetRestricted" > class="lp.bugs.browser.bugtarget.OfficialBugTagsManageView" > > === modified file 'lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt' > --- lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt 2009-11-26 09:18:22 +0000 > +++ lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt 2009-12-09 12:13:43 +0000 > @@ -43,6 +43,25 @@ > u'Test description.' > > > +== URLs to additional FileBug elements == > + > +FileBugViewBase provides properties that return the URLs of further > +useful parts of the +filebug process. > + > +The inline_filebug_form_url property returns the URL of the inline > +filebug form so that it may be loaded asynchronously. > + > + >>> print filebug_view.inline_filebug_form_url > + http://launchpad.dev/ubuntu/+source/mozilla-firefox/+filebug-inline-form > + > +Similarly, the duplicate_search_url property returns the base URL for > +the duplicate search view, which can be used to load the list of > +possible duplicates for a bug asynchronously. > + > + >>> print filebug_view.duplicate_search_url > + http://launchpad.dev/ubuntu/+source/mozilla-firefox/+filebug-show-similar > + > + > == Adding extra info to filed bugs == > > It's possible for bug reporting tools to upload a file with debug > > === modified file 'lib/lp/bugs/interfaces/bug.py' > --- lib/lp/bugs/interfaces/bug.py 2009-11-26 09:18:22 +0000 > +++ lib/lp/bugs/interfaces/bug.py 2009-12-09 12:13:43 +0000 > @@ -26,6 +26,7 @@ > from zope.interface import Interface, Attribute > from zope.schema import ( > Bool, Bytes, Choice, Datetime, Int, List, Object, Text, TextLine) > +from zope.schema.vocabulary import SimpleVocabulary > from zope.security.interfaces import Unauthorized > > from canonical.launchpad import _ > @@ -789,6 +790,11 @@ > "A sequence of IBugTaskDeltas, one IBugTaskDelta or None.") > > > +# A simple vocabulary for the subscribe_to_existing_bug form field. > +SUBSCRIBE_TO_BUG_VOCABULARY = SimpleVocabulary.fromItems( > + [('yes', True), ('no', False)]) > + > + > class IBugAddForm(IBug): > """Information we need to create a bug""" > id = Int(title=_("Bug #"), required=False) > @@ -842,8 +848,9 @@ > assignee = PublicPersonChoice( > title=_('Assign to'), required=False, > vocabulary='ValidAssignee') > - subscribe_to_existing_bug = Bool( > - title=_(u'Subscribe to this bug'), > + subscribe_to_existing_bug = Choice( > + title=u'Subscribe to this bug', > + vocabulary=SUBSCRIBE_TO_BUG_VOCABULARY, > required=True, default=False) > > > > === added file 'lib/lp/bugs/templates/bugtarget-filebug-inline-form.pt' > --- lib/lp/bugs/templates/bugtarget-filebug-inline-form.pt 1970-01-01 00:00:00 +0000 > +++ lib/lp/bugs/templates/bugtarget-filebug-inline-form.pt 2009-12-09 12:13:43 +0000 > @@ -0,0 +1,11 @@ > + + xmlns:tal="http://xml.zope.org/namespaces/tal" > + xmlns:metal="http://xml.zope.org/namespaces/metal" > + omit-tag=""> > + > + > + + use-macro="context/@@+filebug-macros/inline-filebug-form" /> > + > + > + > > === modified file 'lib/lp/bugs/templates/bugtarget-filebug-search.pt' > --- lib/lp/bugs/templates/bugtarget-filebug-search.pt 2009-11-26 09:18:22 +0000 > +++ lib/lp/bugs/templates/bugtarget-filebug-search.pt 2009-12-09 12:13:43 +0000 > @@ -1,10 +1,26 @@ > - + xmlns="http://www.w3.org/1999/xhtml" > xmlns:tal="http://xml.zope.org/namespaces/tal" > xmlns:metal="http://xml.zope.org/namespaces/metal" > xmlns:i18n="http://xml.zope.org/namespaces/i18n" > metal:use-macro="view/macro:page/main_only"> > > + > + > + Oh man, I hate this boilerplate everywhere. Not your fault, and this isn't asking you to do anything. I just wonder if there's a better way though. I'll email the list if I'm still bothered later this afternoon. > + > + > + >
>
> This report will be private, though you can disclose it later. > @@ -23,38 +39,91 @@ > > > > -
> +
+ tal:define="launchpad_form_id string:filebug-search-form"> >
> - > - - tal:define="widget nocall:view/widgets/product|nothing" > - tal:condition="widget"> > - > - > - - tal:define="widget nocall:view/widgets/bugtarget|nothing" > - tal:condition="widget"> > - > - > - > - > - > - > - > - > - > -
> - Please describe the bug in a few words, for example, > - "weather applet crashes on logout": > -
> -
> - > -
> -
> + > + > + > + + tal:define="widget nocall:view/widgets/product|nothing" > + tal:condition="widget"> > + > + > + > + + tal:define="widget nocall:view/widgets/bugtarget|nothing" > + tal:condition="widget"> > + > + It seems odd to have both product and bugtarget widgets, but I see that it's the same as before, so no worries. > + > + > + > + > + > + > + > + > + The desire to have more control over the styling of this widget > + prevents us from using the widget_row macro here. > + > + > + > + > + > + > +
> +

> + Please describe the bug in a few words, for example, "weather > + applet crashes on logout": > +

I don't think the

is needed here (i.e.
s can have contain inline content)... unless it affects layout. > +
+ tal:attributes="class error_class" > + style="text-align: left; padding-left: 5em;"> > +
> + > + > +
> +
+ tal:content="structure error">Error message
> +

+ tal:condition="widget/hint" > + tal:content="widget/hint">Some Help Text > +

> +
> + > + > +
> + > +
> + > + We add this to hide the standard action buttons. > + >
> - > - > +
>
> -
> - > - > + > +
> + > +
> +
> + > + > +

> + + tal:attributes="href view/inline_filebug_form_url" > + style="display: none;"> > + + tal:attributes="href view/duplicate_search_url" > + style="display: none;"> > +

Maybe it's simpler to put the display:none on the

? I think empty paragraphs still influence layout. > + > + > + > + > > === modified file 'lib/lp/bugs/templates/bugtarget-filebug-show-similar.pt' > --- lib/lp/bugs/templates/bugtarget-filebug-show-similar.pt 2009-11-26 09:18:22 +0000 > +++ lib/lp/bugs/templates/bugtarget-filebug-show-similar.pt 2009-12-09 12:13:43 +0000 > @@ -3,7 +3,12 @@ > xmlns:metal="http://xml.zope.org/namespaces/metal" > omit-tag=""> > > - - use-macro="context/@@+filebug-macros/display-similar-bugs" /> > + > + + use-macro="context/@@+filebug-macros/show-similar-bugs-and-filebug-button" /> > + > + > +

No similar bug reports were found.

> + > > > > === modified file 'lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt' > --- lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt 2009-12-08 10:57:44 +0000 > +++ lib/lp/bugs/templates/bugtarget-filebug-submit-bug.pt 2009-12-09 12:13:43 +0000 > @@ -1,4 +1,4 @@ > - +
xmlns="http://www.w3.org/1999/xhtml" > xmlns:tal="http://xml.zope.org/namespaces/tal" > xmlns:metal="http://xml.zope.org/namespaces/metal" > @@ -64,4 +64,4 @@ >
> > > -
> + > > === modified file 'lib/lp/bugs/templates/bugtarget-macros-filebug.pt' > --- lib/lp/bugs/templates/bugtarget-macros-filebug.pt 2009-11-26 09:18:22 +0000 > +++ lib/lp/bugs/templates/bugtarget-macros-filebug.pt 2009-12-09 12:13:43 +0000 > @@ -100,7 +100,7 @@ > > > > -