Core Gallery implementation emits modules (styles, JS) as part of its output.
Parsoid's Gallery implementation only specifies style modules as part of the extension config, but does not specific the same JS modules as core.
Core Gallery implementation emits modules (styles, JS) as part of its output.
Parsoid's Gallery implementation only specifies style modules as part of the extension config, but does not specific the same JS modules as core.
[subbu@earth:~/work/wmf/core/includes/gallery] git grep mediawiki.page.gallery PackedImageGallery.php: return [ 'mediawiki.page.gallery' ]; SlideshowImageGallery.php: return [ 'mediawiki.page.gallery.slideshow' ]; TraditionalImageGallery.php: $out->addModuleStyles( 'mediawiki.page.gallery.styles' );
Registering a modulestyle with the extension seems like a pretty coarse grained api. The legacy parser only adds the styles/scripts if the tag is used on the page. We currently do that for places where we call the out to the legacy parser, with env->addOutputProperty
Should we switch to using that for native extensions as well?
Change 644341 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] [WIP] Refine adding module(style)?s in extapi
Don't need to merge this as a dupe of that. This was only about the Parsoid impl not specifying any modules at all. Since I +2ed that already, I'll resolve this.
Change 644341 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Refine adding module(style)?s in extapi
Change 646892 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a19
Change 646892 merged by jenkins-bot:
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a19
Change 646771 had a related patch set uploaded (by C. Scott Ananian; owner: Subramanya Sastry):
[mediawiki/vendor@wmf/1.36.0-wmf.21] Bump wikimedia/parsoid to 0.13.0-a19
Change 646771 merged by jenkins-bot:
[mediawiki/vendor@wmf/1.36.0-wmf.21] Bump wikimedia/parsoid to 0.13.0-a19