In future this will allow us to optimize the work that skins do generating menu for rendering. This will also allow us to make changes this support better caching for logged in users.
TODO
- Migrate all skins to modern menus
- Drop support for older menus
Migration steps for skins
- Skins will need to explicitly declare a "menus" skin option in skin.json
Before:
"ValidSkinNames": {
"modern": {
"class": "SkinMustache",
"args": [
{
"name": "modern",
"scripts": [],
"styles": [
"skins.modern"
]After:
"ValidSkinNames": {
"modern": {
"class": "SkinMustache",
"args": [
{
"name": "modern",
"scripts": [],
"styles": [
"skins.modern"
],
"menus": [
"namespaces",
"personal",
"user-menu",
"notifications",
"user-interface-preferences",
"user-page",
"associated-pages",
"views",
"actions"
],- Update $this->data['content_navigation']['namespaces'] to $this->data['content_navigation']['associated-pages']
- References in CSS to #p-namespaces should be changed #p-associated-pages
- References to personal menu key should be replaced with code that merges user-interface-preferences, user-page, notifications, user-menu. See associated T422975: Deprecate BaseTemplate::getPersonalTools
- Update calls to content_actions. See associated T423303: Deprecate SkinTemplate content_actions
- Remove "namespaces" and "personal" from the menus option and note impact of menu rendering
- Make sure the following is in skin.json
"requires": {
"MediaWiki": ">= 1.46"
},