Previously, only objects which had a Navigation class would be appended
to request.traversed_objects upon traversal. From now on, any traversed
objects will be appended there, including the views. This fixes https://bugs.edge.launchpad.net/bugs/423898
Since we now have the view in traversed_objects, we can just use
its .page_title (falling back to its entry on pagetitles.py) as the text
of the leaf breadcrumb. Like before, though, this leaf breadcrumb is
only added when the view is not the default one for the context.
== Implementation details ==
MultiStepViews don't define a .page_title because what actually gets
rendered is the (step) view that they contain, and those define
a .page_title. However, we don't want to do that when looking up the
text for the breadcrumbs, so MultiStepViews are now required to provide
a .page_title.
Some tests from doc/navigation.txt where moved to
webapp/tests/test_publication.py and others to
webapp/tests/test_servers.py
== Tests ==
./bin/test -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.
lib/canonical/launchpad/webapp/publication.py
551: [E1002,
LaunchpadBrowserPublication.beginErrorHandlingTransaction] Use super on
an old style class
lib/lp/registry/browser/product.py
57: [F0401] Unable to import 'lazr.delegates' (No module named
delegates)
lib/lp/bugs/browser/bugalsoaffects.py
21: [F0401] Unable to import 'lazr.enum' (No module named enum)
22: [F0401] Unable to import 'lazr.lifecycle.event' (No module named
lifecycle)
lib/canonical/launchpad/webapp/tales.py
23: [F0401] Unable to import 'lazr.enum' (No module named enum)
= Summary =
Change text of leaf breadcrumbs from the page name (+export, etc) to its /bugs.edge. launchpad. net/bugs/ 423691
title, fixing https:/
== Proposed fix ==
Previously, only objects which had a Navigation class would be appended traversed_ objects upon traversal. From now on, any traversed /bugs.edge. launchpad. net/bugs/ 423898
to request.
objects will be appended there, including the views. This fixes
https:/
Since we now have the view in traversed_objects, we can just use
its .page_title (falling back to its entry on pagetitles.py) as the text
of the leaf breadcrumb. Like before, though, this leaf breadcrumb is
only added when the view is not the default one for the context.
== Implementation details ==
MultiStepViews don't define a .page_title because what actually gets
rendered is the (step) view that they contain, and those define
a .page_title. However, we don't want to do that when looking up the
text for the breadcrumbs, so MultiStepViews are now required to provide
a .page_title.
Some tests from doc/navigation.txt where moved to tests/test_ publication. py and others to tests/test_ servers. py
webapp/
webapp/
== Tests ==
./bin/test -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: /launchpad/ webapp/ publication. py /launchpad/ webapp/ tests/test_ publication. py translations/ browser/ tests/test_ breadcrumbs. py /launchpad/ webapp/ tests/breadcrum bs.py /launchpad/ webapp/ publisher. py /launchpad/ webapp/ tests/test_ breadcrumbs. py /launchpad/ browser/ multistep. py registry/ browser/ product. py soyuz/stories/ soyuz/xx- builder- page.txt /launchpad/ browser/ launchpad. py bugs/browser/ bugalsoaffects. py translations/ browser/ pofile. py soyuz/stories/ ppa/xx- ppa-navigation. txt registry/ stories/ distribution/ xx-distribution -packages. txt bugs/browser/ cve.py /lazr/testing/ menus.py soyuz/stories/ ppa/xx- ppa-packages. txt registry/ browser/ branding. py /launchpad/ webapp/ tales.py /launchpad/ doc/navigation. txt /launchpad/ doc/hierarchica l-menu. txt /launchpad/ webapp/ tests/test_ servers. py bugs/browser/ tests/test_ breadcrumbs. py soyuz/stories/ soyuz/xx- buildfarm- index.txt
lib/canonical
lib/canonical
lib/lp/
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/lp/
lib/lp/
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/canonical
lib/lp/
lib/lp/
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/lp/
lib/lp/
== Pylint notices ==
lib/canonical/ launchpad/ webapp/ publication. py rPublication. beginErrorHandl ingTransaction] Use super on
551: [E1002,
LaunchpadBrowse
an old style class
lib/lp/ registry/ browser/ product. py
57: [F0401] Unable to import 'lazr.delegates' (No module named
delegates)
lib/lp/ bugs/browser/ bugalsoaffects. py .event' (No module named
21: [F0401] Unable to import 'lazr.enum' (No module named enum)
22: [F0401] Unable to import 'lazr.lifecycle
lifecycle)
lib/canonical/ launchpad/ webapp/ tales.py
23: [F0401] Unable to import 'lazr.enum' (No module named enum)