Code review comment for lp://staging/~sinzui/launchpad/announcement-edits

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

This is my branch to update announcement modification pages to UI 3.0.

Note that this branch depends upon
lp:~sinzui/launchpad/base-layout-bug-407052
which is approved, but not landed yet. That branch provides the base
layout,
navigation menu, and form changes for to support the 3.0 UI for edit
pages.

    lp:~sinzui/launchpad/announcement-edits
    Diff size: 293
    Launchpad bug: https://bugs.launchpad.net/bugs/407416
    Test command: ./bin/test -vvt "stories/announcement"
    Pre-implementation: beuno
    Target release: 2.2.8

= Update announcement modification pages to UI 3.0 =

This work was split from bug #399010 Update simple edit pages to
base-layout
because the effort was too large to do in one branch.

This branch implicitly fixes
Bug #297877 Announcement/+{retarget,delete,retract,publish} don't say on
    which announcement they will operate

because base-layout provides the context.title as a <h1> if it was not
provided. This behaviour fixes a lot of forms.

== Rules ==

* Switch the pages to use the main_only layout
* Replace the context menu with a navigation menu displayed as related
  links list.

== QA ==

Visit edge or staging.
    * Visit
https://edge.launchpad.net/launchpad-project/+announcement/3086
    * Choose Modify announcement.
      * Verify the announcements title is shown, "Launchpad 2.2.6
released" as
        the <h1>
      * Verify there is a list of links to the other modification pages
below
        the form.
    * Choose Retract announcement.
      * Verify the announcements title is shown, "Launchpad 2.2.6
released"
        as the <h1>
      * Verify there is a list of links to the other modification pages
below
        the form.
    * Choose Move announcement.
      * Verify the announcements title is shown, "Launchpad 2.2.6
released"
        as the <h1>
      * Verify there is a list of links to the other modification pages
below
        the form.
    * Choose Delete announcement.
      * Verify the announcements title is shown, "Launchpad 2.2.6
released" as
        the <h1>
      * Verify there is a list of links to the other modification pages
below
        the form.

== Lint ==

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

Linting changed files:
  lib/lp/registry/browser/announcement.py
  lib/lp/registry/browser/configure.zcml
  lib/lp/registry/stories/announcements/xx-announcements.txt
  lib/lp/registry/templates/announcement-delete.pt
  lib/lp/registry/templates/announcement-edit.pt
  lib/lp/registry/templates/announcement-retarget.pt
  lib/lp/registry/templates/announcement-retract.pt

== Test ==

    * lib/lp/registry/stories/announcements/xx-announcements.txt
      * Updated the test because I changed the wording of the Move
        announcement link to be consistent with other links

== Implementation ==

    * lib/lp/registry/browser/announcement.py
      * refactored the context menu to use a mixin. Used the same mixin
        to create a navigation menu that will generate the list of
related
        pages
    * lib/lp/registry/browser/configure.zcml
      * Registered the new navigation menu.
    * lib/lp/registry/templates/announcement-delete.pt
      * Switched the layout.
      * Added a call to render the related pages.
    * lib/lp/registry/templates/announcement-edit.pt
      * Switched the layout.
      * Added a call to render the related pages.
      * Removed the move announcement message because the link is more
        prominent now.
    * lib/lp/registry/templates/announcement-retarget.pt
      * Switched the layout.
      * Added a call to render the related pages.
    * lib/lp/registry/templates/announcement-retract.pt
      * Switched the layout.
      * Added a call to render the related pages.

« Back to merge proposal