User:Dietrich/Scratchpad: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
*** DRAFT *** DRAFT ***
<!--
= Papercuts Proposal =


=Migrating Add-ons from the Status Bar to the Add-on Bar=
Goals:
* Anyone must be able to submit the issues that hurt their daily use of Firefox OS, regardless if the annoyance is user- or developer-facing, or is an enhancement, defect or poor performance.
* The Product team must be able to identify a subset of those issues as higher priority than the rest.
* The high priority papercuts should be used as contribution opportunities for onboarding partners and volunteer contributors.
* The engineers should expand their role to include the stewardship of contributions, allowing the output of the project to scale beyond individual employees, in a way that mitigates the impact on short-term core code delivery.


The statusbar in Firefox is a [XUL <statusbar> element]. The benefits of this are that developers can add items to it using only overlays, and the DOM, with no specialized APIs. The downside is that add-ons in the statusbar are not customizable by the user, the way that toolbars and toolbar buttons are. In Firefox 4, the statusbar has been replaced with a [XUL <toolbar> element], and renamed the Add-on Bar. The Add-on Bar is hidden by default, and becomes visible when add-ons are installed there. Add-ons that currently add themselves to the statusbar will not work automatically in this new system, and will need to make some changes to their code in order to be visible in Firefox 4.
Proposal:
* Add a new keyword "papercut" to Bugzilla.
* Product team will triage issues with the "papercut" keyword regularly, changing the priority field to P1 for the items they deem important.
* All high priority papercut issues must have an engineering mentor, assigned during functional team triage sessions.


Several migration methods are detailed below.
Implementation:
* Dietrich: Propose to Eng Managers, UX, EPMs and PMs (maybe we need a "b2g-feature-drivers" list, release drivers is just too big for stuff like this now!)
* Jean: File bug to get "papercut" keyword added to Bugzilla.
* NOT YET: Product team schedules triage of bugs with keyword "papercut".
* Dietrich: Dev engagement team trains each functional team on the Mentored Bugs program.
* NOT YET: Functional teams add papercut bug triage to their pre-existing weekly triage sessions.
* NOT YET: Communication: Email dev-gaia, dev-b2g, and announce at Gaia weekly meeting and weekly Mozilla project meeting.


== Traditional Add-on Development Method ==
Measuring success (each 12 week release cycle):
* Track percentage of high priority papercuts have mentors
* Track percentage of the employed team were mentors
* Track percentage papercut bugs fixed by non-employees, and whether mentored or not


Here's how to add your add-on to the Add-on bar using the traditional development model. The Add-on bar is a XUL <toolbar> element, so if you've ever made a toolbar or added a toolbar button to Firefox, this will look familiar.
= FxOS Dashboards =


