On Thu, Mar 10, 2011 at 1:50 PM, Neil Kandalgaonkar <neilk(a)wikimedia.org> wrote:
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.
Actually, HTMLForm isn't used all that much. It's fairly new, and
only came around when Andrew redid the preference system not
too long ago.
We also have the Xml and Html classes, the former has been around
since forever but the latter should probably be encouraged more.
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.
+1. I think this is a great idea, and helps enforce UI consistency
rather than hoping people Get It Right. An example of a UI element
I thought of recently that could be used in lots of places and add
a level of usability would be an auto-suggesting text field for places
you type in a username (Email, blocking, dozens of other places).
By hiding all the complexity in something like autoSuggestUserBox()
it would encourage usage elsewhere.
-Chad