Page MenuHomePhabricator

Remove unused SpecialMobileMenu class from MobileFrontend
Closed, ResolvedPublic

Description

This class seems unused and should probably be removed? If there are any discussions why the class is still around, here could be a good place to discuss and know the way forward.

A patch already exist and it will be linked to this ticket.

Acceptance criteria

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 594321 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] specials: Remove SpecialMobileMenu class (unused) from MF

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

Special pages and API modules are always "unused". They exist for external access, not internal access in code.

I would suggest keeping this redirect, and fixing it to redirect to the article view. I'm not sure why change 506594 redirected to the main page. It could extend RedirectSpecialPage and function similar to SpecialPermanentLink in core, simply redirecting to oldid=revid.

select count(*) from wmf.webrequest where day = 10 and month = 5 and year = 2020 AND uri_path LIKE "%MobileMenu%";

yields 312 results so apparently this link is still getting a certain amount of usage.

Most probably all crawlers and bots. Even if these are users, what's the point of instantly redirecting them to the main page? How is this helpful?

The error page is not a dead end. There are many ways to move forward, including multiple links to the main page. Plus the error page is at least honest and tells the user what's actually going on, instead of leaving them confused and puzzled. ("Did I just misclicked?") Example: https://en.wikipedia.org/wiki/Special:Foo.

Most probably all crawlers and bots. Even if these are users, what's the point of instantly redirecting them to the main page? How is this helpful?

Please don't shoot the messenger. I'm just providing data. As @Krinkle has said somewhere else this is a product decision.

I'm sorry, I did not intended to attack anyone personally. But I want to challenge the product decision behind this redirect.

@ovasileva is it okay to break links to this artifact and remove this piece of code? It doesn't do much and it only got 312 hits in a single day across all our projects recently. The redirect is a bit useless e.g. clicking https://en.m.wikipedia.org/wiki/Special:MobileMenu redirects to main page. If we remove that will simply 404.

@ovasileva is it okay to break links to this artifact and remove this piece of code? It doesn't do much and it only got 312 hits in a single day across all our projects recently. The redirect is a bit useless e.g. clicking https://en.m.wikipedia.org/wiki/Special:MobileMenu redirects to main page. If we remove that will simply 404.

I think that's fine - a direct link to that page is an edge case - let's remove.

Change 594321 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] specials: Remove SpecialMobileMenu class (unused) from MF

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

I quickly also did: https://codesearch.wmcloud.org/search/?q=MobileMenu&i=nope&files=&repos= and found some occurrences. Should these be treated? If so, which ones? We can pin-point them and remove.

Change 615824 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/skins/MinervaNeue@master] MinervaHooks: Remove unreachable code related to Special:MobileMenu

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

MobileFrontend aliases = yes, the message should be referring to Special:Mobileoptions not MobileMenu - probably a typo.

The MobileMenu hook in Minerva is badly named, but is not deprecated so you can ignore those references.

Not sure what the parsoid, cxserver references are! :)

Change 615824 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] MinervaHooks: Remove unreachable code related to Special:MobileMenu

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

Leaving this up for grab so new comers can pick it up! Thanks!

Change 684094 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/skins/MinervaNeue@master] Drop unused class and style

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

Change 684094 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Drop unused class and style

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

We just need to remove the 'MobileMenu' keys in specialPageAliases and then we can call this done :) Thanks all!

Change 685395 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/MobileFrontend@master] Drop the MobileFrontend MobileMenu aliases

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

Change 685395 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Drop the MobileFrontend MobileMenu aliases

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