Template talk:Documentation

From Test Wiki
Revision as of 20:49, 9 December 2025 by MacFan4000 (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Latest comment: Saturday at 20:20 by Pppery in topic Documentation template source code

Template:Permprot Template:Centralized talk page Template:WikiProject banner shell Template:Copied User:MiszaBot/config

Heading displays wrongly in mobile view

In mobile but not desktop view, there is no space between Documentation and the first link: for example I see

DocumentationTemplate:Bracket Template:Bracket Template:Bracket Template:Bracket

instead of

Documentation Template:Bracket Template:Bracket Template:Bracket Template:Bracket

This is true both on the mobile webpage and in the Android app, but the desktop view is fine. Using |heading=Documentation  as a workaround produces the correct appearance on mobile, but the extra space is then visible in desktop view. Musiconeologist (talk) 12:35, 21 March 2025 (UTC)Reply

Vector 2022 imports this rule. Minerva does not. This is a bug/difference in Minerva. Izno (talk) 21:10, 26 September 2025 (UTC)Reply
phab:T405802, but I couldn't say if it will be fixed/corrected. Izno (talk) 21:18, 26 September 2025 (UTC)Reply

Background Color Lint error "coming from inside the house"

While resolving Lint background color error messages, I've noticed that the occasional article's error will trace all the way back to Template:Documentation and the invoke:documentation statement (i.e. the {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}} statement).

A current example is the article for Colin Jackson:

Typically the root issue behind this Lint error is the use of the 'background:' or 'background-color:' CSS properties without a corresponding 'color:' property (for specifying font color; preferably something that contrasts well with the specified background color).

Is it possible for someone to determine what color-related hi-jinks might be going on behind the scenes (and either remove or complete any incomplete background:/color: property pairings)? Resolving this should presumably clear at least 60K lint errors (i.e. any pages using Navboxes).

Many thanks in advance,
SirOlgen (talk) 22:24, 25 August 2025 (UTC)Reply

This report is conflating two completely separate issues, which is why you're being led down a garden path.
Issue 1: There's a lint error somewhere in the navboxes at the bottom of Colin Jackson. Probably one of the navboxes on that article sets a background-color without a color.
Issue 2: There's a lint error somewhere on Template:Navboxes/doc, presumably in one of the navboxes called at Template:Navboxes/doc#Examples.
These two lint errors are independent of each other, and fixing one will have nothing do do with the other. * Pppery * it has begun... 22:34, 25 August 2025 (UTC)Reply
Thanks much for the clarification. I'll see what I can do to root it (them?) out.
SirOlgen (talk) 22:40, 25 August 2025 (UTC)Reply
Culprits were...
Issue 1: Template:Footer Australia NC 110m Hurdles Men and Template:Footer European Indoor Champions 60m Men
Issue 2: Template:Navbox suite, Template:S-aft/doc, Template:S-bef/doc, Template:S-ttl/doc, Template:Slink, Template:Template-linking templates, Template:Template link general/doc, Template:Key top, Template:Color/doc, Template:Namespace and pagename-detecting templates, Template:Test case/doc, Template:Navboxes/testcases, Template:Country data United States/doc, Template:Country data Japan/doc, Template:Country data Germany/doc, Template:Hlist/doc, and Template:Yesno/doc (thus far... will have to come back to this as the significant other is feeling neglected)
It's quite the rabbit hole.
In any case, thanks again for the tips!
SirOlgen (talk) 04:10, 26 August 2025 (UTC)Reply

Template:Template edit request I've recently completed some edit requests for editor SirOlgen (talk · contribs), who has been working on these lint errors. Template {{Documentation}} is still throwing this error. I'm not well-versed in Lua, tho' I found a background color setting at the top of the styles.css module. I don't know how to add the text color, and that is what is needed to fix the lint error. Try to imagine how many templates there are with /doc pages that might benefit from fixing this. Can we hear from a Lua editor? P.I. Ellsworth , ed. – welcome! – 04:39, 2 October 2025 (UTC)Reply

PS. Later noted that there are other background color settings in that styles.css module. P.I. Ellsworth , ed. – welcome! – 04:59, 2 October 2025 (UTC)Reply
More garden paths, but I think I found both rabbits. I added color declarations to the .css page and to Template:Documentation/doc, which did not require an edit request. – Jonesey95 (talk) 12:49, 2 October 2025 (UTC)Reply
SirOlgen (talk · contribs), of the pages you list in "Issue 2" above, only Template:Navboxes/doc and Template:Navboxes/testcases are showing errors, probably due to one or more of the example templates on each page. The pages are not protected, so have fun with them once your SO is tired of your attention. – Jonesey95 (talk) 12:58, 2 October 2025 (UTC)Reply
@Jonesey95/@Paine Ellsworth, thanks for the recent assists. The pages listed under "Culprits were..." above were all updated to clear the color errors as I was going down the garden path. I never did make it back to resume the hunt from where I'd left off.
Regarding the persistent {{Navboxes}} color error, I have since noticed that it can be suppressed on pages using that template by explicitly declaring the color attribute in the titlestyle parameter (example). {{Navboxes/doc}} mentions that the titlestyle background "defaults to #CCCCFF", so I figured passing a text color would ensure a complete attribute pair. Wherever it is that this background color defaulting occurs, would adding companion text color defaulting nip this particular issue in the bud? – SirOlgen (talk) 18:11, 2 October 2025 (UTC)Reply
I believe that I have made color:inherit the default in Template:navboxes as of a moment ago, so you should not have to add titlestyle colors to any articles. Let me know if you notice any problems. I checked the template in both dark and light modes. – Jonesey95 (talk) 18:48, 2 October 2025 (UTC)Reply
Thanks for the module tweak. That does appear to have resolved the issue (with the subs as well), but I'll keep my eyes open going forward. – SirOlgen (talk) 19:28, 2 October 2025 (UTC)Reply

