Page MenuHomePhabricator

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

Details

Reference
bz65862

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:12 AM
bzimport set Reference to bz65862.

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

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.

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

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

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.

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

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