Your overlay XUL looks something like this now:
{| class="wikitable halfwidth-table"
! Dashboard !! 1.1 (Leo) !! 1.2 (Koi)
|-
| Predictive Burndown || [https://metrics.mozilla.com/bugzilla-analysis/Predictive_Simple.html#dueDate=2013-09-05&sampleMin=2013-07-16&titleName=&programFilter=B2G+1.1.0+%28Leo%29 view] || [https://metrics.mozilla.com/bugzilla-analysis/Predictive_Simple.html#dueDate=2013-09-05&sampleMin=2013-07-16&titleName=&programFilter=B2G+1.2.0+%28Koi%29 view]
|-
| Reviews & Bug Owners || [https://metrics.mozilla.com/bugzilla-analysis/Dashboard_byProject.html#programFilter=B2G+1.1.0+%28Leo%29 view] || [https://metrics.mozilla.com/bugzilla-analysis/Dashboard_byProject.html#programFilter=B2G+1.2.0+%28Koi%29 view]
|-
| Bug Counts || [https://metrics.mozilla.com/bugzilla-analysis/Bug-Counts.html#sampleInterval=week&sampleMax=2013-08-10&sampleMin=2013-03-31&programFilter=B2G+1.1.0+%28Leo%29 view] || [https://metrics.mozilla.com/bugzilla-analysis/Bug-Counts.html#sampleInterval=week&sampleMax=2013-08-10&sampleMin=2013-03-31&programFilter=B2G+1.2.0+%28Koi%29 view]
|}
-->


  <statusbar id="status-bar">
<!--
    <hbox id="myBox">
= Madrid Blockers by Manager (OLD TEAMS) =
      ...
    </hbox>
  </statusbar>


Modify it to look like this:
Team: Lucas Adamski
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "ladamski@mozilla.com anygregor@gmail.com jhylands@mozilla.com kyle@nonpolynomial.com gaye@mozilla.com jedavis@mozilla.com sotaro.ikeda.g@gmail.com reuben.bmo@gmail.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>


  <toolbarpalette id="BrowserToolbarPalette">
Team: Milan
    <toolbaritem id="myAddonItem">
<bugzilla>
      <hbox id="myBox">
{
        ...
  "target_milestone" : "1.0.1 Madrid (19apr)",
      </hbox>
  "resolution": "---",
    </toolbaritem>
  "include_fields": "id, summary, whiteboard, status, resolution",
  </toolbarpalette>
  "cf_blocking_b2g": "tef+",
  "email1": "jmuizelaar@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>


To make your add-on show up in the Add-on Bar, add the code below to your overlay script, and execute it the first time your add-on runs. This gets you the same behavior and placement that your old statusbar add-on had, while 1) making the placement of your add-on customizable by the user and 2) respecting the user's preference for your add-on's placement and the visibility of the Add-on Bar. Using a pref (and toggling it when this runs) is probably the easiest way to determine first-run.
Team: Faramarz
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "gal@uci.edu marshall@mozilla.com fabrice@mozilla.com mhabicher@mozilla.com dhylands@mozilla.com skrishnan@mozilla.com ssaroha@mozilla.com dsherk@mozilla.com mwu@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>


  if (firstRun) {
Team: Dylan Oliver
    let addonBar = document.getElementById("addon-bar");
<bugzilla>
    let currentSet = addonBar.currentSet;
{
    if (currentSet.indexOf("myAddonItem") == -1) {
  "target_milestone" : "1.0.1 Madrid (19apr)",
      addonBar.currentSet += ",myAddonItem";
  "resolution": "---",
      addonBar.setAttribute("currentset", addonBar.currentSet);
  "include_fields": "id, summary, whiteboard, status, resolution",
      document.persist("addon-bar", "currentset");
  "cf_blocking_b2g": "tef+",
      addonBar.collapsed = false;
  "email1": "dflanagan@mozilla.com jford@mozilla.com kgrandon@mozilla.com jlal@mozilla.com squibblyflabbetydoo@gmail.com dpreston@mozilla.com bugmail@asutherland.org",
    }
  "email1_type": "contains_any",
  }
  "email1_assigned_to": "1"
}
</bugzilla>


== Widgets in Firefox Add-on SDK ==
Team: Sid Stamm
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "cviecco@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>


The Firefox Add-on SDK, code-named Jetpack, has an API for easily adding items to the Add-on Bar. Example code:  
Team: David Scravaglierieri
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "dscravaglieri@mozilla.com mbudzynski@mozilla.com kaze@mozilla.com bfrancis@mozilla.com dale@arandomurl.com 21@vingtetun.org anthony@ricaud.me etienne@segonzac.info gsvelto@mozilla.com felash@gmail.com tzimmermann@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>


  let self = require("self");
Team: Andrew Overholt
  let widgets = require("widget");
<bugzilla>
  let myWidget = widgets.Widget({
{
    label: "My Add-on",
  "target_milestone" : "1.0.1 Madrid (19apr)",
    image: self.data.URL("logo.png"),
  "resolution": "---",
    onClick: function() {
  "include_fields": "id, summary, whiteboard, status, resolution",
      // Open a panel, modify the current page, whatnot.
  "cf_blocking_b2g": "tef+",
    }
  "email1": "mlamouri@mozilla.com amarchesini@mozilla.com sicking@mozilla.com bent.mozilla@gmail.com",
  });
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>


The Add-on SDK handles the DOM calls for adding to the toolbar item for your, so you only need to work with JavaScript.
Team: JST
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "josh@joshmatthews.net",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>


If you want to use the Widget API without migrating all your existing code to Jetpack, read about [how to use the SDK APIs in your existing add-on]. While the approach described at that link eases migration, you don't get SDK benefits such as memory tracking, and your add-on not requiring a restart by default.
Team: James Ho
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "wachen@mozilla.com gchen@mozilla.com tlee@mozilla.com swu@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>


==Resources==
Team: Ken Chang
* [https://developer.mozilla.org/en/Creating_toolbar_buttons Creating toolbar buttons tutorial on MDC]
<bugzilla>
* [https://developer.mozilla.org/en/Custom_Toolbar_Button Custom toolbar button tutorial on MDC]
{
* [http://forums.mozillazine.org/viewtopic.php?t=220220 Mozillazine thread on positioning toolbar button labels]
  "target_milestone" : "1.0.1 Madrid (19apr)",
* [http://kb.mozillazine.org/Toolbar_customization_-_Firefox Mozillazine page on general toolbar customization]
  "resolution": "---",
* [https://developer.mozilla.org/en/XUL/Property/currentSet toolbar.currentSet property] and the toolbar element's [https://developer.mozilla.org/en/XUL/Attribute/currentset currentset attribute]
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "'gene.lian@mozilla.com vchang@mozilla.com echen@mozilla.com yhuang@mozilla.com glai@mozilla.com chulee@mozilla.com clian@mozilla.com ctai@mozilla.com htsai@mozilla.com pwang@mozilla.com vyang@mozilla.com',",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: Tim Chien
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "timdream@gmail.com arthur.chen@mozilla.com schung@mozilla.com ehung@mozilla.com yurenju.mozilla@gmail.com dkuo@mozilla.com rexboy@mozilla.com gasolin@mozilla.com iliu@mozilla.com rlu@mozilla.com mshiao@mozilla.com etseng@mozilla.com alive@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: Hong Tang
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "xyuan@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: CJ Ku
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "szchen@mozilla.com bechen@mozilla.com kchen@mozilla.com schien@mozilla.com echou@mozilla.com thuang@mozilla.com chung@mozilla.com slee@mozilla.com jolin@mozilla.com slin@mozilla.com ayang@mozilla.com gyeh@mozilla.com cyu@mozilla.com pchang@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: Keven Kuo
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "kkuo@mozilla.com pchang@mozilla.com mchen@mozilla.com shuang@mozilla.com ahuang@mozilla.com rlin@mozilla.com vliu@mozilla.com btian@mozilla.com vwang@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: Roc O'Callahan
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "chris.double@double.co.nz edwin@mozilla.com ajones@mozilla.com kinetik@flim.org",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: Brad Lassey
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "bugmail.mozilla@staktrace.com cassie@bocoup.com danheberden@gmail.com waldron.rick@gmail.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: Doug Turner
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "justin.lebar+bug@gmail.com doug.turner@gmail.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: Other Mozilla
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "pivanov@mozilla.com nobody@mozilla.org bsmith@mozilla.com cvan@mozilla.com jmenon@mozilla.com l10n@mozilla.com server-ops-amo@mozilla-org.bugs kev@mozilla.com",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: TEF
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "amac@tid.es acperez@tid.es alberto.pastor@o2.com igonzaleznicolas@gmail.com jmcf@tid.es fbsc@tid.es francisco.jordano@o2.com crdlc@tid.es salva@unoyunodiez.com fernando.campo@o2.com ferjmoreno@gmail.com josea.olivera@gmail.com frsela@tid.es willyaranda@mozilla-hispano.org gtorodelvalle@gmail.com macajc@gmail.com arnau@tid.es",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
 
Team: OEM/Chipset/Other
<bugzilla>
{
  "target_milestone" : "1.0.1 Madrid (19apr)",
  "resolution": "---",
  "include_fields": "id, summary, whiteboard, status, resolution",
  "cf_blocking_b2g": "tef+",
  "email1": "codeaurora.org Firefox_Mozilla@126.com tcl.com janjongboom@gmail.com comoyo.com everything.me",
  "email1_type": "contains_any",
  "email1_assigned_to": "1"
}
</bugzilla>
-->

Latest revision as of 22:00, 8 June 2015