Page MenuHomePhabricator

[Spike] Remove MinervaPageActions config flag?
Closed, ResolvedPublic3 Estimated Story Points

Description

Minerva provides a config flag MinervaPageActions which can be used to hide some UI elements (for example the Talk action).

It is needed? We have other configuration flags relating to talk for example (MinervaTalkAtTop).
It's used inside includes/Permissions/MinervaPagePermissions.php

Outcome

Assessment of what to do here. If a small change, a patch would be welcomed.

QA steps

For production use the same URLs e.g. en.m.wikipedia.beta.wmflabs.org > en.m.wikipedia.org

Anonymous user:

Logged in user (AMC enabled or AMC disabled)

QA Results - Beta

QA Results - Prod

Details

Related Changes in Gerrit:

Event Timeline

Aklapper renamed this task from Minerva Disccusion tab do not respect MinervaPageActions config flag to Minerva Discussion tab do not respect MinervaPageActions config flag.Jun 25 2019, 11:33 AM
ovasileva triaged this task as Medium priority.Jun 25 2019, 3:36 PM
Jdlrobson lowered the priority of this task from Medium to Lowest.Jul 2 2019, 4:53 PM
Jdlrobson subscribed.

Talking about this in grooming, we plan to REMOVE the button at the bottom of the page and have tabs at the top of the page for every logged in user.
If we only have talk in tabs at the top of the page, then the question becomes does this need to be configurable. Are tabs the same as page actions?
I suggest bumping this to lowest and revisiting when the talk button at the bottom of the page has been removed.

In today's grooming ritual, we wondered aloud whether the MinervaPageActions config is actually needed – it was but is it still?

The MinervaPageActions config variable isn't explicitly set in production (see https://codesearch.wmflabs.org/operations/?q=MinervaPageActions), which means all of the Wikimedia-hosted wikis are receiving the default treatment.

Jdlrobson renamed this task from Minerva Discussion tab do not respect MinervaPageActions config flag to Remove MinervaPageActions config flag?.Jan 17 2020, 11:18 PM
Jdlrobson raised the priority of this task from Lowest to Medium.
Jdlrobson updated the task description. (Show Details)
#### $wgMinervaPageActions

* Type: `Array`
* Default: `['edit', 'talk', 'watch', 'switch-language']`

I can't see any reason for this nowadays given these can all be configured by other means e.g. wgPermissions. This is adding unnecessary confusion to our code.

Jdlrobson renamed this task from Remove MinervaPageActions config flag? to [Spike] Remove MinervaPageActions config flag?.Sep 24 2021, 2:50 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: ovasileva.

Note: We never alter the default value of $wgMinervaPageActions in configuration which suggests at the very least it should be removed.

The configuration flag previously allowed a site admin to make items disappear from the UI. For example, if I removed the "edit" item from wgMinervaPageActions the edit icon would disappear.

The feature was limited to the edit, talk, watch and switch language features. However, it does not allow the removal of the history link and talk page link. In the case of the talk page, the talk page link is hardcoded to only show on the main page for logged in users (see MinervaPagePermissions::isTalkAllowed) or at the top of the pages where MinervaTalkAtTop is set.

Only language, edit and watch can be removed with the existing configuration:

Screen Shot 2021-10-18 at 2.14.07 PM.png (354×2 px, 45 KB)

Without the configuration option I can remove language using the following code:

$wgHideInterlanguageLinks = true;

I can remove the watch star by using :

$wgGroupPermissions['user']['viewmywatchlist'] = false;
$wgGroupPermissions['user']['editmywatchlist'] = false;
$wgGroupPermissions['*']['viewmywatchlist'] = false;

This has the benefit of also removing the watch star on other skins such as Vector.

The edit icon cannot be removed without this configuration variable, however this is probably a good thing given editing is a fundamental need of a wiki. If an admin did want to hide the edit link they could always ship an inline style to do the BeforePageDisplay hook.

I thus propose we remove this configuration option and clean up the code.

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

[mediawiki/skins/MinervaNeue@master] Drop wgMinervaPageActions

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

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

[mediawiki/skins/MinervaNeue@master] Remove MinervaTemplate::getSecondaryActions

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

Change 731842 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Drop wgMinervaPageActions

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

For production use the same URLs e.g. en.m.wikipedia.beta.wmflabs.org > en.m.wikipedia.org

Anonymous user:
✅ AC1: There should be no talk page at the bottom of https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page

Screen Shot 2021-10-28 at 5.52.44 AM.png (1×912 px, 245 KB)

✅ AC2: There should be a language button at the bottom of the page. https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page
See AC1
✅ AC3: There should be no talk button at top or bottom of https://en.m.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein

Screen Shot 2021-10-28 at 5.54.10 AM.png (1×956 px, 387 KB)
Screen Shot 2021-10-28 at 5.54.21 AM.png (1×956 px, 309 KB)

✅ AC4: There should be an edit and language button at the top of https://en.m.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein
See AC4

Logged in user (AMC enabled or AMC disabled)
✅ AC5: There should be a talk button at the bottom of https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page

Screen Shot 2021-10-28 at 5.57.29 AM.png (1×956 px, 298 KB)

✅ AC6: There should be a language button at the bottom of https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page
See AC5
✅ AC7: There should be a talk tab, edit button and language button at the top of the page https://en.m.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein
Screen Shot 2021-10-28 at 5.58.52 AM.png (1×956 px, 383 KB)

✅ AC8: There should be no language button or talk button at the bottom of the page https://en.m.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein
Screen Shot 2021-10-28 at 5.59.32 AM.png (1×956 px, 364 KB)

✅ AC9: There should be no talk button and no language button at the bottom of the page https://en.m.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein
See AC8.

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

For production use the same URLs e.g. en.m.wikipedia.beta.wmflabs.org > en.m.wikipedia.org

Anonymous user:
✅ AC1: There should be no talk page at the bottom of https://en.m.wikipedia.org/wiki/Main_Page

Screen Shot 2021-10-28 at 3.16.34 PM.png (1×956 px, 256 KB)

✅ AC2: There should be a language button at the bottom of the page. https://en.m.wikipedia.org/wiki/Main_Page
See AC1
✅ AC3: There should be no talk button at top or bottom of https://en.m.wikipedia.org/wiki/Albert_Einstein

Screen Shot 2021-10-28 at 3.17.54 PM.png (1×956 px, 484 KB)
Screen Shot 2021-10-28 at 3.18.10 PM.png (1×956 px, 322 KB)

✅ AC4: There should be an edit and language button at the top of https://en.m.wikipedia.org/wiki/Albert_Einstein
See AC4

Logged in user (AMC enabled or AMC disabled)
✅ AC5: There should be a talk button at the bottom of https://en.m.wikipedia.org/wiki/Main_Page

Screen Shot 2021-10-28 at 3.26.57 PM.png (1×912 px, 211 KB)

✅ AC6: There should be a language button at the bottom of https://en.m.wikipedia.org/wiki/Main_Page
See AC5
✅ AC7: There should be a talk tab, edit button and language button at the top of the page https://en.m.wikipedia.org/wiki/Albert_Einstein
Screen Shot 2021-10-28 at 3.28.06 PM.png (1×956 px, 477 KB)

✅ AC8: There should be no language button or talk button at the bottom of the page https://en.m.wikipedia.org/wiki/Albert_Einstein
Screen Shot 2021-10-28 at 3.24.30 PM.png (1×912 px, 282 KB)

✅ AC9: There should be no talk button and no language button at the bottom of the page https://en.m.wikipedia.org/wiki/Albert_Einstein
See AC8.