NOTE: banner will be split out by Olga into new task: T228516
[[ https://en.wikipedia.org/wiki/Special:RecentChanges | Special:RecentChanges ]] (as well as [[ https://en.wikipedia.org/wiki/Special:Watchlist | watchlist ]]) have an option to view "grouped" changes.
{F29790869, width=300}
This option reformats the list and groups results by page.
{F29790877, width=800}
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// 馃槺
{F29790900, width=400}
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 [[ https://gerrit.wikimedia.org/g/mediawiki/core/+/4677b12af9bcef1561135cce562a6b35fb42af1c/includes/changes/ChangesList.php#90 | 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.