Page MenuHomePhabricator

Provide a way to document template styles or add other text to those pages
Open, LowPublic

Description

I think it would be helpful to provide a way to have documentation for TemplateStyles pages or even any reserved text from MediaWiki messages. This could be implemented like Scribunto already does or in some simpler way.

Specific use case for this: Russian Wikipedia requires all patrolled templates to have a template category, so instead of putting some category (probably of Category:Template sandboxes type) into CSS code, we could do it through software means. Some project might decide to document the entire styles themselves, and they should be able to do so.

I think that we can copy the specific implementation from Scribunto with a difference in that a default TemplateStyles implementation shouldn’t be visible until people configure it to be.

Event Timeline

I'm not sure this is worth working to any great degree. You can document the CSS on the main documentation (MCR will obviate the need for the CSS page and separate categories I think) and CSS documentation can be made in the page itself.

I didn’t talk specifically about the documentation, it’s just one of the solutions that will be the most easy to implement.

MCR will probably allow TemplateStyles slots on template pages and documentation slots on any page (including a styles.css page). I'm not sure it's worth the effort to make something temporary until then. (Although, given that 1.31 is an LTS version, backporting doc subpage support to it would be nice...)

Hi! I was about making the same request for wp:fr because all TemplateStyles pages are now listed in Special:UncategorizedTemplates (almost empty on wp:fr).
Adding a documentation would be a good solution as we have a generic template for sub-templates pages self-generating a category.
If it is too complicated, adding a category in the TemplateStyles pages is also a possibility.
Many thanks.

If it is too complicated, adding a category in the TemplateStyles pages is also a possibility.

You already can. Place the category inside a CSS comment.

Izno triaged this task as Low priority.Sep 28 2018, 1:45 PM
Izno moved this task from Backlog to External on the TemplateStyles board.

MCR will probably allow TemplateStyles slots on template pages and documentation slots on any page (including a styles.css page). I'm not sure it's worth the effort to make something temporary until then. (Although, given that 1.31 is an LTS version, backporting doc subpage support to it would be nice...)

5 years later, no MCR for TemplateStyles, but the issue with template categories still exists. Maybe this is the case for not making a bet on non-existing technologies.