'(...) 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
'(...) 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
Change 194386 had a related patch set uploaded (by Mooeypoo):
Add an example property to parameters
Change 194416 had a related patch set uploaded (by Mooeypoo):
Show the field's example if it exists
Change 194416 merged by jenkins-bot:
MWParameterPage: Show the field's example if it exists
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.
Change 207123 had a related patch set uploaded (by Krinkle):
Add example property to HTML rendering