Page MenuHomePhabricator

Disable grouped results on RecentChanges page on mobile
Closed, ResolvedPublic3 Estimated Story Points

Description

NOTE: banner will be split out by Olga into new task: T228516

Special:RecentChanges (as well as watchlist) have an option to view "grouped" changes.

Screen Shot 2019-07-17 at 15.10.11.png (696×824 px, 89 KB)

This option reformats the list and groups results by page.

Screen Shot 2019-07-17 at 15.12.23.png (328×1 px, 163 KB)

This option is ill-suited for mobile because it uses a table-based layout (as well as hard-coded whitespace characters 🤨), which cannot be modified to fit on mobile devices.

Therefore, the "group results by page" option should be disabled on mobile.

But by disabling this option on mobile, we are also overriding a user preference 😱

Screen Shot 2019-07-17 at 15.22.33.png (950×1 px, 155 KB)

To ensure users who have this option enabled (surely advanced editors) aren't surprised or think it's broken, we are going to display a banner on the page informing users that grouped results have been disabled on mobile. (another task)

Developer notes

The "grouped" view is referred to as EnhancedChangesList.php in MediaWiki core. The ChangesList.php class in core provides a FetchChangesList hook on which we can use to override the instantiation of EnhancedChangesList. We should place this hook in mobileFrontend, and it should do two things: 1. $list = new OldChangesList( $context) 2. return false.

QA steps

Environment: beta cluster.

The goal of this task is to ensure that the "grouped" view on the Recent Changes page is not accessible in the Minerva skin. The "grouped view" can be accessed in 3 different ways:

  • The url parameter -- On the Recent changes page, add enhanced=1 as a url parameter. The presentation of the results should not change.
  • The advanced filters checkbox (screenshot above). -- These filters aren't available on mobile mode yet, but you can add the &useskin=minerva url param on desktop to trigger the Minerva skin, then on the recent changes page, clicking the checkbox in the filters should do nothing.
  • Enabling a user preference (screenshot also above). -- As a logged in user, enable this user preference. Then on the Recent changes page, the results should still not be grouped.

AC

  • The option to "group results by page" is removed from the Recent changes filters ( This AC is blocked on T225499)
  • If a user has the "group changes by page" preference selected, we still show the "old" results on mobile
  • If the url param enhanced=1 is entered in the RecentChanges page, we still show the "old" results on mobile.

Event Timeline

Approach with hook might not work on translate.wiki. The translate wiki is using https://www.mediawiki.org/wiki/Extension:CleanChanges extension, which listens to the same hook, and overrides the $list with NCL, EnhancedChangesList or OldChangesList. Most probably code has to accommodate how CleanChanges extension works.

Note: Looks like translate.wiki doesn't have MobileFrontend, so it's not a problem.

ovasileva set the point value for this task to 3.EditedJul 17 2019, 4:33 PM

Estimate is for disabling the group list only, @ovasileva to split off the banner into a separate task

Change 524031 had a related patch set uploaded (by Niedzielski; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Disable the recent changes table-based layout on Minerva

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

Let's use

<div class="warningbox">
	-----COPY FOR NOTICE-----
</div>

@ovasileva copy ^

Let's use

<div class="warningbox">
	-----COPY FOR NOTICE-----
</div>

@ovasileva copy ^

"Unfortunately, grouping results by page is not available in Advanced mode. If you would like to use the group by page feature, please visit the desktop site. "

Change 524533 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] FetchChangesList is now passed groups

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

Change 524533 merged by jenkins-bot:
[mediawiki/core@master] ChangesList: Add $groups parameter to FetchChangesList hook

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

Change 524031 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Disable the recent changes table-based layout on Minerva

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

Edtadros subscribed.

@Jdrewniak where should I test this?

@Edtadros description updated. This should be live on the beta cluster :)

This change also affects non-mobile views: I can no longer group recent changes on mediawiki.org (or the beta cluster), regardless of the value of the preference. I use Vector (on desktop - no mobile whatsoever).

If I look at https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/524031, it would make it seem that it is always disabled - regardless of the skin used. Since the hooks are executed unconditionally, they themselves need to check if the current skin is Minerva. That makes this a train blocker.

Jdlrobson raised the priority of this task from High to Unbreak Now!.Jul 31 2019, 6:29 PM

Change 526748 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Limit Recent Changes disable-table mode to Minerva skin

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

Change 526748 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Limit Recent Changes disable-table mode to Minerva skin

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

Change 526754 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@wmf/1.34.0-wmf.16] Limit Recent Changes disable-table mode to Minerva skin

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

Change 526754 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@wmf/1.34.0-wmf.16] Limit Recent Changes disable-table mode to Minerva skin

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

Mentioned in SAL (#wikimedia-operations) [2019-07-31T20:37:16Z] <brennen@deploy1001> Synchronized php-1.34.0-wmf.16/skins/MinervaNeue/includes/MinervaHooks.php: [[gerrit:526754|Limit Recent Changes disable-table mode to Minerva skin]] T228280 (duration: 00m 56s)

Jdlrobson lowered the priority of this task from Unbreak Now! to Medium.Jul 31 2019, 8:42 PM

No longer blocking train.

tested on iPhone X, 12.3.1

QA

Environment: beta cluster.

The goal of this task is to ensure that the "grouped" view on the Recent Changes page is not accessible in the Minerva skin. The "grouped view" can be accessed in 3 different ways:

  • The url parameter -- On the Recent changes page, add enhanced=1 as a url parameter. The presentation of the results should not change.
  • The advanced filters checkbox (screenshot above). group results by page checkbox does not appear
  • Enabling a user preference (screenshot also above). -- As a logged in user, enable this user preference. Then on the Recent changes page, the results should still not be grouped.

AC

  • ~~The option to "group results by page" is removed from the Recent changes filters
  • If a user has the "group changes by page" preference selected, we still show the "old" results on mobile
  • If the url param enhanced=1 is entered in the RecentChanges page, we still show the "old" results on mobile.
alexhollender_WMF removed Edtadros as the assignee of this task.
alexhollender_WMF updated the task description. (Show Details)

just did an additional review for signoff. Looks good.