= UI 3.0 implementation = A primer about the 3.0 UI and how we go about doing it. <> We want to minimize the number of developers writing HTML and CSS until there are more HTML examples and CSS rules in place. == Layouts == * locationless: A page without tabs, search, or side portlets This is used by non-app pages like errors. Most (maybe all) pages that use this layout have been converted. * searchless: A page without global search or side portlets This is for pages that implement their own search in the main area. The Launchpad front page uses this layout. Other pages may want to switch to this layout. * main_only: A page without side portlets This will be the most common layout because modification pages and some listing pages do not have items that qualify for side portlets. * main_side: A page with everything This page is for artifacts that have actions that create notifications, have subscribers, or have notifications that can be placed in the side. '''Other portlets should not be placed in the sidebar.''' == Estimate conversion table == {{{ Old layout New layout 5 default(2.0) main_side 30 applicationhome main_only 10 pillarindex main_side 1 search searchless 256 context/@@main_template/master main_?? 158 onecolumn main_?? }}} See the [[http://people.canonical.com/~beuno/conversions.html | Conversion report]] for a summary of our progress. This page is updated five minutes past the hour based on landings to `launchpad/devel`. Some teams are also keeping track of conversions before landing: [[VersionThreeDotO/Bugs/TemplateConversion|Bugs]], [[VersionThreeDotO/Soyuz/TemplateConversion|Soyuz]], [[VersionThreeDotO/BlueprintsConversion|Blueprints]]. == Converting a template to a layout == === Choose the layout === {{{ ? The page does not belong to an application, can be shown anywhere ! use locationless. ? Does the page implement search in the main area, and does it contradict with global search ! use searchless ? Does the page have actions that create objects or notifications, does it have a subscriber's list, does it have notification (events) to show recent activity? ! use main_side ? All other cases (simple artifacts or modification pages) ! use main_only }}} === Mechanical changes === {{{ * Switch the layout: * Update the macro - xml:lang="en" - lang="en" - dir="ltr" - metal:use-macro="context/@@main_template/master" + metal:use-macro="view/macro:page/main_only" * Update the heading (see below for rules) * Remove 0.0 and 1.0-isms * Delete all portlet slots * Delete the help * You may want to extract the help to a separate file and link to it * YUI-ify * If there is more than on block on the page: * First block is class="top-portlet" * All following blocks are class="portlet" * Launchpadify * Remove floated classes and styles...those are hacks to make column in the onecolumn layout. * Convert crafted links into fmt:link or fmt:link-icon * We may want to extend the formatter to handle alternate link text. * We probably need to add links the menus. * Create valid css-ids using fmt:css-id * It takes an optional prefix fmt:css-id/prefix- * (Barry: I do not know what that means) * Use