OOUI/Using OOUI in MediaWiki

Since OOjs UI is now in mediawiki core, to use OOjs UI from PHP extension code requires code similar to:

The  call ensures that the proper theme and directionality is configured, and that the OOjs UI styles are loaded. The OOjs UI widgets are namespaced, so they must be prefixed with. Stringifying the widgets converts them to HTML, so your widgets can be added to the page using.

From JavaScript code, you just need to ensure that the  module is included in the dependencies. For example:

See https://gerrit.wikimedia.org/r/187079 for some more ideas.