Page MenuHomePhabricator

[subtask] Enable recursive templating on skins
Closed, ResolvedPublic

Description

To support the rendering of the table of components templates, we need recursive template parsing. While we could restrict this to Vector, it seems useful enough for all skins. In future for example, we're likely to mirror what we do on Vector inside Minerva

TableOfContents

<nav id="mw-panel-toc" class="sidebar-toc" role="navigation" aria-labelledby="sidebar-toc-header">
	<div class="sidebar-toc-header">
		<h2 class="sidebar-toc-title" aria-hidden="true">Contents</h2>
	</div>
	<ul id="table-of-contents">
	{{#array-sections}}
	{{>TableOfContents__row}}
	{{/array-sections}}
	</ul>
</nav>

TableOfContents__row

<li class="sidebar-toc-level-{{toclevel}}">
    <a href="#{{anchor}}">
        <div class="sidebar-toc-text">
        <span class="sidebar-toc-numb">{{number}}</span>{{{line}}}</div>
    </a>
	<ul>
    {{#array-sections}}{{>TableOfContents__row}}{{/array-subsections}}
    </ul>
</li>

Event Timeline

Change 757536 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Allow recursive template parsing

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

Jdlrobson renamed this task from Enable recursive templating on skins to [subtask] Enable recursive templating on skins.Jan 28 2022, 7:59 PM
Jdlrobson triaged this task as High priority.

@nray do you feel comfortable merging this? If not perhaps we need to move this to blocked on others and seek a review from @Krinkle or @phuedx

Change 757536 merged by jenkins-bot:

[mediawiki/core@master] SkinMustache: Allow recursive template parsing

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

Change 759232 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/core@master] templateParser: Only hash unique files

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

Change 759232 merged by jenkins-bot:

[mediawiki/core@master] TemplateParser: Only hash unique files

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

nray reassigned this task from nray to Jdlrobson.