Page MenuHomePhabricator

Implement Wikisource {{ts}} handling code as part of the WikiText parser, possibly as a magic word.
Closed, DeclinedPublic

Description

On English Wikisource there is an exceptionally useful template called {{ts}} short for table style.

This task has been opened as a feature request for this to be implemented inside the parser.

The relevant templates are :
https://en.wikisource.org/w/index.php?title=Template:Ts&redirect=no
https://en.wikisource.org/wiki/Template:Table_style
https://en.wikisource.org/w/index.php?title=Template:Table_style/parse&action=edit

The request is made because.

  1. It is easier to type format codes than it is lengthy CSS
  2. For a long table having to include lengths of CSS code is time-consuming
  3. It means that the actual CSS style markup on tables would only have to be checked in one location.(In the actual table it would be the format codes that are checked.)
  4. The current version of template is limited to 10 codes.
  5. Having the format codes in one place, means you only need to change one string when the CSS standard is updated.

There may of course be alternative solutions to making styling easier to maintain.

Event Timeline

ShakespeareFan00 raised the priority of this task from to Needs Triage.
ShakespeareFan00 updated the task description. (Show Details)
ShakespeareFan00 subscribed.
Aklapper triaged this task as Lowest priority.Jan 16 2015, 1:47 PM
Aklapper edited projects, added MediaWiki-Parser; removed Parser.
ShakespeareFan00 claimed this task.

I am closing this as Declined (i.e withdrawn)

Having had a few days to consider, it seems a major feature request like this would need a much clearer community consensus, and thusly this feature request is technically out of process as there hasn't been an active discussion about it on potentially affected projected, (or indeed any form of identification of wikis where it would confllict with existing templates.) This is a feature request which requires further discussion, and thusly it's too soon to have suggested it here.

I also have a technical concern that using the parser to do this may be the wrong solution, in performance terms.

Based on what I'm reading, what you need are some custom classes added to specific skin.css or common.css to be able to define classes that will reduce the amount of inline css you need to add for each table if there are tables that use the same css theme over and over. It's possible to break that into chunks for various tasks and to allow mixing and matching as needed.

Addendum as of 2019: TemplateStyles allowed for the approach suggested by Technical13 to be implemented.

What is still lacking is a way to import table styles directly scoped to a specfic table. TemplateStyles currently appears ti import globally, albiet with de-duplication.