First of thanks to Ben and Diego for their wonderful work on the widgets and the new contenttoolbar. But the question I want to raise is: are we using javascript too much with too many libraries?
Case in point: I just solved a conflict between the conttenttoolbar plugin (which is not really a modular plugin because it cannot be removed without elgg core breaking) and the tagsuggest plugin. The latter uses jQuery, which puts $ in the global namespace, and the former uses homemade libraries which aparently also puts all sorts of stuff (another definition of $ among them) in the global namespace. Anyway, I think I have solved it, for now.
But this made me aware of the fact that elgg is now using a lot of javascript: on the weblog edit page we have now messages.js, presentation.js, tiny_mce.js (147 KB) with its various plugins, helpers.js, script.js, edit.js (contenttoolbar), jq.js, jq_ac.js (jQuery, used by tagsuggest), for a total of 340 kB.
Now, most of this is tiny_mce off course, but size of the javascript is not the only problem. For our use, the javascript used to put the widgets in their place is not aceptable: even our students had motoric dificulties putting the boxes exactly in the middle. But to Ben credit, he had a complete html solution in place, so we just could not use the yui plugin and everything is wonderful. The ideal solution would be off course to be able to use both the javascript and the html solution, switchable in some way.
The contenttoolbar is a nice piece of work, especially the file wizard and I think that we should have a solution along these lines, but again, a html alternative is absolutely necessary I think (if only the select box that we had all along). Javascript solutions should be extra, on top of, optional, making for a better user experience for those that can make use of it.
So what do you all think?