Page MenuHomePhabricator

Allow sanitized CSS subpages in the Index namespace of Wikisource
Closed, ResolvedPublic

Description

It would be very helpful to allow TemplateStyles to be stored with Index pages at Wikisource. Currently, only .css pages in Template namespace get the sanitized-css model, which is a little bit awkward for CSS that really belongs to an Index page.

However, this might run into issues since subpages of Index pages get slapped with the edit form for the index, e.g. https://en.wikisource.org/w/index.php?title=Index:Sandbox.djvu/styles.css&action=edit

Somewhat related to T215165 and T226275 (which are about allowing index pages to specify the CSS to use for the pages of the index and have it applied automatically on transclusion too.

Event Timeline

ProofreadPage marks these pages as being of the Index content type; to make them sanitized CSS instead, it'd have to ignore things with a CSS extension.

Change 655625 had a related patch set uploaded (by Tpt; owner: Tpt):
[mediawiki/extensions/ProofreadPage@master] Do not make Index: pages subpages use the index content type by default

https://gerrit.wikimedia.org/r/655625

Change 655625 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Make subpages in the Index NS not use the index content type by default

https://gerrit.wikimedia.org/r/655625

Great!

We still need to add Index to $wgTemplateStylesNamespaces, otherwise only admins can change the content model to sanitized-css

Should the config change be a separate task for Site-Requests to be visible on the board?

Inductiveload renamed this task from Add Index namespace on enWS to the $wgTemplateStylesNamespaces list to Allow sanitized CSS subpages in the Index namespace of Wikisource.Mar 12 2021, 11:48 AM

@Xover good idea. Spun out as a separate Site-Requests action point: T277283