Code review comment for lp:~salgado/launchpad/breadcrumbs-for-leafs

Revision history for this message
Guilherme Salgado (salgado) wrote :

= Summary =

According to <https://wiki.canonical.com/Launchpad/UI/Navigation>, we'll
want breadcrumbs for the current page when it's not the default one for
the context, so this branch adds that.

== Proposed fix ==

Add a new method to the Hierarchy view, which builds an extra breadcrumb
for the requested page. This breadcrumb is then appended to the list of
breadcrumbs returned by Hierarchy.items

== Implementation details ==

We should be using the page's title as the breadcrumb's text, but that's
not easy to get programmatically as we need the template name to look up
the page title in pagetitles.py. Once our views have a page_title
attribute and we get rid of pagetitles.py, it'll be easy to change the
breadcrumb to use the page's title instead of its name.

== Tests ==

./bin/tests -vvt test_breadcrumbs

== Demo and Q/A ==

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/code/stories/branches/xx-branch-deletion.txt
  lib/canonical/launchpad/webapp/tests/test_breadcrumbs.py
  lib/lp/bugs/stories/bugs/xx-link-bug-to-branch.txt
  lib/lp/bugs/stories/bug-release-management/nomination-navigation.txt
  lib/canonical/launchpad/browser/launchpad.py
  lib/canonical/launchpad/webapp/breadcrumb.py
  lib/lp/bugs/stories/bugs/xx-bug-activity.txt
  lib/lp/registry/stories/foaf/xx-admin-person-review.txt
  lib/lp/registry/stories/product/xx-product-files.txt
  lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt
  lib/lp/bugs/browser/tests/test_breadcrumbs.py

== Pylint notices ==

lib/canonical/launchpad/browser/launchpad.py
    106: [F0401] Unable to import 'lazr.uri' (No module named uri)

« Back to merge proposal