TODO for extension development
==============================

FeatureFix AMO URL:
https://addons.mozilla.org/en-US/firefox/addon/featurefix/

... and its homepage:
http://ffaddons.game-point.net/ffix/

Useful site to see whether a site is down or whether it's just your connection:
http://www.downforeveryoneorjustme.com/

Making your add-on compatible with Firefox 4:
http://blog.mozilla.com/addons/2010/11/11/making-add-on-compatible-firefox-4/

Changes to how extensions are installed - no need for my partial JAR zip:
http://blog.mozilla.com/addons/2010/09/23/changes-to-how-extensions-are-installed-in-firefox-4/

AddonManager (replaces nsIExtensionManager):
https://developer.mozilla.org/en/Addons/Add-on_Manager/AddonManager
https://developer.mozilla.org/en/Addons/Add-on_Manager

Building an extension:
https://developer.mozilla.org/en/building_an_extension

How to improve startup performance:
http://blog.mozilla.com/addons/2010/06/14/improve-extension-startup-performance/

Javascript Code Modules (maybe look at 'Custom modules and XPCOM components'):
https://developer.mozilla.org/en/Using_JavaScript_code_modules

XPCOM changes in Gecko 2.0 (component registration, and backwards compatibility with FF3):
https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0

See, for component registration changes (now in chrome.manifest):
https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0#Component_registration

Omnijar bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=552121

Chrome list add-on: https://addons.mozilla.org/en-US/firefox/addon/chrome-list/

... The -purgecaches command-line flag ...

Run Firefox 4 using this commandline for development:
C:\games\download\firefox-4.0b9pre.en-US.win32\firefox\firefox.exe -profilemanager -purgecaches -console

Browser interface at:
chrome://browser/content/browser.xul

Tooltip popup testing:
http://tests.petesguide.com/WebStandards/tests/tooltips.html

Useful to set homepage to add-ons page during early development, URL is:
about:addons

Set startup page to:
file:///c:/jeremy/startup.htm

AMO Firefox search page with 'Refine results' pane:
https://addons.mozilla.org/en-US/firefox/search/

Nice persona to use as a basis for my theme's (Air Default):
http://www.getpersonas.com/en-US/persona/80950

Chrome URL to browser.css:
chrome://browser/skin/browser.css

Remember, check PayPal account from time to time to see whether I've had any contributions for FeatureFix and maybe my themes (LOL!)

--------------------------------------------------------------------------------

- Remove -moz-box comment or 'inherit' style in skin/toolbtns.css when we've determined which to use on the dropmarker

- unhide hidden toolbar info when we have it hidden on a popup box?  We see our view source and working online/offline buttons, and they're not hidden - why not?  Make sure they stay unhidden and offer an option to unhide all the other stuff too?
  Examples of loss of toolbar buttons in popup windows:
  http://bmfcampus.co.uk
  or:
  http://gcpcampus.nereusdemo.co.uk/





- Have an option to always show left/right tabbar scroll arrows; under #tabbrowser-tabs, we want "visibility: visible (!important)?" on .scrollbutton-up and .scrollbutton-down.


- Error console disabled by default in FF4.  Yep, you guessed it, another setting to add to my extension defaulting to enabling it again, to be displayed in the 'Advanced/developer tweaks' menu.  Use the devtools.errorconsole.enabled pref.
NOTE: Yes, the Error Console IS always enabled at the moment (FF5) no matter what that pref is set to.  This is because of bug #601201.  However it looks like they'll disabled it again in future so we still want this pref-changer in our extension.

- Add pref changer for browser.search.log pref, "Output verbose search service log info"




- At some point, update search providers page on new ffaddons site and ***update addon URLs on AMO***.  Make sure they all either point to page on new ffaddons site or probably only for Opaque and HXS ones, page on old site pointing to new site (need to add a thingy talking about new themes on old Opaque theme pages).



- Option in extension to prevent that 'visited pages' dropdown ('Recent history') appearing when you click and hold the back or forward button






