Page MenuHomePhabricator

Style modules should be considered "ready" when they are applied to a page
Closed, DuplicatePublic

Description

When I go to
https://en.wikipedia.org/w/index.php?diff=123456
and type mw.loader.getState('mediawiki.action.history.diff') in the JS console of Firefox, I get "registered". But this is a CSS-only module, so I think it should return "ready" when the CSS is being applied to the page (which is the case on diff pages).

Event Timeline

He7d3r created this task.Mar 14 2015, 10:51 PM
He7d3r raised the priority of this task from to Needs Triage.
He7d3r updated the task description. (Show Details)
He7d3r added subscribers: He7d3r, Krinkle.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 14 2015, 10:51 PM

Feel free to close this as invalid if I misunderstood the intended behavior...
(an explanation is welcome in that case)

This is currently the expected behavior (so: not a bug, works as designed), but the behavior is clearly suboptimal and has bitten people in the past. It recently became a bigger problem for VisualEditor and OOjs UI, so we're working on changing it on T92459. It seems that there's no bug filed for this particular result of how addModules() vs addModuleStyles() work, so I just marked the dependencies.

Aklapper triaged this task as Normal priority.Mar 17 2015, 11:19 AM
Krinkle renamed this task from CSS modules should be considered "ready" when they are applied to a page to Style modules should be considered "ready" when they are applied to a page.Jun 10 2015, 11:53 PM
Krinkle set Security to None.