I have a couple suggestion and questions that I think will take a few minutes
to resolve.
Using the UI:
* "bug tracker" is two words.
* Maybe "Configure support tracking" for answers.
* We are asking users to Configure project development branch? I guess
length is the issue here.
Code:
I see these warnings:
== Pyflakes notices ==
lib/lp/registry/browser/pillar.py
28: 'IProductSeries' imported but unused
lib/lp/registry/browser/product.py
9: undefined name 'ProductInvolvementView' in __all__
Why isn't this using the context's overview menu edit link that has
permission checking for rendering.
context/menu:overview/edit:fmt:url
The language looks wrong. We are interested in Configuring, not enabling.
I think this is for the bugs root page which may be fine in this case.
> === modified file 'lib/lp/code/stories/branches/xx-product-branches.txt'
> --- lib/lp/code/stories/branches/xx-product-branches.txt 2010-01-08 14:22:42 +0000
> +++ lib/lp/code/stories/branches/xx-product-branches.txt 2010-03-19 16:20:16 +0000
> @@ -170,7 +170,7 @@
> the 'Import your project' button is not shown.
>
> >>> admin_browser.open('http://launchpad.dev/gnome-terminal')
> - >>> admin_browser.getLink('Change details').click()
> + >>> admin_browser.getLink('Configure Launchpad Branches').click()
> >>> admin_browser.getControl(
> ... 'Code for this project is published in Bazaar branches '
> ... 'on Launchpad').click()
I do not like the use of "Launchpad" in these links. They imply the project
is setting up hosting when we are really interested in gathering project info.
I have dealt with several angry, confused users who see Launchpad masquerading
or is forking project. I think taking "Launchpad" out of the link will make
it clear we want the know where the upstream branch is.
> @@ -128,6 +130,78 @@
> link for link in menuapi.navigation.values() if link.enabled],
> key=attrgetter('sort_key'))
>
> + @cachedproperty
> + def visible_disabled_links(self):
> + """Important disabled links.
> +
> + These are displayed to notify the user to provide configuration
> + info to enable the links.
> +
> + Override the visible_disabled_link_names attribute to change
> + the results.
> + """
> + involved_menu = MenuAPI(self).navigation
> + important_links = [
> + involved_menu[name]
> + for name in self.visible_disabled_link_names]
> + return sorted([
> + link for link in important_links if not link.enabled],
> + key=attrgetter('sort_key'))
+
Are the "[]" required? sorted() accepts a generator which is what the first
argument provides.
> +# This class can't be moved into the browser/product.py file, since
> +# the pillar-views.txt test will fail due to the MenuAPI adapter
> +# for PillarView.enabled_links not working.
> +class ProductInvolvementView(PillarView):
> + """Encourage configuration of involvement links for projects."""
> +
> + has_involvement = True
> + visible_disabled_link_names = ['submit_code']
> +
> + def __init__(self, context, request):
> + super(ProductInvolvementView, self).__init__(context, request)
> + self.official_codehosting = (
> + self.context.development_focus.branch is not None)
> +
> + @property
> + def configuration_links(self):
> + """The enabled involvement links."""
> + overview_menu = MenuAPI(self.context).overview
> + series_menu = MenuAPI(self.context.development_focus).overview
> + configuration_names = [
> + 'configure_answers',
> + 'configure_bugtracker',
> + 'configure_translations',
> + ]
> + configuration_links = [
> + overview_menu[name] for name in configuration_names]
> + link_branch = series_menu['link_branch']
> + link_branch.text = 'Configure project branch'
> + configuration_links.append(link_branch)
> + return sorted([
> + link for link in configuration_links if link.enabled],
> + key=attrgetter('sort_key'))
Our intent it to know where bugs are tracked, and possibly use launchpad.
The problem we have at this moment is that it is not possible to set the
upstream contact without also enabling launchpad bug tracking...making it
impossible for Ubuntu to who to contact when the project does not use
launchpad bugs.
> + @enabled_with_permission('launchpad.Edit')
> + def configure_answers(self):
> + text = 'Configure project answers'
> + summary = 'Allow users to ask questions on this project'
> + return Link('+configure-answers', text, summary, icon='edit')
Maybe we want to use the generic term "support tracker". Answers was called
Support and questions "tickets" in Launchpad beta.
> + @enabled_with_permission('launchpad.Edit')
> + def configure_blueprints(self):
> + text = 'Configure project blueprints'
> + summary = 'Allow users to submit blueprints on this project'
> + return Link('+configure-blueprints', text, summary, icon='edit')
Specifications and meetings tracking is what this enables.
Hi Edwin.
I have a couple suggestion and questions that I think will take a few minutes
to resolve.
Using the UI:
* "bug tracker" is two words.
* Maybe "Configure support tracking" for answers.
* We are asking users to Configure project development branch? I guess
length is the issue here.
Code:
I see these warnings:
== Pyflakes notices ==
lib/ lp/registry/ browser/ pillar. py
28: 'IProductSeries' imported but unused
lib/ lp/registry/ browser/ product. py mentView' in __all__
9: undefined name 'ProductInvolve
> === modified file 'lib/lp/ bugs/templates/ bugtarget- bugs.pt' bugs/templates/ bugtarget- bugs.pt 2010-03-04 15:09:10 +0000 bugs/templates/ bugtarget- bugs.pt 2010-03-19 16:20:16 +0000 </strong> </p> "context/ required: launchpad. Edit" malone- edit"> "href string: ${context/ fmt:url/ +edit}" >Enable bugtracker context/ menu:overview/ configure_ bugtracker | nothing" "configure_ bugtracker" "structure configure_ bugtracker/ fmt:link" /> bugtracker" "href string: ${context/ fmt:url/ +edit}" >
> --- lib/lp/
> +++ lib/lp/
> @@ -169,9 +169,14 @@
> bug tracking.
>
> <p tal:condition=
> - id="no-
> - <a tal:attributes=
> - bug tracking.</a>
> + id="no-malone-edit"
> + tal:define ="configure_
> + >
> + <a tal:condition=
> + tal:replace=
> + <a tal:condition="not: configure_
> + tal:attributes=
> + Enable bug tracking.</a>
Why isn't this using the context's overview menu edit link that has
permission checking for rendering.
context/ menu:overview/ edit:fmt: url
The language looks wrong. We are interested in Configuring, not enabling.
I think this is for the bugs root page which may be fine in this case.
> === modified file 'lib/lp/ code/stories/ branches/ xx-product- branches. txt' code/stories/ branches/ xx-product- branches. txt 2010-01-08 14:22:42 +0000 code/stories/ branches/ xx-product- branches. txt 2010-03-19 16:20:16 +0000 open('http:// launchpad. dev/gnome- terminal') getLink( 'Change details').click() getLink( 'Configure Launchpad Branches').click() getControl(
> --- lib/lp/
> +++ lib/lp/
> @@ -170,7 +170,7 @@
> the 'Import your project' button is not shown.
>
> >>> admin_browser.
> - >>> admin_browser.
> + >>> admin_browser.
> >>> admin_browser.
> ... 'Code for this project is published in Bazaar branches '
> ... 'on Launchpad').click()
I do not like the use of "Launchpad" in these links. They imply the project
is setting up hosting when we are really interested in gathering project info.
I have dealt with several angry, confused users who see Launchpad masquerading
or is forking project. I think taking "Launchpad" out of the link will make
it clear we want the know where the upstream branch is.
> === modified file 'lib/lp/ registry/ browser/ pillar. py' registry/ browser/ pillar. py 2010-02-17 11:19:42 +0000 registry/ browser/ pillar. py 2010-03-19 16:20:16 +0000
> --- lib/lp/
> +++ lib/lp/
> @@ -128,6 +130,78 @@ navigation. values( ) if link.enabled], 'sort_key' )) disabled_ links(self) : disabled_ link_names attribute to change self).navigatio n disabled_ link_names] 'sort_key' ))
> link for link in menuapi.
> key=attrgetter(
>
> + @cachedproperty
> + def visible_
> + """Important disabled links.
> +
> + These are displayed to notify the user to provide configuration
> + info to enable the links.
> +
> + Override the visible_
> + the results.
> + """
> + involved_menu = MenuAPI(
> + important_links = [
> + involved_menu[name]
> + for name in self.visible_
> + return sorted([
> + link for link in important_links if not link.enabled],
> + key=attrgetter(
+
Are the "[]" required? sorted() accepts a generator which is what the first
argument provides.
> +# This class can't be moved into the browser/product.py file, since enabled_ links not working. entView( PillarView) : disabled_ link_names = ['submit_code'] volvementView, self)._ _init__ (context, request) codehosting = ( development_ focus.branch is not None) links(self) : self.context) .overview self.context. development_ focus). overview answers' , bugtracker' , translations' , names] menu['link_ branch' ] links.append( link_branch) 'sort_key' ))
> +# the pillar-views.txt test will fail due to the MenuAPI adapter
> +# for PillarView.
> +class ProductInvolvem
> + """Encourage configuration of involvement links for projects."""
> +
> + has_involvement = True
> + visible_
> +
> + def __init__(self, context, request):
> + super(ProductIn
> + self.official_
> + self.context.
> +
> + @property
> + def configuration_
> + """The enabled involvement links."""
> + overview_menu = MenuAPI(
> + series_menu = MenuAPI(
> + configuration_names = [
> + 'configure_
> + 'configure_
> + 'configure_
> + ]
> + configuration_links = [
> + overview_menu[name] for name in configuration_
> + link_branch = series_
> + link_branch.text = 'Configure project branch'
> + configuration_
> + return sorted([
> + link for link in configuration_links if link.enabled],
> + key=attrgetter(
Are the brackets required in this sorted()?
> === modified file 'lib/lp/ registry/ browser/ product. py' registry/ browser/ product. py 2010-03-09 00:46:37 +0000 registry/ browser/ product. py 2010-03-19 16:20:16 +0000
> --- lib/lp/
> +++ lib/lp/
> @@ -331,6 +337,30 @@ with_permission ('launchpad. Edit') bugtracker( self): configure- bugtracker' , text, summary, icon='edit')
> return Link('+edit', text, icon='edit')
>
> @enabled_
> + def configure_
> + text = 'Configure project bugtracker'
> + summary = 'Allow users to report bugs on this project'
> + return Link('+
Our intent it to know where bugs are tracked, and possibly use launchpad.
The problem we have at this moment is that it is not possible to set the
upstream contact without also enabling launchpad bug tracking...making it
impossible for Ubuntu to who to contact when the project does not use
launchpad bugs.
> + @enabled_ with_permission ('launchpad. Edit') answers( self): configure- answers' , text, summary, icon='edit')
> + def configure_
> + text = 'Configure project answers'
> + summary = 'Allow users to ask questions on this project'
> + return Link('+
Maybe we want to use the generic term "support tracker". Answers was called
Support and questions "tickets" in Launchpad beta.
> + @enabled_ with_permission ('launchpad. Edit') blueprints( self): configure- blueprints' , text, summary, icon='edit')
> + def configure_
> + text = 'Configure project blueprints'
> + summary = 'Allow users to submit blueprints on this project'
> + return Link('+
Specifications and meetings tracking is what this enables.
> === modified file 'lib/lp/ registry/ stories/ product/ xx-product- launchpad- usage.txt' registry/ stories/ product/ xx-product- launchpad- usage.txt 2010-01-20 23:10:13 +0000 registry/ stories/ product/ xx-product- launchpad- usage.txt 2010-03-19 16:20:16 +0000 browser. open('http:// launchpad. dev/firefox') browser. getLink( 'Change details').click() browser. getLink( 'Configure Launchpad Bugs').click()
> --- lib/lp/
> +++ lib/lp/
> @@ -28,20 +28,14 @@
> >>> registrant_browser = setupBrowser(
> ... auth='Basic <email address hidden>:test')
> >>> registrant_
> - >>> registrant_
> + >>> registrant_
I think users will provide the information is we use common terms:
Configure bug tracking