This is my implementation to address base-layout requirement changes. lp:~sinzui/launchpad/base-layout-additions Diff size: 512 Launchpad bug: https://bugs.launchpad.net/bugs/403637 https://bugs.launchpad.net/bugs/403638 https://bugs.launchpad.net/bugs/403666 Test command: ./bin/test -vvt "tests/base-layout|xx-beta-testers-redirection|tales" Pre-implementation: beuno, salgado Target release: 2.2.8 = base-layout requirement changes = Bug #403637 base-layout must support a heading slot The 3.0 design places the

in the page header above the breadcrumbs. The base-layout template must support a heading slot. Bug #403638 base-layout must set the pubic/private body class To fix Bug #298152 [We should have a very visible indication for private objects], base-layout must set the body class as public or private. Bug #403666 Replace ids with classes in style-3-0.css The are styles that are assigned to ids in style-3-0.css. This is wrong because it discourages presentation reuse. Only elements and classes may be used to presentation. Ids are reserved for testing and scripts. == Rules == Bug #403637 base-layout must support a heading slot Support this notation in template Heading to create

heading

Bug #403638 base-layout must set the pubic/private body class Create a formatter that will work with any context. If the context is private, return 'private', otherwise return 'public'. Use the formatter in base-layout. Add a CSS body.private rule. Bug #403666 Replace ids with classes in style-3-0.css Replace the '#' with a '.'. Use names that are less specify so that they can use used in similar cases. == QA == Bug #403637 base-layout must support a heading slot The only pages using the new layout are the locationless pages that remain unchanged. There is no visual confirmation that the heading slot works. I Do not know how to visually verify a timeout error for edge or a librarian failure. locationless is a 1-to-1 replacement for freeform. The other pages, such as the launchpad-notfound.pt did not require more changes than the ones done here. Bug #403638 base-layout must set the pubic/private body class * Visit https://edge.launchpad.net/bnorked * View the source of the not found page * Verify that 'public' is among the body tag's classes Bug #403666 Replace ids with classes in style-3-0.css * Visit https://edge.launchpad.net/bnorked * Verify the footer has a top border and is about 2 ems from the content. == Lint == Checking for conflicts. and issues in doctests and templates. Running jslint, xmllint, pyflakes, and pylint. Using normal rules. Linting changed files: lib/canonical/launchpad/doc/tales.txt lib/canonical/launchpad/icing/style-3-0.css lib/canonical/launchpad/images/private-y-bg.png lib/canonical/launchpad/templates/launchpad-librarianfailure.pt lib/canonical/launchpad/templates/launchpad-requestexpired.pt lib/canonical/launchpad/webapp/tales.py lib/lp/app/browser/tests/base-layout.txt lib/lp/app/browser/tests/testfiles/main-only.pt lib/lp/app/browser/tests/testfiles/main-side.pt lib/lp/app/browser/tests/testfiles/searchless.pt lib/lp/app/templates/base-layout.pt == Test == * lib/canonical/launchpad/doc/tales.txt * Verified that fmt:public-private-css works with any object. * lib/lp/app/browser/tests/base-layout.txt * Verified that the heading slot creates a

* Verified that there is a placeholder for breadcrumbs. * Verified that the body tag added the public or private class correctly. * lib/lp/app/browser/tests/testfiles/main-only.pt * lib/lp/app/browser/tests/testfiles/main-side.pt * lib/lp/app/browser/tests/testfiles/searchless.pt * Updated 3 of the 4 layouts to use the heading slot. Note that locationless was not updated because it does not use the slot. == Implementation == * lib/canonical/launchpad/icing/style-3-0.css * Converted all the rules for ids that we expect to keep to classes * Renames several ids to new class names that are easier to reuse. * Added a rule for body.private * lib/canonical/launchpad/images/private-y-bg.png * I rotate the old private-bg.png so that it could tile vertically. * lib/canonical/launchpad/templates/launchpad-librarianfailure.pt * Discovered that this freeform template was not converted to locationless yet. * lib/canonical/launchpad/templates/launchpad-requestexpired.pt * Discovered that this freeform template was not converted to locationless yet. * lib/canonical/launchpad/webapp/tales.py * Added fmt:public-private-css * Updated all the objects that defined a final_traversable_names so that the *all* objects can use fmt:public-private-css. * lib/lp/app/templates/base-layout.pt * Added fmt:public-private-css to the body tag * Added a heading slot and a breadcrumb place holder. * Add the footer's new class.