template testing option
OpenPublic

Description

Author: wiki0007

Description:
It would help testing of heavily used templates if there was an option that a group of users testing the new template could turn on in their preferences, so that the wikipedia software would check the user space specified in this option FIRST for any template called, then look in the regular template area.

This would ease testing of templates, in that a user could turn this option on, and any page that was displayed would call in the test template instead of the "public" template. With this option, a group of users would not have to have a group of "dummied" up examples to test - they could easily test a heavily used template for days, and more easily find problems, because they would be easily be able to test the template on a wide variety of existing Wikipedia pages without changing any of those pages.

The way the software pulled in templates would only be affected for those users with this option on. No one else would see the tested template. Then when the testing group was satisfied, they would agree to have the template moved to the main template area and they would turn off the testing option in their preferences.

This is something that is commonly done in other systems for the same reason - to allow a group of users to test new programs/templates. It would be equivalent to having certain users call in a "test concatenation" to test macros in assembler language, or defining a testing path with test libraries in front for Perl (http://perldoc.perl.org/lib.html)


Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-Templates.Via ConduitNov 21 2014, 10:47 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz22135.
bzimport created this task.Via LegacyJan 17 2010, 6:58 PM
MaxSem added a comment.Via ConduitJan 17 2010, 7:11 PM

I don't think that this feature will be implemented. When you browse pages, you see cached HTML, rendered on save an re-rendered on hits once in a while. Parsing a page and rendering it is a slow process and can take up to 10 seconds. You're proposing to re-parse everything on each pageview of some users. Not only that will make browsing speed intolerable for them, but it will also increase server load. Your proposal will also significantly increase read load on database because every template has to be checked for copies in userspace.

Platonides added a comment.Via ConduitJan 17 2010, 7:13 PM

Not necessarily. It could be available as a fourth button "Preview with my templates".

bzimport added a comment.Via ConduitJan 17 2010, 7:41 PM

wiki0007 wrote:

at this time, there is an option to disable caching in the preferences for any user that wants to: Appearance/Advanced Options/Disable page caching. There is also an option for purging cache as a function tab in the User Interface Gadgets (Add a "*" tab to the top of the page, which purges the page's cache when followed.) Since these are options available to any user now, I don't think the cache issue should be a deciding factor to enable an option that would ease the testing of templates.

MaxSem added a comment.Via ConduitJan 17 2010, 7:53 PM

(In reply to comment #3)

at this time, there is an option to disable caching in the preferences for any
user that wants to: Appearance/Advanced Options/Disable page caching.

You misunderstand what that option means. It just disables client-side caching, but doesn't re-parse wikitext on every page view.

bzimport added a comment.Via ConduitJan 17 2010, 8:05 PM

wiki0007 wrote:

I had in mind an option in Preferences that would look like this:
(*) Template Test Mode - from (specify template test area):
[[User:Stmrlbs/xxx]]

When the software came across a template "aaaaa", if a user had this option
turned on, for this user, the software would first check if
[[User:Stmrlbs/xxx/aaaaa]] existed, and use this for the template. If
[[User:Stmrlbs/xxx/aaaaa]] did not exist, then the wikipedia software would
then use [[Template:aaaaa]]

This would facilitate the testing of heavily used templates, because a group
project could create a group of pages calling the heavily used template in many
various ways, and call up those pages with this option turned on to test a new
template, without needing to dummy up examples.

It would also facilitate testing changes to inner templates, because a user
would no longer need to dummy up an outer template to call the modified inner
template.

~~~~

bzimport added a comment.Via ConduitJan 17 2010, 8:13 PM

wiki0007 wrote:

why would it reparse on every page view? Wouldn't it only reparse those pages that actually called the test template? And only for those users that had that option turned on?

bzimport added a comment.Via ConduitJan 17 2010, 8:17 PM

wiki0007 wrote:

Platonides said "Not necessarily. It could be available as a fourth button "Preview with my templates"."
Actually.. this would be better than what I'm proposing. That way, a user could display the page with templates in one window/tab, then display the same page with the public template in another window/tab. Thanks. Good suggestion.

Bawolff added a comment.Via ConduitJan 18 2010, 3:00 AM

Perhaps this would be something better implemented as a js gadget. ( get page source, prefix all template calls with User:foo/ , render using api's action=parse).

bzimport added a comment.Via ConduitJan 18 2010, 4:01 AM

wiki0007 wrote:

I see what Max is saying. my bad.

bzimport added a comment.Via ConduitJan 19 2010, 8:37 AM

davidg wrote:

Bawolff: This can't be solved with javascript, since javascript don't see the meta-templates and sub-templates called from the templates on the page. Meta-templates can be many steps away from the templates we see in the page code. And testing meta-templates is when we most would need this "test mode".

However, I have figured out how to do this with only template code (albeit slightly less convenient). See http://en.wikipedia.org/wiki/User_talk:Davidgothberg#Proposed_enhancement_for_testing_templates
. I will implement this as the {{test-template}} at the English Wikipedia.

Bawolff added a comment.Via ConduitJan 19 2010, 12:07 PM

Your correct, the js solution i proposed would only work with the templates that are directly transcluded. (I forgot how dependant wikipedia was on meta templates).

As for {{test-template}}. Thats quite an ingenious use (abuse?) of template syntax. :)

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.