Re: [Wikitech-l] SkinTemplateOutputPageBeforeExec hook and documenting skin template variables
On Sat, Dec 7, 2013 at 1:44 AM, Jon Robson jdlrob...@gmail.com wrote: I created a bug around killing this hook in favour of more specific clearer hooks - https://bugzilla.wikimedia.org/show_bug.cgi?id=58137 - I don't think we should be tinkering with template variables personally under any circumstances and if we are making changes we should be doing them higher up the stack. I would be interested in your thoughts and inevitable screams about how I'm proposing terrible things ;-) I have a core patch that adds a hook for adding stuff at the end of portlets, separate from stuff like the language links list. https://gerrit.wikimedia.org/r/#/c/101895/ This will allow Wikibase to add the edit / add links link in a cleaner way. Feedback would be great on this approach or if anyone has a better suggestion. :) Cheers, Katie On Fri, Dec 6, 2013 at 10:37 AM, Jon Robson jdlrob...@gmail.com wrote: The mobile skin has traditionally used the template variable 'language_urls' in SkinTemplate to access the list of alternative languages of an article. We are now seeing a lot of friction and bugs as we try to move our codebase closer to core. Question 1: What does 'language_urls' mean - is it acceptable for anything other than a real language to be in that list? Over the course of 3 weeks however we have had 3 bugs that have added things that are not languages to this list. This has caused various noticeable problems with how languages works on mobile. Question 2: Why do developers abuse it in this way - is there not a better more semantic way to do this? Currently we have an issue live on all wikipedias which makes a language button show up on all pages - even those without articles. x https://en.m.wikipedia.org/w/index.php?title=Diggers_%26_Dealerstitle=Diggers_%26_Dealers When the language button at the bottom of the screen is clicked it says This page is available in 1 language: Edit links (Edit interlanguage links) As a result I've now proposed a change for our skin to override this [1] so that we can control the list contents and override the effects of the hook. This however is rather frustrating - especially given none of our template variables are documented and open to this kind of interpretation Question 3: Should we document these template variables? If so where and how? Thanks for your opinions on this matter. [1] https://gerrit.wikimedia.org/r/99693 -- Jon Robson http://jonrobson.me.uk @rakugojon -- Jon Robson http://jonrobson.me.uk @rakugojon ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- @wikimediadc / @wikidata ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] SkinTemplateOutputPageBeforeExec hook and documenting skin template variables
On 12/06/2013 01:37 PM, Jon Robson wrote: Currently we have an issue live on all wikipedias which makes a language button show up on all pages - even those without articles. x https://en.m.wikipedia.org/w/index.php?title=Diggers_%26_Dealerstitle=Diggers_%26_Dealers When the language button at the bottom of the screen is clicked it says This page is available in 1 language: Edit links (Edit interlanguage links) This is Wikibase, so I'm CCing the wikidata-tech list. Matt Flaschen ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] SkinTemplateOutputPageBeforeExec hook and documenting skin template variables
I created a bug around killing this hook in favour of more specific clearer hooks - https://bugzilla.wikimedia.org/show_bug.cgi?id=58137 - I don't think we should be tinkering with template variables personally under any circumstances and if we are making changes we should be doing them higher up the stack. I would be interested in your thoughts and inevitable screams about how I'm proposing terrible things ;-) On Fri, Dec 6, 2013 at 10:37 AM, Jon Robson jdlrob...@gmail.com wrote: The mobile skin has traditionally used the template variable 'language_urls' in SkinTemplate to access the list of alternative languages of an article. We are now seeing a lot of friction and bugs as we try to move our codebase closer to core. Question 1: What does 'language_urls' mean - is it acceptable for anything other than a real language to be in that list? Over the course of 3 weeks however we have had 3 bugs that have added things that are not languages to this list. This has caused various noticeable problems with how languages works on mobile. Question 2: Why do developers abuse it in this way - is there not a better more semantic way to do this? Currently we have an issue live on all wikipedias which makes a language button show up on all pages - even those without articles. x https://en.m.wikipedia.org/w/index.php?title=Diggers_%26_Dealerstitle=Diggers_%26_Dealers When the language button at the bottom of the screen is clicked it says This page is available in 1 language: Edit links (Edit interlanguage links) As a result I've now proposed a change for our skin to override this [1] so that we can control the list contents and override the effects of the hook. This however is rather frustrating - especially given none of our template variables are documented and open to this kind of interpretation Question 3: Should we document these template variables? If so where and how? Thanks for your opinions on this matter. [1] https://gerrit.wikimedia.org/r/99693 -- Jon Robson http://jonrobson.me.uk @rakugojon -- Jon Robson http://jonrobson.me.uk @rakugojon ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l