- add config for prefs to extension:
browser.warnOnQuit
browser.warnOnRestart
... both I prefer to default to true.
^ this has become a hot potato issue.  I think you can re-enable these warning dialogs with these prefs, which is the preferable option.  People aren't liking the closing of FF with no warning dialog.  If they remove the prefs, we need to manually reimplement this functionality.
see: http://groups.google.com/group/mozilla.dev.apps.firefox/browse_thread/thread/1796b7255f23067a/5269c68651ba6210
... for the hot potato discussion.
  So, we're gonna want a config option in our options dialog (under tab behaviour) to popup confirm close dialog when quitting with multiple tabs open.
  Investigate whether we can 'save and quit' like in FF3, and if so offer that option.  If not... figure out the best way to offer a 'restore session' option without having their default homepage set; toolbar button?



- FeatureFix: remove close button in addon bar (unless there's a way to do it already I haven't seen, though we probably want it in our options dialog anyway as part of 'my preferred defaults').















- Add ability to remove 'switch to tab' urlbar functionality.








- Add an update behaviour section (aggressive / normal / disabled, and whether to check for ff, addons, search engines updates)
  was: Add the ability to quickly turn off auto updates (and in FF4, leave auto-updates on but don't check automatically when you go to the About dialog!!!)
(relevant prefs:
 app.update.enabled
 extensions.update.enabled
 browser.search.update
)
  Reducing aggressiveness of updates to 'Ask me what I want to do' DOES stop the auto-check in the About dialog.  So our personal 'reset to defaults' for FF
  updates will be best, I think, if we default to checking for updates to ff/addons/searchengines and set to 'Ask me what I want to do'.













- Add RFE bug.  When you organize buttons in FF4 in the order: <addressbar><reload><stop>
  ... then reload/stop are combined into 1 button.  ask for an about:config pref to prevent this behaviour.  It's not obviously discoverable, and it's basically bad UI design.
IRC transcript:
[12:32] <jez> hey guys
[12:32] <jez> in ff4, sometimes it combines the reload and stop buttons, right?
[12:32] <jez> as i recall, it's when you have the buttons arranged in a partivular way
[12:32] <Cork[home]> yes
[12:32] <jez> how must they be combined again?
[12:32] <Cork[home]> <addressbar><reload><stop>
[12:34] <jez> right
[12:34] <jez> now, hasn't that been established as a bad design decision?
[12:34] <stable|dead> jez: reset the address bar :)
[12:35] <jez> you click on stop and it just finishes loading, you reload the page instead/
[12:35] <Cork[home]> jez: not really
[12:35] <stable|dead> (Note: cork[home] ignore me)
[12:35] <jez> i think it's a bad design decision
[12:35] * Nyls` (Nyls@moz-9FB7038F.w80-8.abo.wanadoo.fr) Quit (Quit: )
[12:35] <Cork[home]> jez: well its been well debated
[12:35] <Cork[home]> and its an option for those that don't like it to prevent it
[12:35] <rctgamer3> Cork[home], yeah, it uses WM_HSCROLL. I've read that firefox doesn't support hscroll?
[12:36] <Cork[home]> it does
[12:36] * Nakre (Nakre@4CB90569.7AF314FF.DEDEC747.IP) has joined #firefox
[12:36] <jez> Cork: prevent it how?
[12:36] <Cork[home]> jez: move it in any direction, or put a small spacer inbetween
[12:36] <Cork[home]> that will prevent the merge
[12:36] <Cork[home]> ex. you can move the buttons back to the old position
[12:37] <jez> hmm
[12:37] <jez> maybe there should be a pref to prevent it?
[12:37] <Cork[home]> adn they won't merge
[12:37] <jez> might be worth an RFE bug if one doesnt exist
[12:37] <Cork[home]> why?
[12:37] <Cork[home]> the obvius way to do it is by moving the buttons
[12:37] <jez> but you might want them in that order
[12:37] <jez> but not combined
[12:37] <jez> ff should be about maximum customizability
[12:37] <Cork[home]> so put s space in there
[12:37] <jez> well, that's not particularly intuative
[12:37] * stable|dead (Anonymous@moz-87C60CA3.adsl.dynamic.seed.net.tw) Quit (Quit: Exit, Close)
[12:38] <Cork[home]> it is maximum customizable
[12:38] <jez> it's not obvious that putting a space there will prevent the merge
[12:38] <Cork[home]> it just doesn't need multible ways to do the same thing
[12:38] <Cork[home]> jez: but its easy to discover
[12:38] <jez> i disagree
[12:38] <jez> i see nothing obvious about it
[12:38] <Cork[home]> your free to do so :)
[12:38] <jez> how is a random user supposed to know they can prevent the behaviour by putting a space in there?
[12:39] <Cork[home]> i'm mostly just referating the arguments from the implementing bug
[12:40] <Cork[home]> and acutally the way firefox does the merg, haven't ever given me problem (the way i have problem with how chrome does it)
[12:40] <jez> i wouldnt mind if they'd incorporated a separate reload and stop button into the urlbar
[12:40] <Cork[home]> stop is always available when something is loading
[12:40] <jez> but combining the 2 seems like bad UI practice to me
[12:40] <Cork[home]> and dubble clickin it to get a reload isn't bothering me
[12:41] <jez> sure, but you might accidentally click reload when yoy wanted to stop
[12:41] <jez> with 2 separate buttons, that doesnt happen
[12:41] <Cork[home]> jez: stop doesn't go away if you hover the botton
[12:41] <Cork[home]> thats the magic part that makes it work
[12:41] <jez> no, what i mean is
[12:41] <jez> 1) page starts loading
[12:41] <jez> 2) user wants to stop load
[12:41] <jez> 3) user is about to click stop
[12:42] <jez> 4) page finishes loading
[12:42] <jez> 5) user is too slow to realize, clicks reload
[12:42] <jez> 6) page is relaoded
[12:42] <Cork[home]> and what i meant is in 3 a) users moves cursor and comes on the stop button, 3b) 4-6 doesnt happen
[12:42] <jez> but anyway, thanks for the help.  i know the behaviour now and can file an RFE. :-)
[12:43] <jez> i dont understand what you mean
[12:43] * Valerie (Valerie@moz-C60B65F5.adsl.alicedsl.de) Quit (Quit: Nettalk6 - www.ntalk.de)
[12:43] <Cork[home]> if the use plans to click the stop button
[12:43] <Cork[home]> they move the cursor
[12:43] <Cork[home]> if the cursor is over the stop button
[12:43] * ccaygill (ccaygill@moz-FF27DA5C.bb.sky.com) has joined #firefox
[12:43] <Cork[home]> it never changes back to the reload
[12:43] <Cork[home]> just to prevent this problem
[12:43] <Cork[home]> it was part of the implementation
[12:44] <Cork[home]> and one of the crierias for it to land
[12:44] <jez> not for me, in ff12
[12:44] <jez> erm
[12:44] <jez> b12
[12:44] <jez> i hover over stop, as page is loading
[12:44] <jez> when it finishes, it switches to reload.
[12:44] <jez> i click it, it reloads
[12:45] <Cork[home]> ah they changed it a bit
[12:45] <Cork[home]> instead of not changing, it gois into a "can't be clicked" state for about 1 second
[12:45] <Cork[home]> *goes
[12:45] * stevee (Miranda@moz-54A46FA1.cable.virginmedia.com) has joined #firefox
[12:46] <Cork[home]> if your not seeing that, its a bug or a collition with custome theme or extension
[12:47] <rctgamer3> Cork[home], which beta/nightly of firefox is the first to have g1.9.3?
[12:47] <Cork[home]> jez: this merge was a big testing and retesting and work to get this right
[12:47] <Cork[home]> jez: happend almost exactly a year ago
[12:47] <jez> Cork[home]: well anyway.  i still think you should have the peace of mind knowing that you will always get separate buttons no matter what order they are configured in
[12:47] <jez> so i'm gonna file an RFE to disable this behaviour
[12:47] <Cork[home]> won't happen, but feel free to do so
[12:48] <jez> it's not as egregious as some of the other FF4 changes
[12:48] <jez> :-)
[12:48] <jez> then i'll add it to my extension
[12:48] <Cork[home]> it will wiht 80%+ sertanty be WONTFIX
[12:48] <jez> it's fundamentally bad UI deisgn
[12:48] <jez> well at least i can duke it out with the arrogant UX team
[12:48] <jez> that never gets old
[12:49] <Cork[home]> jez: i would actually like it if you run with it for a while
[12:49] <jez> in the RFE you mean?
[12:49] <Cork[home]> as i can garantee you you won't ever see it mess things up for you
[12:49] * titsos (chatzilla@A555E826.202AA811.7F500497.IP) has joined #firefox
[12:49] <rctgamer3> Cork[home]
[12:49] <Cork[home]> no in the rc or beta
[12:49] <jez> no, it is a minor niggle
[12:49] <Cork[home]> rctgamer3: on min
[12:49] <jez> but still i think it is a fundamentally bad design decision.
[12:49] <jez> *shrug*
[12:49] <Cork[home]> *one
[12:49] <rctgamer3> k ;)
[12:49] <jez> anyway i must fly
[12:49] <jez> ttyl"!
[12:50] <Cork[home]> jez: your about 10 months to late
[12:50] <jez> decisions can be reversed at a later date.
[12:50] <jez> it's happened many times.
[12:50] <Cork[home]> not likly when its this tested and accepted
[12:50] <jez> (*ahem* status bad)
[12:50] <jez> *bar
[12:50] <Cork[home]> the status bar isn't readded
[12:50] <jez> quite
[12:50] <jez> it's removed.
[12:51] <jez> that's a change of policy
[12:51] <jez> anyway i must go
[12:51] <jez> so bye!
[12:51] <jez> :-)
















- Add 'AMO Firefox search page with 'Refine results' pane' (see above) to my options dialog somewhere?  I want that refine results pane!!
UPDATE: Now that they've changed the AMO site, things are probably different WRT refining search results.
- (dupe of the above): Point to the "AMO Firefox search page with 'Refine results' pane" in help/docs... mention 'refine search' panel being there



- Add option to 'add tabs to end' or 'New tabs at the end' or something, under tab behaviour.









- tools > options > advanced > update > "When update to Firefox are found" >
"Ask me what I want to do"
Put the above as a pref in my extension which is reset to this by default
rather than ultra-aggressive updating (describe as such :-) )
By the way, this also causes the auto-update check in the Firefox about dialog to change to the button.  This is good.  We MAY possibly want to get rid of even that button.


- move 'show search suggestions' from advanced to nav bar tweaks



- For docs and descriptions of ffix, change 'popup ALT text' to 'Popup ALT attributes (and other attributes)' or something... it's a more common way to refer to it.


- at some point, Mozilla might get their Firefox icon sizes policy together and we only need 1 or 2 icon sizes for toolbar icons, etc.  If/when they do, look at making icons that won't need scaling in the browser.
- related to icon sizing, look at increasing all icon sizes in the GUI via the extension (at least on the toolbar).  UPDATE: I think this should be left to the theme, unless Mozilla become Nazis and force an icon size on themes (unlikely)

- browser.dom.window.dump.enabled <-- allow to be configured from GUI





- Implement contextual help links.  Probably gonna want to centralize the way we link to URLs of the ffix homepage somehow so we only have 1 place in the
  code where we hardcode its base URL.




- Check out:
http://kb.mozillazine.org/Browser.sessionstore.privacy_level
...
Another one to add to the extension?





- Definitely add to extension:

MAKE SURE YOU ADD THIS... IMAGE DOWNLOAD PLACEHOLDERS
AND BROKEN IMAGE PLACEHOLDERS, PREFERABLY OF THE RIGHT DIMENSIONS!!!
Apply the following CSS style rule to all elements to force broken image
placeholders, rather than the broken image turning into regular ALT text:

-moz-force-broken-image-icon:1;

(it can be done on an individual IMG in the dom inspector by adding a DOM
node nodeName of style, with -moz-force-broken-image-icon:1 as the value)




New idea, implement: Popup NOTHING (not even ALT or TITLE text).   Can be done right now by deselecting all checkboxes, but formally make it into a radiobutton option.








- In a first update, add logToProfileDir() and logToLiteralDir() functionality into new miscUtils module, as 'logging' functions.
  (these are currently unchecked old code, in FILES PROBABLY TO DELETE\miscUtils.js)
  Pehaps in a later update, rename commands to more general file writing functions; not sure yet.  Maybe they can just always be logging functions.
  ONCE IT'S BEEN ACCEPTED as part of an update and it's in the new codebase, we can delete the FILES PROBABLY TO DELETE dir as these are the last 2 funcs there.
!!!IMPORTANT!!! Looking into this, I don't think it's a good idea to put these functions in miscUtils at all.  You're meant to write stuff asynchronously to avoid potentially screwing up performance, and that can be done much more easily with FileUtils.jsm.  See here: https://developer.mozilla.org/en/Code_snippets%3aFile_I/O#Writing_to_a_file
Let's not do this one.
