Skip to content

Revisit per-skin module loading mechanism #90

@malberts

Description

@malberts

BootstrapComponents has a per-skin module loading mechanism: each component in ComponentsDefinition.json can declare default and per-skin module groups (vector, vector-2022), resolved via ComponentLibrary::getModulesFor( $name, $skin ). The mechanism deserves a design pass for v6.

Hardcoded skin argument. HooksHandler::onParserAfterParse calls getModulesFor( $component, 'vector' ) regardless of the actual active skin. This loads Vector-specific CSS on every skin, including ones where it actively suppresses working Bootstrap behaviour (e.g. Chameleon, Medik).

Ambiguous content. The current per-skin fix files don't all earn their place:

  • popover.vector-fix.css targets .popover-title, the BS3 class name; BS4+ renamed it to .popover-header. Likely dead code on every supported install.
  • modal.vector-fix.css papers over the stacking-context symptom of Stack order Modal component #84; once the modal stacking root cause is fixed (Fix Modal backdrop #91) this file has nothing left to do.
  • The generic vector-fix.css is real Bootstrap-vs-Vector compatibility (font-size, box-sizing); independent of any per-component concern.

Ambiguous coverage. The declared per-skin keys are default, vector, vector-2022. MonoBook, Timeless, and Chameleon receive only default, despite being commonly used MediaWiki skins with their own Bootstrap-interaction characteristics. Whether that's intentional or accidental is unclear.

For v6, decisions to make:

  • Driver: active skin, skin families, opt-in registration, body-class-scoped rules, or remove the per-skin layer entirely?
  • Content: which per-skin files are still needed (audit), and is the right primitive a per-skin CSS file at all, vs. body-class-gated rules in a single neutral file, vs. Sass/Bootstrap variable overrides per skin?
  • Contract: which skins does BootstrapComponents formally support per-skin handling for?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions