Page MenuHomePhabricator

Disable grouped results on RecentChanges page on mobile
Closed, ResolvedPublic3 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.

This option reformats the list and groups results by page.

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 😱

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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 17 2019, 1:52 PM
ovasileva triaged this task as High priority.Jul 17 2019, 2:22 PM
ovasileva moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
pmiazga added a subscriber: pmiazga.EditedJul 17 2019, 4:21 PM

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

Nirzar added a subscriber: Nirzar.Thu, Jul 18, 3:49 PM

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. "

Jdlrobson updated the task description. (Show Details)Thu, Jul 18, 10:45 PM
ovasileva updated the task description. (Show Details)Fri, Jul 19, 2:02 PM

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

Jdlrobson updated the task description. (Show Details)Fri, Jul 19, 3:50 PM

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

Jdrewniak updated the task description. (Show Details)Tue, Jul 23, 7:38 PM
Edtadros reassigned this task from Edtadros to Jdrewniak.Wed, Jul 24, 4:10 PM
Edtadros added a subscriber: Edtadros.

@Jdrewniak where should I test this?

Jdrewniak updated the task description. (Show Details)Thu, Jul 25, 11:21 PM

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

Jdrewniak reassigned this task from Jdrewniak to Edtadros.Thu, Jul 25, 11:22 PM

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!.Wed, Jul 31, 6:29 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptWed, Jul 31, 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 Normal.Wed, Jul 31, 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 closed this task as Resolved.Mon, Aug 5, 10:53 PM
alexhollender removed Edtadros as the assignee of this task.
alexhollender updated the task description. (Show Details)

just did an additional review for signoff. Looks good.