Page MenuHomePhabricator

Bold parameter names when they have values (template dialog)
Closed, ResolvedPublic5 Estimated Story Points

Description

In order to provide an overview of which added parameters have values or not, we will add a visual indication of it's filled. This could be to easily remove empty fields or quickly find ones which still need values.

Requirements

  • Bold all parameter names in the sidebar which are both added to the template and have a value
  • Parameter names become bolded as soon as one character is entered in the field
  • Parameter names are un-bolded when the fields are emptied

Mock

Screen Shot 2022-05-18 at 16.21.03.png (830×662 px, 107 KB)

Event Timeline

Glad it has been pushed so fast. But still it would be nice to be able somehow mass uncheck non-bold parameters with 1 click.

Change 805835 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] [WIP] Bold parameters that contain some value

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

There's an interesting edge-case, that I want to mention here:

When a parameter has a default value, an empty field does not necessarily mean, that the parameter "has no value" and can be removed. The empty field could be an intentional override of the default.

So when TemplateData specifies a default for a parameter and the field shows any other value than the default, the parameter will be bold.

Good point to consider how the bolding reacts to this situation.

When a parameter has a default value, an empty field does not necessarily mean, that the parameter "has no value" and can be removed. The empty field could be an intentional override of the default.

I think you mean autovalue? An empty field with an autovalue would be an overrride, but an empty field with the default means that the default gets used.

I think that the meaning of "bold" should stay consistent (there is a value in the field), no matter the other circumstances. Then users don't have to guess what it means in a particular situation. This means:

  • For parameters with a default, only bold it if the user has added a value (same as any other parameter). It's true that even when empty it may have an effect on the template, but the placeholder text will show this in the field so that the user can navigate if they want to remove it or not.
  • For parameters with an autovalue, I would bold it as soon as it's added (without user input) because it will have something in the field.

Let me know if any of this is unclear, but I think this means that the ticket requirements stay as-is.

Change 805835 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Bold parameters that contain some value

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