In SHDT the web team discussed how in many places we are not template-driven, instead resorting to PHP functions to generate blobs of HTML. This causes a lot of slowdown in anything menu related which is becoming more of a problem as we enter Navigation Restructure (Web)
TODO
- This task is done when the Tabs.mustache template renders individual list items via templates rather than html-items.
- You will need to update the components inside MediaWiki core to provide access to the bare minimum data needed to support the new template.
- The scope for this change is Tabs.mustache (the talk and main namespace). To limit scope you will likely need to fork the MenuContents template / associated component. Try not to impact any other menu in your solution.
- This change can add new keys to the existing data, but should preserve any existing keys and their existing types for backwards compatibility e.g. do not remove any keys e.g. html-items.
Existing code
<ul class="vector-menu-content-list">{{! }}{{#data-items}}{{>MenuListItem}}{{/data-items}}{{! }}{{{html-items}}}</ul>
Final code
<ul class="vector-menu-content-list">{{! }}{{#data-items}}{{>MenuListItem}}{{/data-items}}{{#array-items}}{{>ListItem}}{{/array-items}}</ul>