Page MenuHomePhabricator

Remove UserMenu template in favor of using the Menu template
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

The UserMenu template was created for the User links feature, but it is mostly a copy of the Menu template. We want to replace usage of UserMenu with the Menu template to avoid duplicating code and the risk of the two Menus diverging.

AC

  • html-before-portlet is added to the Menu template
  • User links feature uses the updated Menu template instead of UserMenu template
  • Storybook and typing is updated

QA

Load the storybook instance for "user links" and report any potential UI problems.

An engineer can perform QA if this makes more sense
This doesn't need to be QAed in production.

QA Results - Storybook

ACStatusDetails
1T284584#7163714

QA Results - Storybook/Beta

ACStatusDetails
1T284584#7236200

Event Timeline

Jdlrobson triaged this task as Medium priority.Jun 8 2021, 5:42 PM
Jdlrobson set the point value for this task to 3.

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

[mediawiki/skins/Vector@master] Remove UserMenu and use Menu template instead

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

Change 698587 restored by Bernard Wang:

[mediawiki/skins/Vector@master] Remove UserMenu and use Menu template instead

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

Change 698587 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove UserMenu and use Menu template instead

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

Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Jdlrobson.
Edtadros added a subscriber: Edtadros.

@Jdlrobson the only storybook link I have doesn't have any user menu components.

@Jdlrobson thanks. That's an entirely different link than I had. Looks like I need some storybook tutoring.

Test Result - Storybook

Status: ❌ Fail
Environment: Storybook
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

❌ AC1: Load the storybook instance for "user links" and report any potential UI problems.

I compared the links in story book to beta. Everything checks out except for Logged Out User Links:

The Menu in Beta only contains Login, Talk, and Contributions links

Talk:

Screen Shot 2021-06-19 at 11.14.29 AM.png (400×859 px, 60 KB)

In storybook this points to a logged in user page, WikiUser instead of MyTalk which uses IP address

Sandbox:

Screen Shot 2021-06-19 at 11.18.48 AM.png (400×859 px, 61 KB)

Points to WikiUser sandbox. In beta and prod it doesn't exist.

Preferences, Beta, Watchlist:
These links require you to log in. They don't make sense in a logged out user menu.

Contributions:

Screen Shot 2021-06-19 at 11.22.05 AM.png (400×859 px, 62 KB)

Points to WikiUser contributions instead of MyContributions.

@bwang can you update the storybook to reflect the logged out case?

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

[mediawiki/skins/Vector@master] Update user links storybook

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

Change 700686 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Update user links storybook

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

@Jdlrobson / @bwang I'm still seeing the same behavior. Let me know if I'm doing something wrong here:

Screen Recording 2021-06-21 at 8.17.50 PM.mov.gif (902×762 px, 496 KB)

@Edtadros Ah that's my bad, I fixed the login/logout button but I forgot to remove the Login, Talk, and Contributions link for logged out. I'll put in another patch for that

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

[mediawiki/skins/Vector@master] Remove logged in links from logged out user links storybook

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

Change 700951 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Update user links storybook

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

@bwang the menu items are correct. The issue now is where they link.

Talk:
In Beta and Prod, this links to ../wiki/Special:MyTalk
in Storybook, it links to ../wiki/User_talk:WikiUser

Contributions:
In Beta and Prod, this links to ../wiki/Special:MyContributions
in Storybook, it links to ../wiki/Special:Contributions/WikiUser

Let me know if this is an issue or not.

For completeness, Bernard let's fix the links here.

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

[mediawiki/skins/Vector@master] Consolidate user links outside of the user menu dropdown into a single new menu

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

Change 698024 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Consolidate user links outside of the user menu dropdown into a single new menu

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

Test Result - Storybook

Status: ✅ Pass
Environment: Storybook
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

✅ AC1: Load the storybook instance for "user links" and report any potential UI problems.

These check out in Storybook and in Beta (not sure if that was testable, but I check it)

Screen Recording 2021-07-26 at 6.25.59 AM.mov.gif (812×1 px, 472 KB)