On Sat, Jan 22, 2011 at 5:40 PM, Maciej Jaros egil@wp.pl wrote:
Great. Now I only need to tell the user to install Firefox, install Firebug and some other addon, open the page in Firefox... Oh, wait. This error does not occur in Firefox...
Please, I can live with folding new lines (thou I don't believe those few bites are worth it) acutely compiling the code (or packing as some say) would be just evil for Mediawiki or Wikimedia to be more exact.
Just remember that people all over the world are hacking into Mediawiki all the time. Making it harder won't help a bit.
Making it more powerful and more self-aware may, however, help a **lot**.
ResourceLoader provides a relatively sane module-loading system for managing what bits of code and data are flying around. Consider supplementing this better encapsulation with in-browser development tool helpers -- say, to provide a code editor with syntax highlighting and flagging of errors, and to let you load your custom site/user/gadget JS modules in context while you're working on them.
Common tasks like adding custom tabs or grabbing some part of the existing UI to modify can be made much easier by a script editor that knows these things exist, and can help you identify which bits of the UI you want to work with by clicking on them.
Even coming back down to earth, consider that current versions of every major browser now have at least a basic Firebug-like debugging console and a DOM inspector available. Debugging JavaScript on IE used to consist of getting a dialog box with a file name and line number that were usually *entirely wrong*... other browsers gave you better error messages but not much more.
Debugging JavaScript in today's browsers can at least pop up the live code in context for you, and by sticking '?debug=false' on your URL, all our minification will be conveniently gone from view, and the individual modules easier to identify by hand. (This too could probably be given a nice UI helper in a script debugging tool or even in a global error handler... which could also do things like report JS errors upstream to MediaWiki developers.) Whether you have all the magic of a "real" debugger or not, that's *hugely* useful in debugging, and has made a world of difference in my experience.
-- brion