Merge lp:~edwin-grubbs/launchpad/bug-426899-ppa-links into lp:launchpad

Proposed by Edwin Grubbs
Status: Merged
Approved by: Edwin Grubbs
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~edwin-grubbs/launchpad/bug-426899-ppa-links
Merge into: lp:launchpad
Diff against target: 207 lines
5 files modified
lib/lp/registry/browser/person.py (+11/-10)
lib/lp/registry/templates/person-index.pt (+9/-14)
lib/lp/registry/templates/person-related-software-navlinks.pt (+20/-11)
lib/lp/registry/templates/team-index.pt (+11/-12)
lib/lp/soyuz/stories/soyuz/xx-person-packages.txt (+8/-8)
To merge this branch: bzr merge lp:~edwin-grubbs/launchpad/bug-426899-ppa-links
Reviewer Review Type Date Requested Status
Paul Hummer (community) ui Approve
Curtis Hovey (community) ui Approve
Eleanor Berger (community) code Approve
Michael Nelson ui Pending
Review via email: mp+13505@code.launchpad.net

Commit message

Made the links to software and packages related to a person clearer and hid links when the page is empty.

To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Summary
-------

Instead of having multiple links for "Related projects", "PPA Packages", and
"Uploaded packages" on the person/team index page, there is now one "Related
software and packages" link that takes you to the +related-software page where
you can navigate to all the other pages.

The links on the +related-software page are now only displayed when there
are entries for "Uploaded packages", etc.

Tests
-----

./bin/test -vv -t xx-person-packages.txt

Demo and Q/A
------------

* Open http://launchpad.dev/~mark
    * Should have a "Related software and packages" link underneath the branding.
* Open http://launchpad.dev/~mark/+related-software
    * There should be five links at the top of this page, and the link for
      the page you are on should be delinkified to show which page you are on.
        * Related software
        * Maintained packages
        * Uploaded packages
        * PPA packages
        * Related projects
* Open http://launchpad.dev/~guadamen/
    * Should have a "Related software and packages" link underneath the branding.
* Open http://launchpad.dev/~guadamen/+related-software
    * Should just show the "Related software" link which is delinkified (plain
      text) since guadamen doesn't have any packages.

Revision history for this message
Eleanor Berger (intellectronica) wrote :

Nice branch, everything looks good to me. Don't forget to close bug #426900 if it is no longer relevant.

review: Approve (code)
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Here are some screenshots for the UI review.

The person page with the "Related software and packages" link. The team index page will look the same, although there won't be an "Authorized applications" link nearby.
  https://chinstrap.canonical.com/~egrubbs/person_index_page.png

The +related-software page with four links to the right of "Related software", which is not a link to indicate that you are on that page.
  https://chinstrap.canonical.com/~egrubbs/person_related_software_page.png

A team with no links to the right of "Related software" since it has none.
  https://chinstrap.canonical.com/~egrubbs/team_with_no_related_software.png

Revision history for this message
Curtis Hovey (sinzui) wrote :

Hi Edwin.

Thanks for making these screencaps.
    * I like the profile page change.
    * I really think that the link to "PPA packages related to Curtis Hovey" should be
      (i) Related PPA packages
      Because the link implies my PPA when the page title says it is about packages in related PPAs.
    * I am pleased that we are not making links to useless pages.

review: Approve (ui)
Revision history for this message
Paul Hummer (rockstar) wrote :

Looks good.

