Page MenuHomePhabricator

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


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

stjn created this task.Jul 28 2018, 5:53 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 28 2018, 5:53 PM
Izno added a subscriber: Izno.Jul 28 2018, 5:58 PM

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.

stjn added a comment.Jul 28 2018, 6:00 PM

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

Tgr added a subscriber: Tgr.Jul 30 2018, 12:09 PM

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...)

FDo64 added a subscriber: FDo64.Aug 17 2018, 9:32 PM

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.

Izno added a comment.Aug 17 2018, 11:37 PM

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.

FDo64 added a comment.Aug 18 2018, 8:31 PM

It works, many thanks @Izno!

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