Update sandbox icon to match all other templates

Template:Fper

I think the icon that currently appears when viewing the sandbox of a template (which seems to come from Module:Documentation/config#L-34 and Template:Template sandbox notice) doesn't represent the concept well. (See an example of how it looks.) The sand is too brown, the lighting is off (all three objects seem to receive light from different light sources), and the colours are unusual. And it's not even a "sand box"! There is no box in the sandbox icon...

TemplateStyles' src attribute must not be empty.

I think it should be updated to use the standard sandbox icon, already used in all other sandbox templates, such as Template:Sandbox heading, Template:Sandbox notice, Template:Template sandbox, Template:Template sandbox heading, Template:Not a sandbox, and more.

TemplateStyles' src attribute must not be empty.

This icon uses less daunting colours and is more detailed while also adding more items to the box, such as the pencil and the document being changed. FaviFake (talk) 16:32, 26 September 2025 (UTC)Reply

Since this page is whatchlisted by 165 editors and none have responded after 17 days, I'll assume there's WP:SILENT consensus and apply the tper template. FaviFake (talk) 17:18, 13 October 2025 (UTC)Reply
Template:Complete2. P.I. Ellsworth , ed. – welcome! – 18:15, 13 October 2025 (UTC)Reply
Thanks @Paine Ellsworth, but I noticed that the old icon is still present in the editnotice when editing a template, such as here: [1]. I think this may be caused by Module:Documentation itself? Could you try making this change to Module:Documentation? Special:Diff/1280044025/1318783040.It's possible not even this will fix it, but I can't manage to find the origin of that specific edit notice. FaviFake (talk) 00:04, 26 October 2025 (UTC)Reply
That edit can't possibly do anything because it's in a Lua comment. * Pppery * it has begun... 00:05, 26 October 2025 (UTC)Reply
Yeah I thought it could be a comment, since it was gray and in italic. Does anyone know where that editnotice is coming from? FaviFake (talk) 00:07, 26 October 2025 (UTC)Reply
FOUND IT! It comes from Template:Editnotices/Namespace/Template and Template:Editnotices/Namespace/Module. The reason i couldn't find it is because it uses a .PNG file instead of the newer .SVG file. This is the change in Template:Editnotices/Namespace/Template that would fix the image:
Line 28: Line 28:
|testcases <small style="font-style: normal">([{{fullurl:{{FULLPAGENAME}}/testcases|action=edit&preload=Template:Documentation/preload-testcases}} create])</small> |testcases <small style="font-style: normal">([{{fullurl:{{FULLPAGENAME}}/testcases|action=edit&preload=Template:Documentation/preload-testcases}} create])</small>
}} pages. }} pages.
| image = [[File:Sandbox.png|40px|alt=|link=]] | image = [[File:Edit In Sandbox Icon - Color.svg|40px|alt=|link=]]
| class = plainlinks | class = plainlinks
}} }}
And change Template:Editnotices/Namespace/Module to:
Line 23: Line 23:
|testcases <small style="font-style: normal">([{{fullurl:{{FULLPAGENAME}}/testcases|action=edit&preload=Template:Documentation/preload-module-testcases}} create])</small> |testcases <small style="font-style: normal">([{{fullurl:{{FULLPAGENAME}}/testcases|action=edit&preload=Template:Documentation/preload-module-testcases}} create])</small>
}} pages. }} pages.
| image = [[File:Sandbox.png|40px|alt=|link=]] | image = [[File:Edit In Sandbox Icon - Color.svg|40px|alt=|link=]]
}} }}
}}<!-- }}<!--
And this change to Template:Editnotices/Page/Template:Old moves/doc:
Line 6: Line 6:
| text = Editors can experiment in this documentation page's [[Template:Old moves/doc/sandbox|sandbox]]. | text = Editors can experiment in this documentation page's [[Template:Old moves/doc/sandbox|sandbox]].
| textstyle = | textstyle =
| image = Sandbox.png | image = Edit In Sandbox Icon - Color.svg
| imagesize = 60px | imagesize = 60px
| style = | style =
FaviFake (talk) 00:15, 26 October 2025 (UTC)Reply
Have always found it weird we use a cat litter box over a practice icon. Moxy🍁 15:57, 26 October 2025 (UTC)Reply
I believe the icon is actually just a sandbox, like those used by kids on parks. It has the little blue toy shovel.
I've instead always found it weird that in the old sandbox icon there is no "sand box". It's just a pile of sand on the ground. FaviFake (talk) 16:04, 26 October 2025 (UTC)Reply
Looks like a blue Pooper-scooper to anyone in North America. Moxy🍁 16:07, 26 October 2025 (UTC)Reply
We should be using a sandboxing symbol [2] or [3] vs a playground sandbox symbol [4]. That said will implement the above request in 24 hours if there's no objections. Moxy🍁 16:15, 26 October 2025 (UTC)Reply
This is a fully-protected edit request. However, as a template editor, you should still be able to implement the third suggestion. FaviFake (talk) 16:22, 26 October 2025 (UTC)Reply
Yeah let's just do it and see if people complain. Moxy🍁 16:25, 26 October 2025 (UTC)Reply

