TemplateData: Provide property "example" for template parameters
Closed, ResolvedPublic

Description

From
https://www.mediawiki.org/wiki/Thread:VisualEditor/Feedback/About_TemplateData

'(...) would it be possible to add new parameter "example" (where is example text what should be added to the parameter) in addition "label", "description", "type" and "required"?'


Version: unspecified
Severity: enhancement

bzimport added a project: TemplateData.Via ConduitNov 22 2014, 2:04 AM
bzimport set Reference to bz51049.
He7d3r created this task.Via LegacyJul 9 2013, 5:14 PM
Stryn added a comment.Via ConduitFeb 25 2014, 6:32 PM

Any progress?

Jdforrester-WMF lowered the priority of this task from "High" to "Normal".Via WebDec 2 2014, 9:16 PM
Jdforrester-WMF moved this task to Next-up on the TemplateData workboard.
gerritbot added a subscriber: gerritbot.Via ConduitMar 4 2015, 8:33 PM

Change 194386 had a related patch set uploaded (by Mooeypoo):
Add an example property to parameters

https://gerrit.wikimedia.org/r/194386

gerritbot added a project: Patch-For-Review.Via ConduitMar 4 2015, 8:33 PM
gerritbot added a comment.Via ConduitMar 4 2015, 11:34 PM

Change 194416 had a related patch set uploaded (by Mooeypoo):
Show the field's example if it exists

https://gerrit.wikimedia.org/r/194416

Mooeypoo claimed this task.Via WebMar 4 2015, 11:49 PM
Mooeypoo moved this task to Doing on the TemplateData workboard.
gerritbot added a comment.Via ConduitMar 9 2015, 9:34 PM

Change 194416 merged by jenkins-bot:
MWParameterPage: Show the field's example if it exists

https://gerrit.wikimedia.org/r/194416

He7d3r added a project: user-notice.Via WebMar 9 2015, 10:04 PM
gpaumier moved this task to Announce in next Tech/News on the user-notice workboard.Via WebMar 10 2015, 3:03 PM
gpaumier moved this task to In current Tech News draft on the user-notice workboard.Via WebMar 12 2015, 7:57 PM
gpaumier moved this task to Recently announced in Tech/News on the user-notice workboard.Via WebMar 13 2015, 10:15 PM
Liuxinyu970226 added a subscriber: Liuxinyu970226.Via WebMar 15 2015, 12:37 AM
Krinkle added a comment.Via WebMar 18 2015, 4:26 PM

The feature support in MWParameterPage is a bit presumptuous as the exact definition and property name are still being reviewed upstream in TemplateData.

Anyway, this feature seems useful, but I'd like to be more explicit about at least one use case before we land it. The talk thread that requests it didn't seem to note anything about the existing properties description, default and autofill which currently cover the use case of showing what a field is for and what kind of value it should have.

I take it it will be used as placeholder in a user interface. However in VisualEditor the default is currently also displayed in the placeholder attribute. And the (already merged) conditional implementation of that does indeed ignore the example value if there is a default. And it seems there is no difference communicated to the user visually to distinguish example from default.

If the user won't be able to tell the difference, can authors?

I feel like the feature would be useful, but it is imho not sufficiently clear in its specification, implementation and current use in VisualEditor to offset it from the other existing features. And I imagine this will lead to confusion or incorrect usage by authors and users.

gpaumier moved this task to Archive on the user-notice workboard.Via WebMar 19 2015, 5:47 PM
Liuxinyu970226 removed a subscriber: Liuxinyu970226.Via WebMar 27 2015, 12:03 AM
Hypergrove added a subscriber: Hypergrove.Via WebApr 3 2015, 9:42 PM
gerritbot added a comment.Via ConduitApr 10 2015, 4:49 PM

Change 194386 merged by jenkins-bot:
Add an example property to parameters

https://gerrit.wikimedia.org/r/194386

Etonkovidova added a subscriber: Etonkovidova.Via WebApr 14 2015, 8:14 PM

Checked in betalabs - 'Example (en)' was added to Template documentation editor.

matej_suchanek moved this task to In current Tech News draft on the user-notice workboard.Via WebApr 17 2015, 12:42 PM
gpaumier moved this task to Recently announced in Tech/News on the user-notice workboard.Via WebApr 20 2015, 4:11 PM
gpaumier moved this task to Archive on the user-notice workboard.Via WebApr 23 2015, 9:47 PM
gerritbot added a comment.Via ConduitApr 28 2015, 3:48 PM

Change 207123 had a related patch set uploaded (by Krinkle):
Add example property to HTML rendering

https://gerrit.wikimedia.org/r/207123

gerritbot added a project: Patch-For-Review.Via ConduitApr 28 2015, 3:48 PM
gerritbot added a comment.Via ConduitApr 29 2015, 12:49 AM

Change 207123 merged by jenkins-bot:
Add example property to HTML rendering

https://gerrit.wikimedia.org/r/207123

Add Comment