wiki.techinc.nl/includes/htmlform/fields
Bartosz Dziewoński f50cee1375 Do not automatically infuse any OOjs UI widgets
This is not really what we had in mind when developing the infusion
feature and I think it's not helpful. Most of the time there is just
no benefit; a ButtonWidget generated in PHP and in JS behaves and
looks pretty much the same, and rebuilding it through infusion is a
small performance hit. If you're not adding any event handlers, it only
makes sense for various dropdowns, which have themed styling.

For the primary use case of adding JS behaviors to PHP widgets you
need to call OO.ui.infuse() anyway to get a reference to the JS
widget, and not infusing automatically should make it easier to reason
about your code. Infusion tries to be very transparent, but it can't
hide the fact that the DOM is re-built, making your references to DOM
nodes from before infusion useless and losing anything from PHP that
wasn't included in the config (e.g. custom attributes).

This commit removes automated infusion from mediawiki.page.ready
and adds some custom code in mediawiki.special.movePage and
mediawiki.htmlform. I see only two extensions using infusable OOjs UI
widgets in Gerrit (ArticlePlaceholder and ExtensionDistributor) and
neither should be affected by this change.

Change-Id: I56608c537fc57c5c54960b0603694f2612f45618
2016-08-19 03:29:31 +02:00
..
HTMLApiField.php
HTMLAutoCompleteSelectField.php
HTMLButtonField.php
HTMLCheckField.php
HTMLCheckMatrix.php
HTMLComboboxField.php Do not automatically infuse any OOjs UI widgets 2016-08-19 03:29:31 +02:00
HTMLEditTools.php
HTMLFloatField.php
HTMLFormFieldCloner.php Type hint array for HTMLFormFieldCloner::getInputHTMLForKey() 2016-08-15 16:41:20 +02:00
HTMLFormFieldWithButton.php
HTMLHiddenField.php
HTMLInfoField.php
HTMLIntField.php
HTMLMultiSelectField.php
HTMLRadioField.php Do not automatically infuse any OOjs UI widgets 2016-08-19 03:29:31 +02:00
HTMLSelectAndOtherField.php
HTMLSelectField.php Do not automatically infuse any OOjs UI widgets 2016-08-19 03:29:31 +02:00
HTMLSelectLimitField.php
HTMLSelectNamespace.php Do not automatically infuse any OOjs UI widgets 2016-08-19 03:29:31 +02:00
HTMLSelectNamespaceWithButton.php
HTMLSelectOrOtherField.php
HTMLSubmitField.php
HTMLTagFilter.php
HTMLTextAreaField.php
HTMLTextField.php
HTMLTextFieldWithButton.php
HTMLTitleTextField.php Do not automatically infuse any OOjs UI widgets 2016-08-19 03:29:31 +02:00
HTMLUserTextField.php Do not automatically infuse any OOjs UI widgets 2016-08-19 03:29:31 +02:00