Template talk:Update span
Appearance
(Redirected from Template talk:Update span/doc)
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
Template-protected edit request on 5 February 2020
[edit]This edit request to Template:Update inline span has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Content:
| content = {{{text|{{{1|}}}}}}
Needs to be replaced with:
| content = {{{text|{{{1|<includeonly>{{error|This template '''must''' be used with non-empty {{para|text}} parameter!}}</includeonly><noinclude>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</noinclude>}}}}}}
as in {{Synthesis inline span}}. Both to show the example of the usage on the template page and to show the error when it's used without text. · • SUM1 • · (talk) 12:38, 5 February 2020 (UTC)
- Not done: This would break transclusions of {{Update after}}, which does not require
|text=
. You can't just say that a parameter is required in the documentation and then try to enforce that requirement. Please fix the documentation. – Jonesey95 (talk) 14:14, 5 February 2020 (UTC)- @Jonesey95: I didn't enforce anything or say anywhere in the documentation that it was required. I only changed one TemplateData object. And it wasn't "just me saying" anything, I did it based on the way {{Synthesis inline span}} and {{Clarify span}} already were (with the text "required"). I'm not sure what {{Update after}} has to do with it yet, they seem to be entirely independent templates to me, but do explain. · • SUM1 • · (talk) 20:31, 5 February 2020 (UTC)
- Please look again at your edit to the Template Data, which changed "suggested" to "required". If you do not know how {{Update after}} is related to this template, that is fine, as we all proceed along a learning curve, but editing template programming code requires a deeper understanding of how changes to that code can manifest in articles and in other templates. That understanding is gained through experimentation (in sandboxes and with testcases pages) and small changes, along with exploration of the links available to you from template pages.
- In this case, I clicked on "What links here", changed the namespace to Template, and hid links and redirects, and saw that {{Update after}} transcludes this template. If you look at the documentation for that template (and for this one), you will see that there is no requirement that the
|text=
parameter be populated. You can look at the monthly error report for {{Update after}} and see that|text=
is used only 80 times, out of 1,988 articles where that template is used. Your proposed code change to this template would have placed incorrect big red error messages on about 1,900 articles. – Jonesey95 (talk) 20:44, 5 February 2020 (UTC)- @Jonesey95: Fair enough, I had no clue. But that tool does look handy. Makes me wonder why this template even exists if it's being used like {{Update after}} or {{Update inline}}. And for some reason {{Update after}} is designed to be used like {{Update inline span}} should be. So, what I'm gathering is the deal was about how it was being used and how it would've been presented to users, not that I was breaking something. · • SUM1 • · (talk) 21:22, 5 February 2020 (UTC)
- Wikipedia editors are endlessly creative, and will do things with templates that you don't expect. Unfortunately, that means that when you want to change how a template works, you have to do research to determine if there will be consequences that you would not normally expect. If your research uncovers conditions that you do not expect, you need to adjust your plan accordingly. A good programmer looks both ways before crossing a one-way street. (attribution: paraphrasing Doug Linder) – Jonesey95 (talk) 21:40, 5 February 2020 (UTC)
- @Jonesey95: Thank you for that. I'm going to go and test some other edits in the sandboxes of various cleanup templates, but I've no idea how easy it will be given that I'm editing the documentation, which does not have a sandbox version, and not the template itself. · • SUM1 • · (talk) 22:01, 5 February 2020 (UTC)
- @SUM1: {{update inline}} and {{update inline span}} are normal maintenance tags, that take a
|date=
and display the tag like any other. {{update after}} is something rather different. Read its documentation for details. Anomie⚔ 00:58, 6 February 2020 (UTC)- @Anomie: Thank you. What I meant was that {{Update after}} has a usage (at the bottom of its "Examples") that involves simple span-highlighting of text, with no date attached, which it seems to obtain by transclusion of {{Update inline span}}. If they are for such different purposes, what is the point in {{Update after}} transcluding {{Update inline span}} (and preventing it from being marked as required for its only purpose, highlighting text, hence why I did so) rather than having its own span coding? · • SUM1 • · (talk) 01:25, 6 February 2020 (UTC)
- As the template's documentation indicates, it displays the maintenance indicator only after a specified date passes. When it does display the indicator, it should display the same indicator that {{update inline}} or {{update inline span}} do. That's accomplished by using {{update inline span}} instead of by duplicating the code. As for why it has an optional span, you'd have to ask the person who added that in Special:Diff/606603461. Anomie⚔ 11:53, 6 February 2020 (UTC)
- @Anomie: Well according to the revision history, it was actually yourself who added the {{Update inline span}} template to {{Update after}}'s code in May 2018. Do you think, considering this information that {{Update inline span}} may be better off being reserved as requiring text, that {{Update after}} could go back to using its own code? I don't see any reason at all why it should be using {{Update inline span}}'s code given this. Any changes between the two are entirely negligible, since it has an entirely different purpose that doesn't require span functionality most of the time, so in fact it has an explicit reason to be different. I just went through and fixed the 6/15 {{Update inline span}} instances that weren't including text (on Translation lookaside buffer, Brock (Pokémon), Bobby Murcer, Turkey, Immigration to China, Moisie River Aquatic Reserve), so no ugly errors will show up. · • SUM1 • · (talk) 14:36, 7 February 2020 (UTC)
- I think you may be on the right track, but some cleanup might need to happen. This report shows 45 articles with {{update after}} using
|text=
. I haven't looked at them. – Jonesey95 (talk) 15:30, 7 February 2020 (UTC) - @SUM1: You should look a little closer. I refactored {{update inline span}} out of {{update after}} specifically to allow for tagging of statements in situations where "update after" was not appropriate, in conjunction with Wikipedia:Redirects for discussion/Log/2018 June 3#Template:Update needed (although all the redirects wound up not using the "span" variant). The span logic was added earlier by someone else, as I linked. Anomie⚔ 15:46, 7 February 2020 (UTC)
- @Anomie: Right, so what you're trying to say is someone added span functionality using {{Fix-span}}, then you decided to create a separate template just for that functionality, but then you did what I'm saying should be changed which is to then transclude that template back into {{Update after}}. Back to what I originally said, would you agree that it is therefore appropriate, based on everything I've said before, based on the practice of {{Clarify span}} and {{Synthesis inline span}} rightfully requiring text, to de-transclude this template and let it function as a standalone counterpart to {{Update inline}} corresponding to those other two templates? · • SUM1 • · (talk) 16:29, 7 February 2020 (UTC)
- No, I wouldn't agree to that, on the grounds of code duplication. Anomie⚔ 17:44, 7 February 2020 (UTC)
- @Jonesey95: Well the idea is that won't matter because they'll no longer be using a transcluded {{Update inline span}} template. I don't want to and shouldn't need to alter the usage of span functionality within {{Update after}}. That template literally does not need text, so there was nothing wrong with the non-transcluded version, but {{Update inline span}} does.· • SUM1 • · (talk) 16:29, 7 February 2020 (UTC)
- @Anomie: Right, so what you're trying to say is someone added span functionality using {{Fix-span}}, then you decided to create a separate template just for that functionality, but then you did what I'm saying should be changed which is to then transclude that template back into {{Update after}}. Back to what I originally said, would you agree that it is therefore appropriate, based on everything I've said before, based on the practice of {{Clarify span}} and {{Synthesis inline span}} rightfully requiring text, to de-transclude this template and let it function as a standalone counterpart to {{Update inline}} corresponding to those other two templates? · • SUM1 • · (talk) 16:29, 7 February 2020 (UTC)
- I think you may be on the right track, but some cleanup might need to happen. This report shows 45 articles with {{update after}} using
- @Anomie: Well according to the revision history, it was actually yourself who added the {{Update inline span}} template to {{Update after}}'s code in May 2018. Do you think, considering this information that {{Update inline span}} may be better off being reserved as requiring text, that {{Update after}} could go back to using its own code? I don't see any reason at all why it should be using {{Update inline span}}'s code given this. Any changes between the two are entirely negligible, since it has an entirely different purpose that doesn't require span functionality most of the time, so in fact it has an explicit reason to be different. I just went through and fixed the 6/15 {{Update inline span}} instances that weren't including text (on Translation lookaside buffer, Brock (Pokémon), Bobby Murcer, Turkey, Immigration to China, Moisie River Aquatic Reserve), so no ugly errors will show up. · • SUM1 • · (talk) 14:36, 7 February 2020 (UTC)
- As the template's documentation indicates, it displays the maintenance indicator only after a specified date passes. When it does display the indicator, it should display the same indicator that {{update inline}} or {{update inline span}} do. That's accomplished by using {{update inline span}} instead of by duplicating the code. As for why it has an optional span, you'd have to ask the person who added that in Special:Diff/606603461. Anomie⚔ 11:53, 6 February 2020 (UTC)
- @Anomie: Thank you. What I meant was that {{Update after}} has a usage (at the bottom of its "Examples") that involves simple span-highlighting of text, with no date attached, which it seems to obtain by transclusion of {{Update inline span}}. If they are for such different purposes, what is the point in {{Update after}} transcluding {{Update inline span}} (and preventing it from being marked as required for its only purpose, highlighting text, hence why I did so) rather than having its own span coding? · • SUM1 • · (talk) 01:25, 6 February 2020 (UTC)
- Wikipedia editors are endlessly creative, and will do things with templates that you don't expect. Unfortunately, that means that when you want to change how a template works, you have to do research to determine if there will be consequences that you would not normally expect. If your research uncovers conditions that you do not expect, you need to adjust your plan accordingly. A good programmer looks both ways before crossing a one-way street. (attribution: paraphrasing Doug Linder) – Jonesey95 (talk) 21:40, 5 February 2020 (UTC)
- @Jonesey95: Fair enough, I had no clue. But that tool does look handy. Makes me wonder why this template even exists if it's being used like {{Update after}} or {{Update inline}}. And for some reason {{Update after}} is designed to be used like {{Update inline span}} should be. So, what I'm gathering is the deal was about how it was being used and how it would've been presented to users, not that I was breaking something. · • SUM1 • · (talk) 21:22, 5 February 2020 (UTC)
- @Jonesey95: I didn't enforce anything or say anywhere in the documentation that it was required. I only changed one TemplateData object. And it wasn't "just me saying" anything, I did it based on the way {{Synthesis inline span}} and {{Clarify span}} already were (with the text "required"). I'm not sure what {{Update after}} has to do with it yet, they seem to be entirely independent templates to me, but do explain. · • SUM1 • · (talk) 20:31, 5 February 2020 (UTC)