Page MenuHomePhabricator

Initialize theme and set directionality in MediaWiki Core
Closed, ResolvedPublic

Description

Currently, if you wish to use OOUI in a MediaWiki extension, you have to set up the library to use the MediaWiki theme and to output text with the appropriate directionality:

OOUI\Theme::setSingleton( new OOUI\MediaWikiTheme() );
OOUI\Element::setDefaultDir( $wgContLang->getDir() );

Setting up OOUI should not be left up to individual extensions. It should be done centrally, in MediaWiki-Core.

Event Timeline

ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori added a project: OOUI.
ori added subscribers: ori, matmarex, TrevorParscal.
matmarex triaged this task as High priority.

Change 182875 had a related patch set uploaded (by Bartosz Dziewoński):
Initialize OOUI theme and set OOUI element directionality for all requests

https://gerrit.wikimedia.org/r/182875

Patch-For-Review

Change 182875 merged by jenkins-bot:
Add OutputPage::enableOOUI() to set up OOUI stuff when needed

https://gerrit.wikimedia.org/r/182875