Topic on Extension talk:TemplateData

Small bug with warning message

6
Summary by Whatamidoing (WMF)
Sdkb (talkcontribs)

When I edit a template that has a TemplateData block on its documentation page, a warning appears ("Please note: there is already a TemplateData block on the related page"). However, when I edit a section of the documentation when there is already a TemplateData block in a different section, no such warning appears. This isn't the biggest issue, but it'd be nice to rectify. (It'd also be nice if, instead of a distracting warning, clicking on the button just redirected you to edit the documentation page; this would reduce both banner blindness and errors.)

Whatamidoing (WMF) (talkcontribs)

I think I've followed all of that, but could you give me a link so I can try it out?

Sdkb (talkcontribs)
Whatamidoing (WMF) (talkcontribs)

Right now:

  • If you edit the 'wrong' page, it warns you that TemplateData is present on the 'right' page.
  • If you edit a section of the 'right' page, it does not warn you that TemplateData is present in a different section of this page.

You propose:

  • (No change for the first point)
  • Adding a warning that TemplateData is present in a different section.

I wonder if this might be more annoying overall. There are almost 50 sections on that /doc page. I imagine that most people aren't trying to change the TemplateData (unless they're editing the TemplateData section itself). I think adding this warning might produce complaints about an "irrelevant" warning. I can imagine editors saying "Why is it telling me that TemplateData is in another section? I already know that! If I cared about TemplateData, I'd be editing the section named ==TemplateData==!"

Sdkb (talkcontribs)

Yeah, I think that speaks somewhat to my point in the parenthetical above. There's no strong need to have it at the main template, either; editors could make a similar point about it being irrelevant there. Instead of the existing workflow, I think it would be better if there was initially no warning, but if someone clicks the Manage TemplateData button, a notice pops up saying "There is already a TemplateData block on the documentation page/in another section. Click proceed to edit it there (you will lose any unsaved work)." That would be better since it'd then only affect people actually trying to edit the TemplateData, so the banner blindness would be significantly reduced.

Tacsipacsi (talkcontribs)

The proposed solution with the TemplateData editor adding the warning (instead of the static warning banner) looks good, with one exception: if someone adds a TemplateData block manually, without the wizard, they’re not warned. Probably this use case is rare, but possible; for example importing TemplateData from another wiki/page is much more convenient using copy&pasting wikitext than with retyping everything in the wizard.

Reply to "Small bug with warning message"