Skip to content

Add a shared Bootstrap component resolver#124

Merged
malberts merged 1 commit into
masterfrom
bootstrap-component-resolver
Jul 21, 2026
Merged

Add a shared Bootstrap component resolver#124
malberts merged 1 commit into
masterfrom
bootstrap-component-resolver

Conversation

@malberts

@malberts malberts commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

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.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 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 ready and every component element carries a live Bootstrap instance, with no console
errors from this change. On Tweeki the jQuery-bridge fallback was additionally confirmed
viable (the $.fn plugin Constructors of its bundled Bootstrap are present). CI PHPUnit
(MW 1.43 through master) is green.

AI-authored, Claude Code (Fable 5, with Opus 4.8 subagents for implementation and review); design agreed with @malberts in session; diff not human-reviewed; verified with automated browser testing (Playwright) across the four skins above plus CI PHPUnit.

@malberts
malberts force-pushed the bootstrap-component-resolver branch from 155578d to 83f6776 Compare July 21, 2026 08:54
@malberts
malberts marked this pull request as ready for review July 21, 2026 09:13
@malberts
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
malberts force-pushed the bootstrap-component-resolver branch from dd61066 to 88abff7 Compare July 21, 2026 09:30
@malberts
malberts marked this pull request as ready for review July 21, 2026 09:30
@malberts
malberts merged commit d273872 into master Jul 21, 2026
5 of 6 checks passed
@malberts
malberts deleted the bootstrap-component-resolver branch July 21, 2026 15:48
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.

1 participant