Page MenuHomePhabricator

Test instance: Can use TemplateData to mark entire templates as deprecated
Closed, ResolvedPublic8 Estimated Story Points

Description

Requirements

  • Add the possibility to mark templates as deprecated, add guidance to TemplateData.
  • Add the possibility to mark and fill in guidance in the TemplateData editor.
  • Templates marked as deprecated do not display in the list on the initial search dropdown to insert templates. If a user types the exact name of a template anyway, then they can add it. (This is the same current behavior as deprecated parameters.)
  • Show warning in TemplateData documentation, using OOUI MessageWidget (type: 'warning'), with the width matching the width of the table.

Mocks
TemplateData editor: add checkbox

Deprecated templates.png (420×700 px, 34 KB)

TemplateData editor: checked, with guidance input below
Deprecated template guidance.png (420×700 px, 43 KB)

Specs:

Screen Shot 2020-08-19 at 16.23.18.png (1×2 px, 334 KB)

TemplateData documentation message:

Deprecated template - message.png (500×909 px, 81 KB)

Event Timeline

ECohen_WMDE renamed this task from DRAFT - VE Dialog on the Test Instance: Add deprecated templates to TemplateData to VE Dialog on the Test Instance: Add deprecated templates to TemplateData.Aug 19 2020, 2:31 PM
ECohen_WMDE updated the task description. (Show Details)
ECohen_WMDE moved this task from Backlog to Ready for pickup on the WMDE-Templates-FocusArea board.
Lena_WMDE set the point value for this task to 8.Aug 20 2020, 9:26 AM

Note: we removed the part of this task relating to the 'top of dialog', which displays a warning in the VE dialog. This is also related to the changes to the design; once complete I'll just make a new task for VE implementation related to deprecated templates. The story points for this ticket might need to be updated.

awight renamed this task from VE Dialog on the Test Instance: Add deprecated templates to TemplateData to Test Instance: VE Dialog doesn't suggest deprecated templates; TemplateData editor can mark templates as deprecated.Sep 7 2020, 10:54 AM
awight renamed this task from Test Instance: VE Dialog doesn't suggest deprecated templates; TemplateData editor can mark templates as deprecated to POC: Can use TemplateData to mark entire templates as deprecated.Sep 7 2020, 11:02 AM

@ECohen_WMDE How should we change the static rendering of TemplateData? For example this table,

image.png (732×1 px, 105 KB)

There should probably be some red here, and the guidance text would appear.

For comparison, the less-structured existing method of marking a template as deprecated is to include the template {{Deprecated template}} which on English Wikipedia will render as:

image.png (83×1 px, 16 KB)

Maybe we should do the same—although it could be slightly odd to repeat similar but not equal text?

@awight - great catch! Agree, we should definitely put something here.

Please add a message below the title and sentence about formatting and above the table. The message should say "Warning: This template is marked as deprecated." followed by the template guidance if included in the TemplateData. Please use the OOUI MessageWidget (type: 'warning'), with the width matching the width of the table.

Deprecated template - message.png (500×909 px, 81 KB)

Change 626096 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/TemplateData@master] [WIP] TemplateData "deprecated" at template level

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

Lena_WMDE renamed this task from POC: Can use TemplateData to mark entire templates as deprecated to Test instance: Can use TemplateData to mark entire templates as deprecated.Sep 9 2020, 9:51 AM
Lena_WMDE changed the point value for this task from 8 to 5.
Lena_WMDE moved this task from Sprint Backlog to Doing on the WMDE-QWERTY-Sprint-2020-09-09 board.
ECohen_WMDE changed the point value for this task from 5 to 8.

@ECohen_WMDE
Should the "Deprecated guidance" header end with "(en)" like the other text inputs, and be translatable? I think this is correct because the message will be used in the interface. For now, I'll leave the string untranslateable for consistency with the shortcoming documented in T262526: TemplateData deprecated parameter guidance should be translatable.

I think I agree with your point that the static rendering should use the warning color rather than error red. However, I have a misgiving because the user really should migrate their template usage ASAP. This is a liminal case because it's much stronger than a "suggested" action, but just short of a "blocker". The template usage will eventually break if not updated. Either way, this is a minor detail and I'm fine going with whatever your judgment is of course, just wanted to make the question explicit.

The TemplateData part of this feature is live on the test instance.

Change 626362 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/VisualEditor@master] [POC] Don't list deprecated templates in autocomplete

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

Change 626362 abandoned by Awight:
[mediawiki/extensions/VisualEditor@master] [POC] Don't list deprecated templates in autocomplete

Reason:
Moved to a gitlab branch, https://gitlab.com/wmde/mediawiki-extensions-VisualEditor/-/tree/deprecated-templates

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

awight added a subscriber: awight.
Lena_WMDE claimed this task.
Lena_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2020-09-09 board.

Change 626096 abandoned by Awight:
[mediawiki/extensions/TemplateData@master] [POC] TemplateData "deprecated" at template level

Reason:
https://gitlab.com/wmde/mediawiki-extensions-TemplateData/-/tree/wmde-alpha-deploy

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

Will this nice feature be deployed on WMF wikis? Is there a new tracking task where we can follow its progression?