Diff Renderer: load diff modules before using OOUI classes

Avoid calling OOUI\Tag->__toString() before enabling OOUI.

Bug: T360631
Change-Id: Ia05b933822ccaae32bb9d2510391f0d4bb1ea810
This commit is contained in:
Sam Wilson 2024-07-03 16:59:48 +08:00
parent c4828126e6
commit 3d636f1af2

View file

@ -243,6 +243,9 @@ class Hooks implements
return;
}
// onDifferenceEngineViewHeader may not run, so load modules here as well for styling (T361775)
$this->loadDiffModules( $output );
$parts['50_ve-init-mw-diffPage-diffMode'] = '<div class="ve-init-mw-diffPage-diffMode">' .
// Will be replaced by a ButtonSelectWidget in JS
new ButtonGroupWidget( [
@ -262,9 +265,6 @@ class Hooks implements
]
] ) .
'</div>';
// onDifferenceEngineViewHeader may not run, so load modules here as well for styling (T361775)
$this->loadDiffModules( $output );
}
/**