Skip to content

Restore loading of vector-fix CSS modules#89

Merged
malberts merged 2 commits into
masterfrom
fix/modal-backdrop-master
May 22, 2026
Merged

Restore loading of vector-fix CSS modules#89
malberts merged 2 commits into
masterfrom
fix/modal-backdrop-master

Conversation

@malberts
Copy link
Copy Markdown
Collaborator

Cross-port of #85 from the 5.x maintenance branch.

The same broken foreach pattern exists on master at src/HooksHandler.php:207: getModulesFor( $activeComponent ) without a skin argument, so the per-skin Vector-fix modules never reach any skin on MW 1.43+. Same one-line fix; same brittle mock test removal (per Jeroen's review on #80).

This unblocks the next major release shipping with the same modal-backdrop bug that #85 fixes for 5.2.4. Manually verified on the rig with BC 5.2.3 + Bootstrap-ext 5.0.0; the fix's mechanism is BS-version-independent and applies identically on the master / Bootstrap 5 line.

Closes #84 (master is the v6 line that ships the principled redesign tracked under the new follow-up issue; this PR delivers the same patch-release workaround so master isn't left with a known issue while waiting for the redesign).

malberts and others added 2 commits May 22, 2026 11:19
`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` 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 Bootstrap 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.

Cross-port of the equivalent fix on the 5.x maintenance branch.

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.

Cross-port of the equivalent removal on the 5.x maintenance branch.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@malberts malberts marked this pull request as ready for review May 22, 2026 09:22
@malberts malberts merged commit 83628c7 into master May 22, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stack order Modal component

1 participant