Topic on Talk:ResourceLoader/Version 2 Design Specification

Cleaning up gadgets, gadget manager

4
Jeblad (talkcontribs)

In a new gadget manager [or edit tool] there should be possible to generate a report of code style. For example a tool like [JS]lint could be used. It must be fairly easy for users to run a check on the code and some kind of report should be visible so coders would want to make good code, that is use social crediting for good code.

Krinkle (talkcontribs)

In the first iteration of the Gadgets rewrite ("Gadgets 2.0") we are focussing on the main functionality. Keeping as first priority to not break existing gadget infrastructures and making the new features stable as supposed to packed-with-features.

A nice code editor with syntax highlighting and validation of syntax or code style sounds like a good idea. However I'd recommend doing that as a gadget, not as part of this extension itself.

On MediaWiki.org, for example, is a gadget called "CodeEditor". If you activate that and go and edit your common.js you'll have live syntax highlighting.

Jeblad (talkcontribs)

Yeah I know the CodeEditor gadget (I set it up on a wp-project), but this isn't about editing the code but for the users of the gadget to build confidence that the coder has done a good job. It is also for identifying suspicious gadgets when something breaks.

Krinkle (talkcontribs)

I know what you meant. Building a gadget that validates code on the fly or enforces or recommends a certain coding style is, however, fairly similar to a syntax highlighting custom editor interface. Incorporating something like this is significant to the user, but is technically very similar.

For example JSBin automatically validates through JSLint when "Real-time preview" is enabled (it's in the bottom left corner).