I have updated Template:Editnotices/Namespace/Module and Template:Editnotices/Namespace/Template. Please note the third page has been deleted — Martin (MSGJ · talk) 15:55, 1 November 2025 (UTC)Reply

Discussion at Template talk:Documentation subpage § Fix per WP:SOB

  You are invited to join the discussion at Template talk:Documentation subpage § Fix per WP:SOB. FaviFake (talk) 16:37, 17 November 2025 (UTC) FaviFake (talk) 16:37, 17 November 2025 (UTC)Reply

Show improve documentation if doc doesn't exists?

Should this template be modified to show {{improve documentation}} by default to templates/modules that doesn't have a documentation? This will auto list the template/modules to Category:Templates with missing or incorrect documentation, which is useful for tracking and fixing. Nvdtn19 (talk) 05:39, 2 December 2025 (UTC)Reply

I support this. All templates should have documentation, even if it's something basic like "see the parent template for detailed information". What seems obvious to the creator of the template, might not be to others who encounter it and might not be 10 years down the road to no one. Gonnym (talk) 13:56, 2 December 2025 (UTC)Reply
That said, there are cases where the documentation is in the body of template and not a /doc page, such as navboxes that use {{Navbox documentation}} or WikiProject banners that use the auto generated documentation. Those cases should be tested to make sure they don't fill up the category. Gonnym (talk) 13:59, 2 December 2025 (UTC)Reply
Of course, {{improve documentation}} will only shows if the namespace is template/module, and if the template which is transcluding {{documentation}}, does not have any documentation. The viwiki version of this template have already implemented this feature, you can see some demo:
If this change are also considered useful here then I'll suggest some changes, but I'll have to test first. Nvdtn19 (talk) 14:45, 2 December 2025 (UTC)Reply
  • I'm wondering if it wouldn't be better setting this up as a bot task to allow for a gap between the template creation process and building documentation. I know I've created a number of templates by starting off with a basic functioning and the standard <noinclude> {{documentation}} </noinclude> ending knowing that I won't be able to build documentation until I'm done working out all the kinks and details in the code, but having that blank documentation section reminds me to come back to instructions once I've finished programming. I would hate to have overzealous gnomes coming in to try to figure out my template while I'm still fixing bugs because it ended up in a tracking category prematurely. At least if a bot were coming in, I'd be able to remove {{improve documentation}} once it got added if things weren't ready for that step yet. VanIsaac, GHTV contrabout 17:32, 2 December 2025 (UTC)Reply
    Ideally, if your template still has kinks in it, start it in your userspace or draft space (or /sandbox if it is one). We shouldn't be placing a non-functioning template in the "live" template space. Gonnym (talk) 17:57, 2 December 2025 (UTC)Reply
    I agree with Gonnym. Don't expect unfinished things that is outside the sandbox can't be touched by others. I don't understand why it would be disruptive when {{improve documentation}} is present on templates that lacks documentation, while it clearly reflects the actual situation? So if the project currently has 10,000 templates without documentation, we have to deploy a bot just to add {{improve documentation}} to those 10,000 pages, while a better one-time methods exists? If you don't want your template be flagged, better start it in your sandbox, or not adding {{documentation}} until there is one. Nvdtn19 (talk) 05:35, 3 December 2025 (UTC)Reply
  • I support this. Checking if a page or template parameter is empty is a perfect task for a template/bot. FaviFake (talk) 17:41, 2 December 2025 (UTC)Reply

Documentation template source code

Can someone provide me with the source code for this template? I'd like to use it on my own wiki. Thanks! ~2025-38484-04 (talk) 16:49, 6 December 2025 (UTC)Reply

You can click "view source" at the top of the page to see the source code. You also need to copy the source code of Module:Documentation and the other dependencies listed on the top right corner of that page. * Pppery * it has begun... 20:20, 6 December 2025 (UTC)Reply