Jump to content

Template talk:Documentation

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 04:16, 20 December 2021 (Archiving 1 discussion(s) to Template talk:Documentation/Archive 10) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

WikiProject iconTemplates
WikiProject iconThis template (like all templates) is within the scope of WikiProject Templates, a group dedicated to improving the maintenance of Wikipedia's templates. This particular template is especially important to the project because it is used in the maintenance of other templates. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.

Purge button for just-created documentation

When this template has been added to a page but there appears to be no subpage, the only button displayed is [create]. Often in this situation, the subpage actually does exist but the template page just needs to be purged, so it'd be nice if the purge button was displayed, just as it is when the documentation has been found. {{u|Sdkb}}talk 00:17, 11 February 2021 (UTC)[reply]

Mr. Stradivarius, I'm not overly comfortable with Lua. As you seem to be the primary editor of the module, could you help implement this? {{u|Sdkb}}talk 23:06, 11 October 2021 (UTC)[reply]
Code-wise this should be enough: Special:Diff/1035088965/1049459408. See also the new test failure of testRenderStartBoxLinksDoesntExist at Module talk:Documentation/testcases.
Is there a consensus for such a change? —⁠andrybak (talk) 23:35, 11 October 2021 (UTC)[reply]
@Andrybak, there's WP:SILENT consensus, given that it's not too huge a change. I'll be happy to make it myself if we're confident the technical aspect is sound. I haven't seen that test failure thing before—does that indicate that the technical aspect of the change is sound? {{u|Sdkb}}talk 02:24, 12 October 2021 (UTC)[reply]
Sdkb, sorry, I wasn't clear. The test failure is expected – the new sandbox version is outputting the new link, for which a testcase update would be needed.
The change in the output is also visible on the page Template:Documentation/testcases: for Template:Documentation/testcases/nodoc (second box above Template:Documentation/testcases#Notest), the sandbox output has the [purge] link, while the live template (for the same "nodoc" subpage) does not. —⁠andrybak (talk) 03:26, 12 October 2021 (UTC)[reply]
As for consensus for this, I don't mind either way. This use case is rare (editors could use Preferences → Gadgets → Appearance → Tick Add a "Purge" option to the top of the page [...] with keyboard shortcut for purging), but the cost is negligible. —⁠andrybak (talk) 03:32, 12 October 2021 (UTC)[reply]
Okay, implemented; thanks for the help! {{u|Sdkb}}talk 04:09, 12 October 2021 (UTC)[reply]

Proposal: Don't display in certain namespaces

Occasionally editors accidently use this template in the Article namespace, often because they simply copy the raw template code instead of invoking it. This generates a ugly empty green box which has no value. As I can't see a reasonable use for having a working {{documentation}} inside article namespace I would like to propose that the templates code be changed to suppress displaying inside the Article namespace. -- Asartea Talk | Contribs 17:31, 26 June 2021 (UTC)[reply]

This was mentioned on Discord and we found several cases where this occurred in the mainspace. I think the template shouldn't display at all in the mainspace, but rather place the page in Category:Pages with templates in the wrong namespace which should serve to making other related issues spotted more quickly as well. --Trialpears (talk) 17:42, 26 June 2021 (UTC)[reply]
I'd support this. A namespace detection wrapper is trivial to implement, and as Trialpears says we can then add a category to track them. There is absolutely no reason to display {{documentation}} in mainspace. firefly ( t · c ) 07:59, 30 June 2021 (UTC)[reply]

I've sandboxed a version that hides any transclusions in mainspace and instead adds Pages with templates in the wrong namespace. Would like to get a second opinion on implementation given localization concerns and such though (especially since the module has code indirectly dealing with doc pages for articles). Otherwise I will implement it in a week anyway. --Trialpears (talk) 11:20, 8 July 2021 (UTC)[reply]

Prefill TemplateData

 You are invited to join the discussion at Wikipedia talk:Template documentation § Including TemplateData. I suggest there that TemplateData should be included in the documentation prefill content. SWinxy (talk) 06:12, 23 November 2021 (UTC)[reply]

Preload page missing

On Module:Documentation/config#L-329 Template:Documentation/preload-filespace gets called but that page doesn't exist. Should it be created? What should its content be? - Klein Muçi (talk) 00:11, 20 December 2021 (UTC)[reply]