...to enable customization. Load it by default on pages with mapframes, on demand (user click) with maplinks.
Description
Details
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/extensions/Kartographer | master | +15 -0 | Add the ability to customize maps with Kartogrpher.{js|css} |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | JGirault | T132971 Implement Kartographer customization to match Wikivoyage existing map | |||
Resolved | MaxSem | T133954 Create a module that would load MediaWiki:Kartographer.{js|css} on pages with maps |
Event Timeline
Should there be a js-config level setting KartographerCssLoaded and KartographerJsLoaded? This way <mapframe> will set them both to true, and for pages with <maplink> but without <mapframe> it will set them to false unless they don't exist. This way a wiki that has no MediaWiki:Kartographer.css will not try to load it before showing a map on click.
Change 286252 had a related patch set uploaded (by MaxSem):
Add the ability to customize maps with Kartogrpher.{js|css}
Change 286252 merged by jenkins-bot:
Add the ability to customize maps with Kartogrpher.{js|css}
You could have <mapframe> use $parser->getOutput()->addModules('ext.kartographer.site') and for <maplink> run mw.loader.load('ext.kartographer.site') which is a no-op if it's already loaded?
ResourceLoader will automatically mark the module as empty if MediaWiki:Kartographer.css doesn't exist, see ResourceLoaderWikiModule::isKnownEmpty().
Isn't there meant to be a general ban on adding new site modules, given the performance impacts? I'm disappointed this was executed so quickly without opportunity for comment. :-(