:Wikipedia:Bots/Requests for approval/SdkbBot 4
[[User:SdkbBot|SdkbBot 4]]
{{BRFA help}}
{{Newbot|SdkbBot|4}}
Operator: {{botop|Sdkb}}
Time filed: 05:08, Wednesday, August 2, 2023 (UTC)
Function overview: Replaces {{t|Collapsible option}} with {{t|Navbox documentation}} (a wrapper of
Automatic, Supervised, or Manual: Automatic
Programming language(s): AutoWikiBrowser
Source code available: The bot will be operated by running through the list of template-space pages from the RegEx search query
with a find and replace for {{tnl|collapsible option}}{{right arrow}}{{tnl|navbox documentation}}. It will use the edit summary {{tq|Switch to more comprehensive documentation}}.
Links to relevant discussions (where appropriate): I don't know of anyone who prefers less complete documentation, so I anticipate this will be an uncontroversial task. I'll drop notices of this BRFA at WT:Template documentation, WT:Navigation template, Help talk:Collapsing, Template talk:Navbox documentation, and Template talk:Collapsible option to ensure visibility.
Edit period(s): One-time run
Estimated number of pages affected: 39,000
Namespace(s): Template
Exclusion compliant (Yes/No): Yes
Function details: Many navboxes have only {{t|Collapsible option}} (which I recently redesigned) as a kind of quasi-documentation. {{t|Navbox documentation}}, created by {{u|MJL}} in 2019, is a wrapper of 25,00039,000 identified so far.
=Discussion=
Kudos to {{u|Certes}} for helping me figure out the search query. I conducted {{plainlink|1=https://en.wikipedia.org/w/index.php?title=Special:Contributions/Sdkb&target=Sdkb&dir=prev&offset=20230802005555&limit=117 a test}} with my non-bot account of a little over a hundred instances earlier and ran into no issues. {{u|Sdkb}} talk 05:08, 2 August 2023 (UTC)
:So this is potentially a dumb question, but if all you are doing is making a wrapper for collapsible option that does little more than put a green box around it and (for some reason) add TemplateData, why not just do that to {{t|collapsible option}} itself and save the hassle of having to replace 25k templates? {{ppor|no}} Primefac (talk) 08:02, 2 August 2023 (UTC)
::Not a stupid question! Since {{t|Collapsible option}} is just a chunk of text, it's designed to go within a larger documentation, and is used that way in some other instances (as many as {{plainlink|1= https://en.wikipedia.org/w/index.php?search=hastemplate%3A%22collapsible+option%22+hastemplate%3A%22documentation%22+-hastemplate%3A%22navbox+documentation%22&title=Special:Search&profile=advanced&fulltext=1&ns10=1&searchToken=9ohnnc8e9qy4vgvjpk0vh6twp 15,000}}). Converting it directly would break those. {{u|Sdkb}} talk 13:31, 2 August 2023 (UTC)
::: I'm not sure I understood your response, but am I correct that you want it to do one thing when it's transcluded on its own, and another thing when it's transcluded in another template? If so, you may not need a bot for that, just an adjustment of the templates using Inclusion control or selective transclusion. I did this at French Wikipedia for their Régime de Vichy nav bar template (analogous to our {{tl|Vichy regime}} navbar). The template uses a subtemplate, /Participants, which is also a nav template in its own right which may be used on its own (that is, transcluded directly in the footer of an article as a nav bar), or may be transcluded in the main template, and appears differently in each case. Is this something like what you need to do? Mathglot (talk) 17:40, 2 August 2023 (UTC)
::: Rereading, I'm starting to get a better view, and could you not just further modify {{tl|collapsible option}} so it does what {{tl|navbox documentation}} does now, in those cases where you want it to do so? Still not sure I'm getting it. Maybe I should be asking a negative: in what cases do you not want to apply the bot? Is it just that the name of the new template is more transparent, so we could make {{tl|collapsible option}} a wrapper the other way around with a new param in the newer one, i.e., code of collapsible option gets moved into the newer one under conditional control of {{para|collapsible|yes}}, which would be set in {{tl|collapsible option}} when it transcludes the other one? Mathglot (talk) 18:18, 2 August 2023 (UTC)
::::@Mathglot, sorry for the confusion. Some examples might help. Here's a template that uses Collapsible option in a standalone way as a kind of proto-documentation; this is what I would be looking to convert to Navbox documentation, to make it look like this. This, on the other hand, is an example of template that uses Collapsible option as an element within a larger existing documentation. We don't want to change anything there (lest we end up with documentation-within-documentation).
::::I suppose it might theoretically be possible to change Collapsible option so that it tries to detect whether or not it's embedded within larger documentation, and only generates the green box etc. if it's standing alone (is that what you're suggesting?). I don't think that would be a wise approach, though. It would introduce a lot of complexity to Collapsible option. Generally speaking, we don't want a template that's trying to be both an element within documentation or a full documentation depending on the circumstances, unless we have no other option. Right now, Collapsible option is the element and Navbox documentation is the full doc, and keeping them both to maintain that distinction makes sense. This approach would also require us to worry about detection errors (e.g. navboxes that have additional documentation but lack the {{t|documentation}} template; this is plausible given that Collapsible option is an old template slightly predating
::::Does that help clarify? Cheers, {{u|Sdkb}} talk 19:41, 2 August 2023 (UTC)
::::: Yes, thanks. More edits now vs. cleaner later is probably a good tradeoff. Mathglot (talk) 20:18, 2 August 2023 (UTC)
Updated the query, which brings the number of affected pages up to 39,000. {{u|Sdkb}} talk 15:41, 2 August 2023 (UTC)
:{{BotTrial|edits=50}} Please do not mark these as minor so that there is a higher chance of feedback, especially since there has been little in the way of prior discussion over this matter. Primefac (talk) 16:06, 6 August 2023 (UTC)
::{{bottrialcomplete}} See {{plainlink|1=https://en.wikipedia.org/w/index.php?title=Special:Contributions/SdkbBot&target=SdkbBot&dir=prev&offset=20230801204948&limit=50 diff}} of edits. Cheers, {{u|Sdkb}} talk 06:33, 7 August 2023 (UTC)
:::{{t|BAG assistance needed}} Bumping, given no comments for three weeks. The trial appears to have gone smoothly, so I'm ready to move forward once approval is granted. Cheers, {{u|Sdkb}} talk 16:52, 28 August 2023 (UTC)
:::Looks good. Much better documentation. SWinxy (talk) 17:53, 28 August 2023 (UTC)
::::{{BotApproved}} Primefac (talk) 08:52, 30 August 2023 (UTC)
:The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard.