Page MenuHomePhabricator

[PageTools] Make the new main menu pinnable
Open, HighPublic1 Estimated Story Points


NOTE: Blockers: T317899, T317897

We will make the page tools pinnable. When working on this, the more menu and table of contents should both be pinnable with reusable code.


  • When pinned

Screen Shot 2022-09-15 at 5.06.00 PM.png (745×463 px, 174 KB)

  • When not pinned

Screen Shot 2022-09-15 at 5.05.40 PM.png (630×540 px, 164 KB)

  • The pinnable state should be stored and persist for logged in users. Suggestion: reuse the existing preference PREF_KEY_SIDEBAR_VISIBLE
  • The menu should default to pinned for logged-in users and unpinned to logged-out users
  • When pinned the main menu is contained by a landmark, and there is only a single landmark for the main menu
  • INSTRUMENTATION: When pinned, clicks to links inside the menu should be different to when in the dropdown. DesktopWebUIClickTracking. When unpinned, the main menu should be tracked with the event name n-mainpage-description.dropdown and when pinned the event should be n-mainpage-description.pinned. This will allow us to determine from clicks which menu the click occurred inside. Ideally this should be generalized for the pinning functionality e.g. should also apply to items in the table of contents and the end column.
  • Once done, mark the appropriate field for that event in the instrumentation spec:
  • When logged in the default state of the main menu should be persistent. Move SkinVector22:isMainMenuVisible into VectorComponentMainMenu.php

QA steps

  1. Persistence

1a) Logged out: There should be no option to pin the main menu
1b) Logged in: Pin sidebar to left. Wait 1s and refresh page. Expected: sidebar should remain pinned.
1c) Logged in: Pin sidebar to left. Wait 1s and click "hide". Expected: sidebar should remain hidden.

  1. Check instrumentation

1a) Click a link in main menu. Pin to sidebar. Click same link. Expected: Two different event names should be fired.

Sign off steps

  • After this work the hope is that all items are click instrumented with unique names that reflect where the were clicked. If this is not the case please create a new ticket to handle the remaining work.

Event Timeline

ovasileva triaged this task as Medium priority.Sep 15 2022, 4:57 PM
ovasileva removed a project: Readers-Web-Backlog.
Jdlrobson set the point value for this task to 1.Sep 29 2022, 5:30 PM

@Jdlrobson @ovasileva discussed at offsite: we might want to hide the Move to sidebar button from logged-out people (i.e. that pin/hide functionality is only available if you're logged-in)

Jdlrobson set Due Date to Oct 31 2022, 7:00 AM.Oct 21 2022, 11:05 PM
Jdlrobson changed the subtype of this task from "Task" to "Deadline".
alexhollender_WMF renamed this task from [ArticleTools] Make the new main menu pinnable to [PageTools] Make the new main menu pinnable.Oct 25 2022, 7:27 PM
alexhollender_WMF updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
ovasileva raised the priority of this task from Medium to High.Mon, Nov 21, 3:33 PM
ovasileva removed Due Date.

@Jdlrobson just spoke with @ovasileva again, and we decided for now the main menu will not be pin-able for logged-out people (so we can hide that heading+button entirely), same as page tools

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

[mediawiki/skins/Vector@master] [WIP] Page tools: Main menu is pinnable