review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2009-10-13 14:25:20 +0000
+++ lib/lp/registry/browser/person.py 2009-10-20 02:28:14 +0000
@@ -842,7 +842,7 @@
842842
843 def related_software_summary(self):843 def related_software_summary(self):
844 target = '+related-software'844 target = '+related-software'
845 text = 'Summary'845 text = 'Related software'
846 return Link(target, text, icon='info')846 return Link(target, text, icon='info')
847847
848 def maintained(self):848 def maintained(self):
@@ -854,21 +854,21 @@
854 def uploaded(self):854 def uploaded(self):
855 target = '+uploaded-packages'855 target = '+uploaded-packages'
856 text = 'Uploaded packages'856 text = 'Uploaded packages'
857 return Link(target, text, icon='info')857 enabled = bool(
858 self.person.getLatestUploadedButNotMaintainedPackages())
859 return Link(target, text, enabled=enabled, icon='info')
858860
859 def ppa(self):861 def ppa(self):
860 # XXX: salgado, 2009-09-09, bug=426899: Need to conditionally disable
861 # this link.
862 target = '+ppa-packages'862 target = '+ppa-packages'
863 text = 'PPA packages'863 text = 'Related PPA packages'
864 return Link(target, text, icon='info')864 enabled = bool(self.person.getLatestUploadedPPAPackages())
865 return Link(target, text, enabled=enabled, icon='info')
865866
866 def projects(self):867 def projects(self):
867 # XXX: salgado, 2009-09-09, bug=426900: Need to conditionally disable
868 # this link.
869 target = '+related-projects'868 target = '+related-projects'
870 text = 'Related projects'869 text = 'Related projects'
871 return Link(target, text, icon='info')870 enabled = bool(self.person.getOwnedOrDrivenPillars())
871 return Link(target, text, enabled=enabled, icon='info')
872872
873873
874class PersonMenuMixin(CommonMenuLinks):874class PersonMenuMixin(CommonMenuLinks):
@@ -1253,7 +1253,8 @@
1253 'editemail', 'configure_mailing_list', 'moderate_mailing_list',1253 'editemail', 'configure_mailing_list', 'moderate_mailing_list',
1254 'editlanguages', 'map', 'polls',1254 'editlanguages', 'map', 'polls',
1255 'add_poll', 'join', 'leave', 'add_my_teams',1255 'add_poll', 'join', 'leave', 'add_my_teams',
1256 'reassign', 'projects', 'activate_ppa', 'maintained', 'ppa']1256 'reassign', 'projects', 'activate_ppa', 'maintained', 'ppa',
1257 'related_software_summary']
12571258
12581259
1259class TeamOverviewNavigationMenu(NavigationMenu, TeamMenuMixin):1260class TeamOverviewNavigationMenu(NavigationMenu, TeamMenuMixin):
12601261
=== modified file 'lib/lp/registry/templates/person-index.pt'
--- lib/lp/registry/templates/person-index.pt 2009-09-18 21:25:39 +0000
+++ lib/lp/registry/templates/person-index.pt 2009-10-20 02:28:14 +0000
@@ -88,22 +88,17 @@
88 tal:content="structure context/homepage_content/fmt:text-to-html"88 tal:content="structure context/homepage_content/fmt:text-to-html"
89 />89 />
90 <ul class="horizontal">90 <ul class="horizontal">
91 <tal:comment condition="nothing">
92 This link name is different from the menu, since it refers
93 to several pages that are all accessible when you click on this link.
94 </tal:comment>
91 <li95 <li
92 tal:define="link context/menu:overview/related_software_summary"96 tal:define="link context/menu:overview/related_software_summary"
93 tal:condition="link/enabled"97 tal:condition="link/enabled">
94 tal:content="structure link/fmt:link" />98 <a class="sprite info" tal:attributes="href link/fmt:url">
95 <li99 Related software and packages
96 tal:define="link context/menu:overview/projects"100 </a>
97 tal:condition="link/enabled"101 </li>
98 tal:content="structure link/fmt:link" />
99 <li
100 tal:define="link context/menu:overview/maintained"
101 tal:condition="link/enabled"
102 tal:content="structure link/fmt:link" />
103 <li
104 tal:define="link context/menu:overview/ppa"
105 tal:condition="link/enabled"
106 tal:content="structure link/fmt:link" />
107 <li102 <li
108 tal:define="link context/menu:overview/oauth_tokens"103 tal:define="link context/menu:overview/oauth_tokens"
109 tal:condition="link/enabled"104 tal:condition="link/enabled"
110105
=== modified file 'lib/lp/registry/templates/person-related-software-navlinks.pt'
--- lib/lp/registry/templates/person-related-software-navlinks.pt 2009-09-09 18:50:13 +0000
+++ lib/lp/registry/templates/person-related-software-navlinks.pt 2009-10-20 02:28:14 +0000
@@ -5,17 +5,26 @@
5 omit-tag="">5 omit-tag="">
66
7 <ul id="navlinks" class="horizontal">7 <ul id="navlinks" class="horizontal">
8 <li>8 <li
9 <a tal:replace="structure9 tal:define="link view/menu:navigation/related_software_summary"
10 view/menu:navigation/related_software_summary/render"/></li>10 tal:condition="link/enabled"
11 <li>11 tal:content="structure link/fmt:link" />
12 <a tal:replace="structure view/menu:navigation/maintained/render"/></li>12 <li
13 <li>13 tal:define="link view/menu:navigation/maintained"
14 <a tal:replace="structure view/menu:navigation/uploaded/render"/></li>14 tal:condition="link/enabled"
15 <li>15 tal:content="structure link/fmt:link" />
16 <a tal:replace="structure view/menu:navigation/ppa/render"/></li>16 <li
17 <li>17 tal:define="link view/menu:navigation/uploaded"
18 <a tal:replace="structure view/menu:navigation/projects/render"/></li>18 tal:condition="link/enabled"
19 tal:content="structure link/fmt:link" />
20 <li
21 tal:define="link view/menu:navigation/ppa"
22 tal:condition="link/enabled"
23 tal:content="structure link/fmt:link" />
24 <li
25 tal:define="link view/menu:navigation/projects"
26 tal:condition="link/enabled"
27 tal:content="structure link/fmt:link" />
19 </ul>28 </ul>
2029
21</tal:root>30</tal:root>
2231
=== modified file 'lib/lp/registry/templates/team-index.pt'
--- lib/lp/registry/templates/team-index.pt 2009-09-18 21:25:39 +0000
+++ lib/lp/registry/templates/team-index.pt 2009-10-20 02:28:14 +0000
@@ -59,18 +59,17 @@
59 tal:content="structure context/teamdescription/fmt:text-to-html"59 tal:content="structure context/teamdescription/fmt:text-to-html"
60 />60 />
61 <ul class="horizontal">61 <ul class="horizontal">
62 <li62 <tal:comment condition="nothing">
63 tal:define="link context/menu:overview/projects"63 This link name is different from the menu, since it refers
64 tal:condition="link/enabled"64 to several pages that are all accessible when you click on this link.
65 tal:content="structure link/fmt:link" />65 </tal:comment>
66 <li66 <li
67 tal:define="link context/menu:overview/maintained"67 tal:define="link context/menu:overview/related_software_summary"
68 tal:condition="link/enabled"68 tal:condition="link/enabled">
69 tal:content="structure link/fmt:link" />69 <a class="sprite info" tal:attributes="href link/fmt:url">
70 <li70 Related software and packages
71 tal:define="link context/menu:overview/ppa"71 </a>
72 tal:condition="link/enabled"72 </li>
73 tal:content="structure link/fmt:link" />
74 </ul>73 </ul>
7574
76 <div class="yui-g">75 <div class="yui-g">
7776
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-person-packages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2009-09-18 15:42:19 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2009-10-20 02:28:14 +0000
@@ -4,9 +4,9 @@
4that person's +related-software page, which is linked to from the4that person's +related-software page, which is linked to from the
5person's home page.5person's home page.
66
7 >>> browser.open("http://launchpad.dev/~name16/+related-software")7 >>> browser.open("http://launchpad.dev/~mark/+related-software")
8 >>> print browser.title8 >>> print browser.title
9 Software related to Foo Bar...9 Software related to Mark Shuttleworth...
1010
11This page is just a summary of the user's packages and will only11This page is just a summary of the user's packages and will only
12display up to the most recent 30 items in each category. However, it12display up to the most recent 30 items in each category. However, it
@@ -14,20 +14,20 @@
14where all items can be perused.14where all items can be perused.
1515
16 >>> print extract_text(find_tag_by_id(browser.contents, 'navlinks'))16 >>> print extract_text(find_tag_by_id(browser.contents, 'navlinks'))
17 Summary17 Related software
18 Maintained packages18 Maintained packages
19 Uploaded packages19 Uploaded packages
20 PPA packages20 Related PPA packages
21 Related projects21 Related projects
2222
23 >>> print browser.getLink("Maintained packages").url23 >>> print browser.getLink("Maintained packages").url
24 http://launchpad.dev/~name16/+maintained-packages24 http://launchpad.dev/~mark/+maintained-packages
25 >>> print browser.getLink("Uploaded packages").url25 >>> print browser.getLink("Uploaded packages").url
26 http://launchpad.dev/~name16/+uploaded-packages26 http://launchpad.dev/~mark/+uploaded-packages
27 >>> print browser.getLink("PPA packages").url27 >>> print browser.getLink("PPA packages").url
28 http://launchpad.dev/~name16/+ppa-packages28 http://launchpad.dev/~mark/+ppa-packages
29 >>> print browser.getLink("Related projects").url29 >>> print browser.getLink("Related projects").url
30 http://launchpad.dev/~name16/+related-projects30 http://launchpad.dev/~mark/+related-projects
3131
32Each category on the summary page has a heading that shows how many32Each category on the summary page has a heading that shows how many
33packages are being displayed.33packages are being displayed.