Page MenuHomePhabricator

Tools and main menu do not persist for anonymous users or temporary users
Open, LowPublicBUG REPORT

Description

Steps to reproduce

  1. Navigate to an article on beta, or a production wiki as an anonymous user using the Vector 2022 skin.
  2. Click Move to sidebar for the Main Menu and the Tools menu
  3. Click on any link to navigate to a different page

Expected results

The Main menu and Tools menu should stay in the last selected state in the same way that the Appearance menu does.

Actual results

The Main menu and Tools menu go back to the hide state. This behaves differently than the Appearance menu which is persistent.

screenshot 110.mov.gif (902×1 px, 951 KB)

Environments observed

  • Browser version: Chrome Version 125.0.6422.142
  • OS version: macOS Sonoma 14.5
  • Device model:
  • Device language:

Check any additional observations

Stack trace

Console output

Event Timeline

Jdlrobson renamed this task from [Bug] Inconsistent menu persistence for Menu and Tools menu to Tools and main menu do not persist for anonymous users.Aug 29 2024, 5:11 PM

I believe this is just something we never got round to doing.

Jdlrobson subscribed.

This and being able to set the default state for logged out users would be extremely useful to third party wikis who usually have their main navigation in the main menu. Right not it's hard-coded in the Vector code. See for example https://sanat.csc.fi/ where it looks like the wiki is basically empty because the main menu is hidden.

Recent feedback after dewiki switchover:
https://de.wikipedia.org/wiki/Wikipedia:Fragen_zur_Wikipedia#c-216.31.116.156-20250406070100-Hauptmen%C3%BC
https://de.wikipedia.org/wiki/Hilfe_Diskussion:Skin/Vector_2022#c-79.204.214.7-20250405135400-Daf%C3%BCr_soll_ich_Spendengeld_abdr%C3%BCcken?

I think the behavior should be aligned with the experience for registered users. Otherwise having the buttons doesn't really make sense for anonymous users.

From what I recall this was technically challenging and required rethinking how pinning behaviour works since it would require rendering the menus twice for anonymous users. This would also break even more access keys (e.g. T336211: Find a solution for handling duplicate access keys and access keys of hidden elements (watchlist, login, contributions, search, edit) would become more wide spread) :-(

Jdlrobson-WMF renamed this task from Tools and main menu do not persist for anonymous users to Tools and main menu do not persist for anonymous users or temporary users.Sep 12 2025, 6:59 PM
Jdlrobson-WMF added subscribers: Msz2001, ovasileva, Niharika and 2 others.
Jdlrobson-WMF lowered the priority of this task from Medium to Low.Sep 12 2025, 10:32 PM

I don't see this as a blocker for temporary accounts (if anything it keeps the behaviour consistent)

Since settings like $wgDefaultUserOptions['vector-main-menu-pinned'] = 1; currently don't seem to have any effect on anonymous users, is there another way to achieve the default pinned menu state, like on https://sanat.csc.fi/ - maybe via MediaWiki:Common.js?

Since settings like $wgDefaultUserOptions['vector-main-menu-pinned'] = 1; currently don't seem to have any effect on anonymous users, is there another way to achieve the default pinned menu state, like on https://sanat.csc.fi/ - maybe via MediaWiki:Common.js?

Never mind, it seems to be that code: https://sanat.csc.fi/w/index.php?title=J%C3%A4rjestelm%C3%A4viesti:Common.js&diff=prev&oldid=2060281

Since settings like $wgDefaultUserOptions['vector-main-menu-pinned'] = 1; currently don't seem to have any effect on anonymous users, is there another way to achieve the default pinned menu state, like on https://sanat.csc.fi/ - maybe via MediaWiki:Common.js?

Never mind, it seems to be that code: https://sanat.csc.fi/w/index.php?title=J%C3%A4rjestelm%C3%A4viesti:Common.js&diff=prev&oldid=2060281

I took the liberty of adding this approach to the menu pinning options.

Hey @kostajh, would you mind clarifying how can the Growth-Team be helpful here? As far as I can see, it's not happening in code we would be maintaining. Maybe you meant Reader Growth Team?

Please talk to Reader Experience team if you need help triaging this one.