[go: up one dir, main page]

Page MenuHomePhabricator

Provide a way to show TemplateData content in custom format in template documentation
Open, LowestPublic

Description

Please provide a way for TemplateData authors to produce other layouts for display, in additio to the table format. For example, if you have this data for Template:Note:

{
	"params": {
		"message": {
			"label": "Message",
			"description": "The text of the note",
			"example": "Remember to brush your teeth every morning.",
			"type": "string",
			"required": true
		},
		"small": {
			"label": "Small",
			"description": "Display in a smaller format",
			"example": "yes",
			"type": "boolean",
			"default": "no"
		}
}

wouldn't it be awesome if the <templatedata> tag could generate wikitext docs and examples like this?

Usage:

{{note
| message=<The text of your note> (required string)
| small=<Display in a smaller format> (optional boolean, default=no)
}}

Example:

{{note
| message=Remember to brush your teeth every morning
| small=yes
}}

Even better, if <templatedata> could display more than one of these formats automatically (say, the wikitext format followed by the table format), that would be ideal.

Justification: the table format is great, but it doesn't show an example of usage.

Event Timeline

maiden_taiwan raised the priority of this task from to Needs Triage.
maiden_taiwan updated the task description. (Show Details)
maiden_taiwan added a project: TemplateData.

@Jdforrester-WMF how is this VE? The question is about showing wikitext examples.

@Jdforrester-WMF how is this VE? The question is about showing wikitext examples.

All TemplateData tasks are tagged VE so we can find them quickly.

Jdforrester-WMF renamed this task from Alternate layouts for TemplateData display to Consume TemplateData on-page in the template description to automatically prompt the user with pre-filled example wikitext blocks to copy.Apr 19 2016, 7:26 PM
Jdforrester-WMF triaged this task as Lowest priority.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.
Dvorapa renamed this task from Consume TemplateData on-page in the template description to automatically prompt the user with pre-filled example wikitext blocks to copy to Provide a way to show TemplateData content in custom format in template documentation.Aug 13 2017, 6:56 PM
Dvorapa renamed this task from Provide a way to show TemplateData content in custom format in template documentation to Provide a way to show TemplateData content in custom format on template's docpage.
Dvorapa renamed this task from Provide a way to show TemplateData content in custom format on template's docpage to Provide a way to show TemplateData content in custom format on template's documentation.
Dvorapa renamed this task from Provide a way to show TemplateData content in custom format on template's documentation to Provide a way to show TemplateData content in custom format in template documentation.

This seems like it's enabled by MCR.

I don't think this should be flagged as "lowest priority"

https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:TemplateData&oldid=888350098#Making_the_TemplateData_table_customisable

Users simply wont bother putting effort on TemplateData because it just duplicates things, and that too with various limitations.

IMHO, for this to be successful (i.e. TemplateData/VE), this should be quite a priority.