Template talk:Documentation
![]() | Template:Documentation is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
![]() | Templates | |||
|
![]() | To help centralise discussions and keep related topics together, all talk pages of subtemplates, and Module talk:Documentation, redirect here |
![]() | Text has been copied to or from this page; see the list below. The source pages now serve to provide attribution for the content in the destination pages and must not be deleted as long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below. |
|
||||||||||
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
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)
- 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)
- 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)- @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)
- 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)
- As for consensus for this, I don't mind either way. This use case is rare (editors could use Preferences → Gadgets → Appearance →
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)
- Okay, implemented; thanks for the help! {{u|Sdkb}} talk 04:09, 12 October 2021 (UTC)
- @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)
- Code-wise this should be enough: Special:Diff/1035088965/1049459408. See also the new test failure of
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)
- 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)
- 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)
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)
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)
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)