Add a shared Bootstrap component resolver#124
Merged
Conversation
malberts
force-pushed
the
bootstrap-component-resolver
branch
from
July 21, 2026 08:54
155578d to
83f6776
Compare
malberts
marked this pull request as ready for review
July 21, 2026 09:13
malberts
marked this pull request as draft
July 21, 2026 09:18
The four component init scripts (carousel, modal, popover, tooltip) reached Bootstrap only through the window.bootstrap global, which ties them to Extension:Bootstrap's copy. They now obtain the component class from a shared package module: getComponentClass() resolves it from the window.bootstrap global that Extension:Bootstrap and most Bootstrap-bundling skins expose, or from the jQuery plugin bridge that skins such as Tweeki register instead (a Bootstrap jQuery plugin's Constructor is the native component class). The five modules involved are ResourceLoader package modules, so the resolver is shared via require() rather than a page-wide global. No loading change: the shared module depends on ext.bootstrap.scripts and the fix modules depend on the shared module, so the load graph and behaviour are identical on every skin. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
malberts
force-pushed
the
bootstrap-component-resolver
branch
from
July 21, 2026 09:30
dd61066 to
88abff7
Compare
malberts
marked this pull request as ready for review
July 21, 2026 09:30
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #70
First step towards loading a single Bootstrap per skin. The four component init scripts
(carousel, modal, popover, tooltip) reached Bootstrap only through the
window.bootstrapglobal, which ties them to Extension:Bootstrap's copy. They now obtain the component class
from a shared package module:
getComponentClass()resolves it from thewindow.bootstrapglobal that Extension:Bootstrap and most Bootstrap-bundling skins expose, or from the jQuery
plugin bridge that skins such as Tweeki register instead (a Bootstrap jQuery plugin's
Constructoris the native component class). The five modules involved are ResourceLoaderpackage modules, so the resolver is shared via
require()rather than a page-wide global.No loading change: the shared module depends on
ext.bootstrap.scriptsand the fix modulesdepend on the shared module, so the load graph and behaviour are identical to before on
every skin. The jQuery path becomes load-bearing once a later change stops loading
Extension:Bootstrap's copy on skins that bundle their own.
Verification
Automated browser testing (Playwright) on Vector, Chameleon, Medik and Tweeki: on a page
exercising carousel, modal, popover and tooltip, all involved modules reach ResourceLoader
state
readyand every component element carries a live Bootstrap instance, with no consoleerrors from this change. On Tweeki the jQuery-bridge fallback was additionally confirmed
viable (the
$.fnpluginConstructors of its bundled Bootstrap are present). CI PHPUnit(MW 1.43 through master) is green.