Page MenuHomePhabricator

Add a class to empty TemplateData fields titles (dt)
Closed, DuplicatePublic

Description

The "mw-templatedata-doc-muted" class is currently added to empty TemplateData fields (dd).
However, in order to hide the whole line by CSS, that same class is needed on the title fields (dt) too.

TD hide.png (328×865 px, 26 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 445464 had a related patch set uploaded (by Iniquity; owner: Iniquity):
[mediawiki/extensions/TemplateData@master] Add a class to empty TemplateData fields titles (dt) to hide the whole line by CSS

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

Is there any way to get this straightforward patch reviewed and checked in? Maybe change the reviewer?

@The_RedBurn: As IMHO usual in free software projects, not every task or patch receives feedback due to the sheer number of tasks and patches because of limited developer resources.

@The_RedBurn What is the reason for hiding the line? The fact that default is empty, for example, seems like factual information added by a user that should be preserved. Why would we want to hide that?

EDIT: I was mistaken in thinking "empty" was output based on user input by a template editor. Rather, it is something the TemplateData extension generates when there is no value specified.

The muted/null rendering was introduced for the description field originally so that it would not be blank but rather communicate to users in some way that there is nothing (as opposed to a broken column in the table).

However, this code was re-used to also show placeholders for all possible types of information, even when they are not specified, and when they do not have a column in the table. That seems like a mistake (probably something I did at some point, sorry!). I think this confuses users. Let's remove it entirely?

In :fr, we'd like to use TemplateData as parameters documentation to keep the documentation synchronized with TemplateData. There's already some styling in place (example), but these empty fields take space without adding anything useful.

If you mean to remove entirely the Default, Example and Auto value when they're empty (including the <dt>), yes feel free to do it!

Yes, I am agreeing that the null-representation is not useful. We should not hide it, we should remove it :)

I just discovered this task when gerrit detected that the patch suggested in this task conflicts with the one I uploaded completely removing the sections when empty for T125333. Should both tasks be merged (I don't know how to do that on Phabricator) or should I update the commit message of my patch to add this task too at the bottom?

Change 445464 abandoned by Iniquity:
Add a class to empty TemplateData fields titles (dt) to hide the whole line by CSS

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