Page MenuHomePhabricator

[M] [PageTools] Restructure page tools menu contents
Closed, ResolvedPublic1 Estimated Story Points

Description

NOTE: Blockers for this work: T306519 , T306609, T318434

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 menumore/tools menu
Screen Shot 2022-09-15 at 5.03.30 PM.png (516×253 px, 29 KB)
Screen Shot 2022-09-15 at 5.04.04 PM.png (605×223 px, 48 KB)

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

  1. Login and visit https://en.wikipedia.beta.wmflabs.org/wiki/Dog?vectorpagetools=1
  2. Assert that the page tools menu has an "Actions", "General" and "Print/export" headings
  3. Assert that the main menu has "Interaction" and "Languages" headings (beta cluster) and "contribution" and languages on production (en.wikipedia.org)
  4. Open your dev console and paste in the following script:
mw.util.addPortletLink( 'p-cactions', '#', 'purge' )
  1. Assert that a menu item named "purge" has been added to the page tools "Actions" menu

QA Results - Beta

ACStatusDetails
1T317898#8503898
2T317898#8503898
3T317898#8503898

QA Results - Prod

ACStatusDetails
1T317898#8507751
2T317898#8507751
3T317898#8507751

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson renamed this task from Restructure article tools menu contents to [ArticleTools] Restructure article tools menu contents.Sep 15 2022, 4:11 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
ovasileva triaged this task as Medium priority.Sep 15 2022, 4:59 PM
Jdlrobson set the point value for this task to 1.Sep 29 2022, 5:30 PM
Jdlrobson changed the subtype of this task from "Task" to "Deadline".Oct 21 2022, 11:01 PM
Jdlrobson set Due Date to Oct 24 2022, 7:00 AM.

This was marked as a team focus priority for week beginning 24th October so adding to sprint board https://docs.google.com/document/d/1dQEOhynhq7JK_TVrjinnwxVkyaQNcBuJQ6Srz37N8MA/edit#

Jdlrobson raised the priority of this task from Medium to High.Oct 21 2022, 11:13 PM
Jdlrobson changed Due Date from Oct 24 2022, 7:00 AM to Oct 31 2022, 7:00 AM.Oct 24 2022, 5:08 PM
alexhollender_WMF renamed this task from [ArticleTools] Restructure article tools menu contents to [PageTools] Restructure article tools menu contents.Oct 25 2022, 7:21 PM
alexhollender_WMF renamed this task from [PageTools] Restructure article tools menu contents to [PageTools] Restructure page tools menu contents.Oct 25 2022, 7:26 PM
alexhollender_WMF updated the task description. (Show Details)

This is part of the MVP according to @ovasileva

This comment was removed by Jdlrobson.

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

[mediawiki/skins/Vector@master] Move toolbox and menus that follow into page tools

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

This looks pretty straightforward comparatively to the other tasks in flight.
We currently pull out the toolbox, but instead of doing that we can pull out the toolbox and everything that follows.

The patch associated does that. Remaining work would be changing the labels which should be pretty straightforward after https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/865795

Change 866503 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] Move toolbox and menus that follow into page tools

Reason:

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

LGoto renamed this task from [PageTools] Restructure page tools menu contents to [M] [PageTools] Restructure page tools menu contents.Dec 12 2022, 6:19 PM

Change 868135 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@master] Move toolbox and menus that follow into page tools

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

Discussed in standup. We will leave the groupings as they are in production and the prototype is now updated to reflect that. In terms of label changes "Tools" should become "General"

nray subscribed.

Change 868135 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Move toolbox and menus that follow into page tools

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Login and visit https://en.wikipedia.beta.wmflabs.org/wiki/Dog?vectorpagetools=1
✅ AC1: Assert that the page tools menu has an "Actions", "General" and "Print/export" headings

Screenshot 2023-01-05 at 6.46.45 PM.png (780×1 px, 400 KB)

✅ AC2: Assert that the main menu has "Interaction" and "Languages" headings
Screenshot 2023-01-05 at 6.47.06 PM.png (656×684 px, 165 KB)

Open your dev console and paste in the following script:
mw.util.addPortletLink( 'p-cactions', '#', 'purge' )
✅ AC3: Assert that a menu item named "purge" has been added to the page tools "Actions" menu
Screenshot 2023-01-05 at 6.48.02 PM.png (978×1 px, 452 KB)

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Login and visit https://en.wikipedia.org/wiki/Dog?vectorpagetools=1
✅ AC1: Assert that the page tools menu has an "Actions", "General" and "Print/export" headings

Screenshot 2023-01-08 at 7.46.10 PM.png (792×1 px, 488 KB)

✅ AC2: Assert that the main menu has "Interaction" and "Languages" headings (beta cluster) and "contribution" and "languages" on production (en.wikipedia.org)
Screenshot 2023-01-08 at 7.47.37 PM.png (827×724 px, 206 KB)

Screenshot 2023-01-08 at 7.47.50 PM.png (660×670 px, 153 KB)

Open your dev console and paste in the following script:
mw.util.addPortletLink( 'p-cactions', '#', 'purge' )
✅ AC3: Assert that a menu item named "purge" has been added to the page tools "Actions" menu
Screenshot 2023-01-08 at 7.51.04 PM.png (841×506 px, 249 KB)

@Edtadros that's a pass. I've updated QA steps if you want to update your comment.

Looks good! Current state of prod:

Screen Shot 2023-01-13 at 5.39.37 PM.png (1×816 px, 265 KB)

Screen Shot 2023-01-13 at 5.39.33 PM.png (1×1 px, 901 KB)