With the new feature flag FEATURE_ARTICLE_TOOLS_MENU in place (T306609) we will begin work on the new page tools feature
The scope of this ticket is the contents of the more menu and main menu. No visual changes to production (feature flag disabled) should be made to these as part of this ticket.
https://vector-2022.web.app/Moth
After the change the more menu and sidebar will look like the following screenshots:
main menu | more/tools menu |
TODO
- When the feature flag is disabled there are no visual changes
- When the feature flag is enabled, the more menu label changes to "Explore more"
- When the feature flag is enabled, the sidebar will only show the p-navigation and p-tb menus
- When the feature flag is enabled, All menus that are not p-navigation and p-tb will be moved into the more menus. Their headings will be retained.
- When the menu resizes, certain actions e.g. watch, edit will become present
- When a gadget adds to the more menu e.g. `mw.util.addPortletLink( 'p-cactions', '#', 'purge' ) it should appear below the delete and move actions
- The move/delete actions should appear in the page tools menu
Open questions
- Is there a max height on the menu?
Developer notes
Getting started
- The easiest way to enable the print menu is to install Extension:ElectronPdf. You don't need any special setup, doesn't matter if the feature doesn't work as long as you have the link.
- To get "in other projects" probably easiest to add the following code to LocalSettings.php:
$wgHooks['SidebarBeforeOutput'][] = function ( Skin $skin, &$sidebar ) { $sidebar['wikibase-otherprojects'] = [ [ 'href' => 'https://commons.wikimedia.org/wiki/Main_Page', 'text' => 'Wikimedia Commons', ], [ 'href' => 'https://www.mediawiki.org/wiki/MediaWiki', 'text' => 'MediaWiki', ] ]; };
QA steps
- Login and visit https://en.wikipedia.beta.wmflabs.org/wiki/Dog?vectorpagetools=1
- Assert that the page tools menu has an "Actions", "General" and "Print/export" headings
- Assert that the main menu has "Interaction" and "Languages" headings (beta cluster) and "contribution" and languages on production (en.wikipedia.org)
- Open your dev console and paste in the following script:
mw.util.addPortletLink( 'p-cactions', '#', 'purge' )
- Assert that a menu item named "purge" has been added to the page tools "Actions" menu
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T317898#8503898 |
2 | ✅ | T317898#8503898 |
3 | ✅ | T317898#8503898 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T317898#8507751 |
2 | ✅ | T317898#8507751 |
3 | ✅ | T317898#8507751 |