This change looks great. I see I see extra white space between the download
portlet and announcements.
I think we need a model change to support this :( I an configure Answers to
not be official and my application may not be translatable. So the progress
bar will never be complete. Consider Launchpad. It does not have a po file,
so it cannot be translated, but the UI requires me to set translations to be
official to make the bar be complete. I think we need to None, True, or False
to make this work. I am seeing this same issue my the feature I am working
on. I propose we switch from bool to a vocab or UNKNOWN, LAUNCHPAD, EXTERNAL.
We may only need this some of the apps.
I have a lot of concern about the implementation. I do not think ILink, its
model, and template needed to change. I certainly do not think we should
be making invalid HTML on all Launchpad pages for a single portlet that
appears on one page. I think the fix is easy, but I have not spent a lot
of time looking at the issue.
This looks scary. I think it is wrong. This file is used to adapt every link,
and most links are inline text.
/me runs lp
This cannot land. It is create tables in paragraphs and inline markup that
cannot contain tables.
Since we are designing a presentation that will appear on exactly one page
and we have not discussed reusing it. I expected to see either a subclass
or some form of delegates so that the portlet's needs did not step on any
other part of launchpad. The Involvement portlet is already a bundle of
exceptions for menus and does its own layout. I think the view and existing
template could be doing all the work.
Maybe we should have looked closer at why the Involvement used CSS to place
a right aligned background image.
...
> === modified file 'lib/canonical/launchpad/webapp/interfaces.py'
> --- lib/canonical/launchpad/webapp/interfaces.py 2010-07-21 08:15:57 +0000
> +++ lib/canonical/launchpad/webapp/interfaces.py 2010-07-26 22:01:07 +0000
> @@ -238,6 +238,10 @@
> icon_url = Attribute(
> "The full URL for this link's associated icon, if it has one.")
>
> + configured = Attribute(
> + "Whether the item has been configured yet. If None, no indicator is"
> + "used. Otherwise it is a boolean.")
> +
> def render():
> """Return a HTML representation of the link."""
We have one use case for this.
/me thinks the 'menu' arg is not used in Lp anymore.
> @@ -121,6 +121,9 @@
> 'blueprint' for a specific site.
>
> :param menu: The sub menu used by the page that the link represents.
> +
> + :parem configured: Whether the item has been configured. If not None,
> + then show a boolean indicator for configured or not configured.
Why was this removed? Does this relate to the issue that we were not
seeing a strong indication that no one every configured translations, etc...?
> + show_progress = True
> +
> + @property
> + def visible_disabled_link_names(self):
> + """Show all disabled links...except blueprints"""
> + involved_menu = MenuAPI(self).navigation
> + all_links = involved_menu.keys()
> + # The register blueprints link should not be shown since its use is
> + # not encouraged.
> + all_links.remove('register_blueprint')
> + return all_links
> +
> + @cachedproperty
> + def configuration_states(self):
> + """Create a dictionary indicating the configuration statuses.
> +
> + Each app area will be represented in the return dictionary, except
> + blueprints which we are not currently promoting.
> + """
> + states = {}
> + states['configure_bugtracker'] = (
> + self.official_malone or self.context.bugtracker is not None)
> + states['configure_answers'] = self.official_answers
> + states['configure_translations'] = self.official_rosetta
> + states['configure_codehosting'] = (
> + self.context.development_focus.branch is not None)
> + return states
I think this work shows that the view is really doing the work and since
it has a special template for rendering itself, ILink and models and templates
do not need to change.
Hi Brad.
This change looks great. I see I see extra white space between the download
portlet and announcements.
I think we need a model change to support this :( I an configure Answers to
not be official and my application may not be translatable. So the progress
bar will never be complete. Consider Launchpad. It does not have a po file,
so it cannot be translated, but the UI requires me to set translations to be
official to make the bar be complete. I think we need to None, True, or False
to make this work. I am seeing this same issue my the feature I am working
on. I propose we switch from bool to a vocab or UNKNOWN, LAUNCHPAD, EXTERNAL.
We may only need this some of the apps.
I have a lot of concern about the implementation. I do not think ILink, its
model, and template needed to change. I certainly do not think we should
be making invalid HTML on all Launchpad pages for a single portlet that
appears on one page. I think the fix is easy, but I have not spent a lot
of time looking at the issue.
> === modified file 'lib/canonical/ launchpad/ icing/style- 3-0.css. in' launchpad/ icing/style- 3-0.css. in 2010-07-26 14:48:43 +0000 launchpad/ icing/style- 3-0.css. in 2010-07-26 22:01:07 +0000
> --- lib/canonical/
> +++ lib/canonical/
> @@ -686,6 +686,13 @@
> margin: 0;
> padding: 0;
> }
> +div.centered {
> + text-align: center;
> + }
> +div.centered table {
> + margin: 0 auto;
> + text-align: left;
> + }
We used to have rules like this for the 1.0 layouts. I guess It was naive
of me to remove them.
> === modified file 'lib/canonical/ launchpad/ templates/ launchpad- inline- link.pt' launchpad/ templates/ launchpad- inline- link.pt 2009-08-27 02:22:07 +0000 launchpad/ templates/ launchpad- inline- link.pt 2010-07-26 22:01:07 +0000 xml.zope. org/namespaces/ tal" "context/ enabled" > "context/ linked" ><a "context/ linked" >
> --- lib/canonical/
> +++ lib/canonical/
> @@ -2,8 +2,10 @@
> xmlns:tal="http://
> condition=
> <tal:link-linked
> - condition=
> - href="" class="" title=""
> + condition=
> + <table width="100%"><tr>
> + <td width="90%">
> + <a href="" class="" title=""
This looks scary. I think it is wrong. This file is used to adapt every link,
and most links are inline text.
/me runs lp
This cannot land. It is create tables in paragraphs and inline markup that
cannot contain tables.
Since we are designing a presentation that will appear on exactly one page
and we have not discussed reusing it. I expected to see either a subclass
or some form of delegates so that the portlet's needs did not step on any
other part of launchpad. The Involvement portlet is already a bundle of
exceptions for menus and does its own layout. I think the view and existing
template could be doing all the work.
Maybe we should have looked closer at why the Involvement used CSS to place
a right aligned background image.
...
> === modified file 'lib/canonical/ launchpad/ webapp/ interfaces. py' launchpad/ webapp/ interfaces. py 2010-07-21 08:15:57 +0000 launchpad/ webapp/ interfaces. py 2010-07-26 22:01:07 +0000
> --- lib/canonical/
> +++ lib/canonical/
> @@ -238,6 +238,10 @@
> icon_url = Attribute(
> "The full URL for this link's associated icon, if it has one.")
>
> + configured = Attribute(
> + "Whether the item has been configured yet. If None, no indicator is"
> + "used. Otherwise it is a boolean.")
> +
> def render():
> """Return a HTML representation of the link."""
We have one use case for this.
/me thinks the 'menu' arg is not used in Lp anymore.
> === modified file 'lib/canonical/ launchpad/ webapp/ menu.py' launchpad/ webapp/ menu.py 2010-06-15 19:35:41 +0000 launchpad/ webapp/ menu.py 2010-07-26 22:01:07 +0000
> --- lib/canonical/
> +++ lib/canonical/
...
> @@ -121,6 +121,9 @@
> 'blueprint' for a specific site.
>
> :param menu: The sub menu used by the page that the link represents.
> +
> + :parem configured: Whether the item has been configured. If not None,
> + then show a boolean indicator for configured or not configured.
grammar: s/parem/param/
...
> @@ -171,6 +175,13 @@ self, value): configured = value self): configured get_configured, set_configured)
> else:
> return cgi.escape(text)
>
> + def set_configured(
> + self._linkdata.
> + def get_configured(
> + return self._linkdata.
> +
> + configured = property(
PEP 8 will remind you to have a blank line between methods.
I do not think these changes are needed.
...
> === modified file 'lib/lp/ registry/ browser/ product. py' registry/ browser/ product. py 2010-07-09 10:22:32 +0000 registry/ browser/ product. py 2010-07-26 22:01:07 +0000 disabled_ link_names = ['submit_code']
> --- lib/lp/
> +++ lib/lp/
> @@ -349,7 +349,33 @@
> """Encourage configuration of involvement links for projects."""
>
> has_involvement = True
> - visible_
Why was this removed? Does this relate to the issue that we were not
seeing a strong indication that no one every configured translations, etc...?
> + show_progress = True disabled_ link_names( self): self).navigatio n menu.keys( ) remove( 'register_ blueprint' ) states( self): 'configure_ bugtracker' ] = ( malone or self.context. bugtracker is not None) 'configure_ answers' ] = self.official_ answers 'configure_ translations' ] = self.official_ rosetta 'configure_ codehosting' ] = ( development_ focus.branch is not None)
> +
> + @property
> + def visible_
> + """Show all disabled links...except blueprints"""
> + involved_menu = MenuAPI(
> + all_links = involved_
> + # The register blueprints link should not be shown since its use is
> + # not encouraged.
> + all_links.
> + return all_links
> +
> + @cachedproperty
> + def configuration_
> + """Create a dictionary indicating the configuration statuses.
> +
> + Each app area will be represented in the return dictionary, except
> + blueprints which we are not currently promoting.
> + """
> + states = {}
> + states[
> + self.official_
> + states[
> + states[
> + states[
> + self.context.
> + return states
I think this work shows that the view is really doing the work and since
it has a special template for rendering itself, ILink and models and templates
do not need to change.
...
> === modified file 'lib/lp/ registry/ stories/ product/ xx-product- files.txt' registry/ stories/ product/ xx-product- files.txt 2010-01-15 21:44:23 +0000 registry/ stories/ product/ xx-product- files.txt 2010-07-26 22:01:07 +0000
> --- lib/lp/
> +++ lib/lp/
Revert this change
> === modified file 'lib/lp/ registry/ templates/ pillar- involvement- portlet. pt' registry/ templates/ pillar- involvement- portlet. pt 2010-06-15 19:37:37 +0000 registry/ templates/ pillar- involvement- portlet. pt 2010-07-26 22:01:07 +0000 "context/ required: launchpad. Edit"> configuration "registration" "registration view/registrati on_completeness ">
> --- lib/lp/
> +++ lib/lp/
> @@ -31,6 +31,29 @@
> </tal:disabled>
> </ul>
>
> + <tal:editor tal:condition=
> + <tal:show_
> + tal:condition=
> + tal:define=
> + <h2>Configuration Progress</h2>
> + <div class="centered">
> + <table width="80%" border="1">
Width and border attributes are deprecated. Use style.
I think this is the one template that needs to be making these special links:
I see:
<ul tal:condition= "view/configura tion_links" style="padding-top: 1em"> ion_links" > "structure link/fmt:link" />
<li tal:repeat="link view/configurat
<a tal:replace=
</li>
</ul>
If view/configurat ion_links returned a dict of link and state then:
<ul tal:condition= "view/configura tion_links" style="padding-top: 1em"> "configured_ link view/configurat ion_links" > "structure configured_ link/link/ fmt:link" /> @/${configured_ link/configured }" />
<li tal:repeat=
<table>
<tr>
<td>
<a tal:replace=
</td>
<td>
<img src="/@
</td>
</li>
</ul>
Or using css:
<ul tal:condition= "view/configura tion_links" style="padding-top: 1em"> "configured_ link view/configurat ion_links" s="class configured_ link/css_ state"> "structure configured_ link/link/ fmt:link" />
<li tal:repeat=
attribute
<a tal:replace=
</li>
</ul>
...
> === modified file 'lib/lp/ registry/ tests/test_ product. py' registry/ tests/test_ product. py 2010-04-21 16:15:36 +0000 registry/ tests/test_ product. py 2010-07-26 22:01:07 +0000
> --- lib/lp/
> +++ lib/lp/
Revert this.