Lucas_Werkmeister_WMDE added a comment.
In T331760#8761970 <https://phabricator.wikimedia.org/T331760#8761970>, @Lucas_Werkmeister_WMDE wrote: > Adding a separate RL module for just the local site brings some cost with it, but if it lets us mostly skip loading the much heavier module of all sites’ information, it could still be worth it. (Alternatively, if we think this information is needed frequently enough, we could perhaps add it to the parser output of all pages, without needing to load a RL module at all.) “[Adding] it to the parser output of all pages” is actually what @Michael first did in patch sets 1–3 of Link to the Site subgroup in the language selector <https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/885001/3> (I’d forgotten in the meantime but now looked through the review comments again); one concern was that the new variable wouldn’t be available in old / cached parser output for a while. If we decide to add it to the parser output again, I suppose we can make the JS code check for the config variable first, and fall back to loading `mw.config.values.wbSiteDetails` after all if the config variable doesn’t exist yet. But I’d also argued at the time that “it feels strange to me to add using `addJsConfigVars()`, when most of the config variables we add that way are more or less specific to the current page view, and page-independent data like `wbRepo` added via ResourceLoader modules instead”, so maybe a new ResourceLoader module is better after all. (`mw.config.values.wbCurrentSiteDetails`? 🚲🏠) TASK DETAIL https://phabricator.wikimedia.org/T334682 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Aklapper, Manuel, Michael, Lucas_Werkmeister_WMDE, ItamarWMDE, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
