Restore loading of vector-fix CSS modules#85
Conversation
c11b59b to
5d33b66
Compare
|
For the record on the "previous behaviour" framing in the commit $this->getComponentLibrary()->getModulesFor(
$this->getComponentName(),
$this->getParserOutputHelper()->getNameOfActiveSkin()
);to $this->getComponentLibrary()->getModulesFor(
$this->getComponentName(),
'vector'
);alongside the broader BootstrapComponentsService refactor. So this Before 5.2.0 (1.0 through 5.1.2), the second arg was the active |
74491e5 to
460a7c7
Compare
67a0883 to
4314c3a
Compare
`AbstractComponent::augmentParserOutput()` used to load each component's per-skin module variants by calling `getModulesFor()` with a hard-coded `'vector'` skin name, which the JSON registry treats as "always include the vector entry alongside the default". That published the `modal.vector-fix` and `popover.vector-fix` CSS to every skin's output, hiding the `.modal-backdrop` element on Vector-family chromes that would otherwise overlay the page. MediaWiki 1.43's ParserOutputAccess lifecycle change broke that publication path: the modules attached via the augment hook no longer reach the OutputPage. The earlier sparse-loading patch in `HooksHandler::onParserAfterParse` (5.2.3) routed the default modules through `ParserAfterParse` instead, but its foreach didn't pass any skin argument, so the per-skin entries stopped loading on every skin. Users on Vector, Vector 2022, MonoBook, and Timeless all end up with the BS4 modal backdrop covering the page once a modal opens. Pass the same hard-coded `'vector'` into the post-parse foreach so the registry returns the per-skin variants exactly as it did pre-1.43. The redesign of this path (route by active skin name, audit per-skin requirements) belongs in the next major release. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Per the reviewer comment at #80 (review) the test pinned a single argument literal through deep mocks of every collaborator on `HooksHandler`, coupling to call signatures rather than behaviour. Integration verification on the running rig covers the regression more reliably. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ddc65e4 to
c0ac01b
Compare
|
Manually tested with: MW 1.43.8 + Bootstrap extension 5.0.0 [= BS framework 4.6.2] + BC 5.2.3), two BS4 stacks, all six skins.
|
Two commits, two concerns. Fixes #84.
1. Restore loading of vector-fix CSS modules —
af96510The replacement sparse-loading foreach added in #80 (
HooksHandler::onParserAfterParse) calledgetModulesFor( $activeComponent )without a skin argument, returning only thedefaultmodule group. The Vector-fix modules live in thevectorgroup and were therefore silently dropped on every skin. Adding back'vector'reinstates the per-skin group thatAbstractComponent::augmentParserOutput()had been passing since 5.2.0 (commit f5a9c9f) — the path that MW 1.43'sParserOutputAccesslifecycle change silently disabled, which is precisely what #80 set out to compensate for via the post-parse hook.2. Drop heavy mock-based test for the post-parse module loader —
c0ac01bPer Jeroen's review on #80, the test that landed alongside the sparse-loading patch pinned a single argument literal through deep mocks of every collaborator on
HooksHandler, coupling to call signatures rather than behaviour. Integration verification on the running rig is the more reliable signal for this regression.