Page MenuHomePhabricator

Allow publishing a draft version of a template that will be shown to users who opt in as template testers
Open, LowPublicFeature

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

Details

Reference
bz22135

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:47 PM
bzimport set Reference to bz22135.
bzimport added a subscriber: Unknown Object (MLST).

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.

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

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.

(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.

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.

~~~~

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?

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.

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).

wiki0007 wrote:

I see what Max is saying. my bad.

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.

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. :)

Amire80 renamed this task from template testing option to Allow publishing a draft version of a template that will be shown to user who opt in as template testers.Nov 17 2019, 9:57 PM
Amire80 removed a subscriber: wikibugs-l-list.

I'm going over various template tasks old and new as a follow up to T238251, and I stumbled upon this one. Initially I wanted to close it because I thought that TemplateSandbox resolves, but then I re-read the description and understood that it's a bit different.

At the recent Tech Conf a similar proposal was raised, so it's good to reuse this old task for it.

For clarity, I renamed it from the very generic name "template testing option" to "Allow publishing a draft version of a template that will be shown to user who opt in as template testers".

Dinoguy1000 renamed this task from Allow publishing a draft version of a template that will be shown to user who opt in as template testers to Allow publishing a draft version of a template that will be shown to users who opt in as template testers.Nov 18 2019, 4:54 AM
Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM