FYI, there are classes in MediaWiki like HTMLForm and HTMLFormField
which abstract a lot of form creation in MediaWiki already. They are not
used universally, but very very often.
Those libraries are more useful for the technical details of forms (for
instance, preventing cross-site request forgery is built-in) but if you
want to standardize usability and style maybe you should start there.
Ultimately we also have to deal with forms created entirely by
Javascript interfaces (like a rich text editor will have). We'd want
them to be as similar as possible to the ones created in PHP. But if you
create the PHP library first it will be easy to figure all that out.
On 3/9/11 4:33 PM, Brandon Harris wrote:
One of my goals for the year at the Foundation is "Development of a
MediaWiki Style Guide." To that end, I have completed the first draft
of one section, focused on Forms and Form elements.
This project has multiple goals:
* To create consistency across various interfaces
* To help modernize the MediaWiki interface
* To make the overall user experience more enjoyable
* To make writing user interfaces easier for developers
In a perfect world, MediaWiki would have a standardized User Interface
library where a developer can simply say something like
$myInput = UIElements::getTextInput(
type => 'text'
name => 'elementname',
label => 'The Label',
helptext => 'Help text string',
hint => 'Default value',
instructions => 'Instructions string',
errorconditions => array(blah blah blah)
);
And have that do the needful, knowing how to display itself and handle
errors for itself.
We don't live in a perfect world, but we can start to get there.
Here is the first draft. Attack at leisure, and feel free to ignore my
pathetic mewlings as you cut my soul from my bones.
http://www.mediawiki.org/wiki/StyleGuide/Forms
I'm going to expand this further (with things like "tables" and such)
but for now this is a start.
You can comment here or on the talk page.
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
Neil Kandalgaonkar ) <neilk(a)wikimedia.org>