Page MenuHomePhabricator

Replace custom user menu rendering
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

After T319349, we are able to replace all the PHP around rendering the user menu dropdown with a new approach of rendering multiple Menus inside a Dropdown. This removes a lot of tech debt from SkinVector.php, and sets the standard for how complex dropdowns like the article toolbar and main menu dropdown will be rendered in the future.

TODO

  • New menu buckets are created in Hooks.php that correspond with the anon editor menu group and the logout menu group
  • The new menu buckets are used in the user links template data
  • UserLinkslogin.mustache, UserLinkslogout.mustache and UserLinks__templogin.mustache are deleted

AC

  • No visual changes

Developer notes

This will involve changes to the HTML, cached HTML is a potential concern as well as changing id/classes.

Event Timeline

Change 837741 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] POC: Refactor user menu dropdown to use multiple menu groups

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

@bwang: Assuming this task is about the Vector code base, hence adding that project tag so other people who don't know or don't care about team tags can also find this task when searching via projects. Please set appropriate project tags when possible. Thanks!

Jdlrobson set the point value for this task to 1.Oct 7 2022, 5:42 PM
ovasileva lowered the priority of this task from Medium to Low.Oct 25 2022, 5:00 PM

I dont think this is actually needed for article tools, it would be nice to have time to do this later on, especially after T320927, but I feel like this could be moved to the backlog.

Change 837741 abandoned by Bernard Wang:

[mediawiki/skins/Vector@master] POC: Refactor user menu dropdown to use multiple menu groups

Reason:

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

Change 885910 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Remove custom handling of user links menu items and handle case when anon editor links are disabled

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

Change 885910 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove custom handling of user links menu items and handle case when anon editor links are disabled

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