Page MenuHomePhabricator

Reimplement ToC generation (currently scattered in different classes) so skins can easier deal with it
Closed, DuplicatePublic

Description

Currently the table of contents generation is scattered throughout at least three different classes, operates by putting in a funky placeholder and then running off into the bushes to throw a party and then running around popping wheelies while mooning random passerby, and has no room for extending or reusing whatsoever.

Extensions, especially skins, often want to do stuff with the table of contents without having to chase it down with machine guns first, and having to reimplement the entire thing on top of that is just stupid.

Event Timeline

Isarra created this task.Nov 26 2014, 7:08 AM
Isarra raised the priority of this task from to Needs Triage.
Isarra updated the task description. (Show Details)
Isarra added a project: MediaWiki-Parser.
Isarra changed Security from none to None.
Isarra added a subscriber: Isarra.
Aklapper renamed this task from Reimplement ToC generation so it sucks less to Reimplement ToC generation (currently scattered in different classes) so skins can easier deal with it.Dec 2 2014, 2:11 PM
Aklapper triaged this task as Lowest priority.

In general it's welcome to write bug reports in a way that other readers (which might have other cultural backgrounds when it comes to irony parsing) can also understand them without having to chase down the corresponding code first (plus "suck less" isn't a very descriptive goal while making it easier for skins certainly is). Fixed the summary.

Isarra added a comment.Dec 6 2014, 5:31 PM

I don't know if it's necessarily bad to have it scattered about - the different pieces may make sense in different classes and stuff considering what they do. The main issue, I think, is that none of the different pieces are at all flexible. The TOC generation cannot be effectively reused on any level; it only works with all its components together, and it only works in the page on page render, and it only works once.

I do not know, however, what any specific goal would be beyond making it reusable, nor do I really know how to explain this or where anyong could start besides by chasing it all down themselves. I mean, I filed this AFTER chasing down all the bits precisely because I was just stumped at that point.

Krinkle added a subscriber: Krinkle.