68
edits
(→Design) |
No edit summary |
||
Line 196: | Line 196: | ||
* Prefer native methods over libraries where appropriate. For instance, use Array.forEach() rather than iQ.each() (note that for each(...in...) [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/for...in#Description has issues] and should generally be avoided). | * Prefer native methods over libraries where appropriate. For instance, use Array.forEach() rather than iQ.each() (note that for each(...in...) [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/for...in#Description has issues] and should generally be avoided). | ||
* Assert text should be written in terms of what should happen rather than what did or did not happen, e.g. Utils.assert(a == 2, "a should be equal to 2"). This way it's clear both when reading the code and when reading the console/log. | * Assert text should be written in terms of what should happen rather than what did or did not happen, e.g. Utils.assert(a == 2, "a should be equal to 2"). This way it's clear both when reading the code and when reading the console/log. | ||
= Do No Harm = | |||
In terms of breakage, we should rank them in the following scale, based on the principle of "do no harm": | |||
# Anything that breaks the experience for people who never enter Panorama mode (i.e., start with a fresh profile and use the browser normally, never once entering the Panorama UI (or even triggering Panorama, such as happens when you pull up the right-click menu on a tab in the tab strip)). We should be good here, since in this scenario Panorama just lays dormant, but of course we need to verify. | |||
# Anything that breaks if you enter Panorama but then exit immediately and otherwise continue to use the browser normally. In this scenario, the browser should behave as it always has, even though Panorama is in the background watching things. Again for testing this should start with a fresh profile (or at least kill your sessionstore). Also note that you need to initialize Panorama once per session. | |||
# Anything that breaks if you use Panorama extensively, but with only one window open in your browser. | |||
# Anything that breaks if you use Panorama with multiple windows open. | |||
Sub-scenarios in the bottom three categories include starting Panorama right at the beginning of your session versus using the browser for a while and then starting Panorama. | |||
Within this hierarchy of course we have the usual prioritization from data loss at the top, down to annoyance at the bottom. | |||
Please use this hierarchy to guide your testing and bug fixing. |
edits