Code review comment for lp:~sinzui/launchpad/distroseries-breadcrumb-bug-400643

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

This is my branch to switch the distroseries breadcrumb and all displays
of version to display as Lucid (10.04).

    lp:~sinzui/launchpad/distroseries-breadcrumb-bug-400643
    Diff size: 842 (500 lines are mechanical changes)
    Launchpad bug: https://bugs.launchpad.net/bugs/400643
    Test command: ./bin/test -vv
        -t "reg.*(doc/distroseries|test_breadcrumbs)"
        -t "xx-product-package-pages"
        -t "xx-rosetta-homepage|xx-distribution-translations"
    Pre-implementation: beuno, barry
    Target release: 3.1.11

= Switch the distroseries breadcrumb from a version or a code name =

When browsing Debian packaging branches Launchpad shows a numeric identifier
in the quick menu at the top of the page.

E.g. <https://launchpad.net/debian/sid/+source/bzr> shows
Launchpad > Debian > 98 > “bzr” package

After discussing the issue with Martin and Barry, it was decided that we
want to show the association between the version and the commonly used code
name, and we want to fix all the callsites.

== Rules ==

    * The code name should be shown with the version. Since both they are
      interchangable, they should be show together and shown consistently
      in this format: Codename (n.nn)
    * Add named_version to the Distroseries object to ensure consistent
      presentation.
    * Update all places that show just the version to also show the codename
    * Update places that use quotes or place the codename in parentheses to
      use named_version

== QA ==

Breadcrumbs and title:
    * Visit https://edge.launchpad.net/ubuntu/lucid/+source/bzr
    * Verify the breadcrumbs are:
      Ubuntu >> Lucid (10.04) >> "bzr" source package

Product packaging version:
    * Visit https://edge.launchpad.net/bzr/+packages
    * Verify the distroseries is listed as Lucid (10.04)

Translations version:
    * Visit http://edge.translations.launchpad.net/
    * Verify the distroseries is listed as Lucid (10.04)
    * Visit http://edge.translations.launchpad.net/ubuntu/lucid/+lang/pt_BR
    * Verify the distroseries is listed as Lucid (10.04)

Soyuz PPA version:
    * Visit https://edge.launchpad.net/ubuntu/+ppas
    * Verify the distroseries is listed as Lucid (10.04)

== Lint ==

Linting changed files:
  lib/lp/answers/stories/question-answers-vhost.txt
  lib/lp/answers/stories/question-overview.txt
  lib/lp/registry/browser/configure.zcml
  lib/lp/registry/browser/distroseries.py
  lib/lp/registry/browser/tests/test_breadcrumbs.py
  lib/lp/registry/doc/distroseries.txt
  lib/lp/registry/interfaces/distroseries.py
  lib/lp/registry/model/distroseries.py
  lib/lp/registry/stories/distribution/xx-distribution-packages.txt
  lib/lp/registry/stories/distroseries/xx-distroseries-index.txt
  lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt
  lib/lp/registry/stories/product/xx-product-package-pages.txt
  lib/lp/registry/templates/distribution-series.pt
  lib/lp/registry/templates/distroseries-details.pt
  lib/lp/registry/templates/product-distros.pt
  lib/lp/registry/templates/product-packages.pt
  lib/lp/soyuz/stories/distroseries/add-architecture.txt
  lib/lp/soyuz/stories/packaging/package-pages-navigation.txt
  lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
  lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt
  lib/lp/soyuz/stories/soyuz/xx-distroarchseries.txt
  lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt
  lib/lp/soyuz/stories/soyuz/xx-person-packages.txt
  lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt
  lib/lp/soyuz/templates/distribution-portlet-ppa-architectures.pt
  lib/lp/translations/browser/tests/test_breadcrumbs.py
  lib/lp/translations/stories/distribution/xx-distribution-translations.txt
  lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt
  lib/lp/translations/stories/standalone/xx-rosetta-homepage.txt
  lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt
  lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt
  lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt
  lib/lp/translations/templates/distribution-translations.pt
  lib/lp/translations/templates/rosetta-index.pt

== Test ==

Changes to verify new behaviour:

    * lib/lp/registry/browser/tests/test_breadcrumbs.py
      * Added a test to verify that the breadcrumb text is a named_version.
    * lib/lp/registry/doc/distroseries.txt
      * Added a test to verify all the identifying names for a distroseries.
      * Yes, the many names are insane. There are several related bugs dating
        to 2005 about the need to sanitise pillar and series attributes.
    * lib/lp/registry/stories/product/xx-product-package-pages.txt
      * Updated test to verify that the named version is in the correct order.
    * lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
      * Updated test to verify that the named version used.
    * lib/lp/translations/stories/standalone/xx-rosetta-homepage.txt
      * Updated test to verify that the named version used.
    * lib/lp/translations/stories/distribution/xx-distribution-translations.txt
      * Updated test to verify that the named version used.

Mechanical updates to page titles which include the breadcrumb:

    * lib/lp/answers/stories/question-answers-vhost.txt
    * lib/lp/answers/stories/question-overview.txt
    * lib/lp/registry/stories/distroseries/xx-distroseries-index.txt
    * lib/lp/registry/stories/distribution/xx-distribution-packages.txt
    * lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt
    * lib/lp/soyuz/stories/distroseries/add-architecture.txt
    * lib/lp/soyuz/stories/packaging/package-pages-navigation.txt
    * lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt
    * lib/lp/soyuz/stories/soyuz/xx-distroarchseries.txt
    * lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt
    * lib/lp/soyuz/stories/soyuz/xx-person-packages.txt
    * lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt
    * lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt
    * lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt
    * lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt
    * lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt
    * lib/lp/translations/browser/tests/test_breadcrumbs.py

== Implementation ==

    * lib/lp/registry/browser/configure.zcml
      * Removed unused portlet.
    * lib/lp/registry/browser/distroseries.py
      * Updated the breadcrumb rule to use distroseries.named_version.
    * lib/lp/registry/interfaces/distroseries.py
      * Added named_version.
    * lib/lp/registry/model/distroseries.py
      * Defined named_version.
    * lib/lp/registry/templates/distribution-portlet-series.pt
      * Removed unused portlet.

Updated the following templates to use named_version instead of version.

    * lib/lp/registry/templates/distribution-series.pt
    * lib/lp/registry/templates/distroseries-details.pt
    * lib/lp/registry/templates/product-distros.pt
    * lib/lp/registry/templates/product-packages.pt
    * lib/lp/soyuz/templates/distribution-portlet-ppa-architectures.pt
    * lib/lp/translations/templates/distribution-translations.pt
    * lib/lp/translations/templates/rosetta-index.pt

« Back to merge proposal