VisualEditor: If the TemplateData description for a parameter is just whitespace, then hide the help/information button
Closed, ResolvedPublic

Description

If the "description" field for TemplateData is empty, clicking the help/information button (an i with a circle around it) for the parameter produces a very skinny, empty box. Nothing should be displayed when there is no description to display.

Alternatively, it's possible that some standard text could be put in the box, like "There is no description for this item".


Version: unspecified
Severity: minor

bzimport set Reference to bz65862.
Whatamidoing-WMF created this task.Via LegacyMay 28 2014, 5:26 PM
Jdforrester-WMF added a comment.Via ConduitMay 29 2014, 7:43 PM

I thought we had disabled these, but apparently not. Bah.

Krenair added a comment.Via ConduitMay 30 2014, 12:44 PM

If the parameter is required, I do get 'Field is required.' which should be shown still. But if it's not required, then the help/information button is disabled... No empty box.

Krenair added a comment.Via ConduitMay 30 2014, 12:46 PM

WhatamIdoing, can you perhaps give an example page where it does this?

Whatamidoing-WMF added a comment.Via ConduitMay 30 2014, 3:08 PM

Open the infobox in https://en.wikipedia.org/wiki/Aberystwyth and look at the parameter "os_grid_reference".

The original report is at https://en.wikipedia.org/w/index.php?oldid=610519258#Info_on_template_fields

Krenair added a comment.Via ConduitMay 30 2014, 3:12 PM

The description is set as a single space for this parameter, so I think this is expected behaviour.

Whatamidoing-WMF added a comment.Via ConduitMay 30 2014, 5:07 PM

Ah: the TemplateData at https://en.wikipedia.org/wiki/Template:Infobox_UK_place/doc#TemplateData says,

"os_grid_reference": { "label": "os grid reference", "description": " ", "type": "string", "required": false },

If it said this instead,

"os_grid_reference": { "label": "os grid reference", "description": "", "type": "string", "required": false },

or perhaps this:

"os_grid_reference": { "label": "os grid reference", "type": "string", "required": false },

(if it's permitted to omit the description item), then this should go away.

gerritbot added a comment.Via ConduitMay 30 2014, 5:20 PM

Change 136348 had a related patch set uploaded by Alex Monk:
Trim description when working out whether or not we should disable the info button

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

Jdforrester-WMF added a comment.Via ConduitMay 30 2014, 5:41 PM

Thanks!

gerritbot added a comment.Via ConduitMay 30 2014, 6:29 PM

Change 136348 merged by jenkins-bot:
Trim description when working out whether or not we should disable the info button

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

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.