Page MenuHomePhabricator

UniversalLanguageSelector should stop using the SkinTemplateOutputPageBeforeExec hook
Closed, ResolvedPublic


The SkinTemplateOutputPageBeforeExec hook is being deprecated as part of desktop refresh to simplify skin integration points which will make it much easier for skins to be built.

For similar reasons given in T252841 and discussions with Timo in this Gerrit patch the SkinTemplateOutputPageBeforeExec hook should not be used to force the display of the language portal. That is a decision that should rest with the skin.

Vector will currently display the portal provided either the language overlay is full or the BaseTemplateAfterPortlet hook is used to inject content at the end of the language portal.

Monobook, CologneBlue, Modern will not, however they can be patched to do so (also feel free to jump in with your own thoughts in discussions with Timo in this Gerrit patch about whether this decision should rest in core)

Regardless of that decision UniversalLanguageSelector should replace SkinTemplateOutputPageBeforeExec with the new SkinAfterPortlet - I have provided two possible options to show how that might be done. Let me know what you think.

I'm targeting the 1.35 release for deprecating this hook. Let me know if you see any problems with that! Thanks in advance!

Event Timeline

Change 597400 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/UniversalLanguageSelector@master] SkinTemplateOutputPageBeforeExec is deprecated

Change 597401 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/UniversalLanguageSelector@master] Output uls-settings-trigger in HTML markup

Reedy added a subscriber: Reedy.May 20 2020, 1:24 AM

Note, ULS is part of MLEB - (so master of the extension needs to keep support with odler versions of MW)

rMW53ab861a2fcb: Add BaseTemplateAfterPortlet hook to add html after portlets added the "BaseTemplateAfterPortlet" hook, just so other people don't need to chase it down; it's been in MW core since 1.23

Jdlrobson updated the task description. (Show Details)Jun 9 2020, 9:07 PM
Jdlrobson moved this task from Inbox to OKR Backlog on the User-Jdlrobson board.Jun 9 2020, 11:33 PM
Jdlrobson moved this task from OKR Backlog to Blocked on the User-Jdlrobson board.

Change 597400 merged by jenkins-bot:
[mediawiki/extensions/UniversalLanguageSelector@master] SkinTemplateOutputPageBeforeExec is deprecated

Jdlrobson closed this task as Resolved.Jun 13 2020, 3:45 AM
Jdlrobson added a subscriber: santhosh.

Thank you @santhosh !

Change 597401 abandoned by Jdlrobson:
Output uls-settings-trigger in HTML markup

Note this was meant more as a proof of concept for the language team of what's possible rather than expecting to be reviewed.

My main objective was and that's been resolved. This was a slightly different approach to solving this problem.

I'm abandoning this for now, but wanted to note its likely the web team will need to revisit this, as they move the language cog to the top right of Vector in future work.