jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/355045 )
Change subject: Show watchlist feed instead of a-z if the user is an editor
......................................................................
Show watchlist feed instead of a-z if the user is an editor
Per our discussion with Jon in the hackathon.
The problem is editors want to see their watchlist feed
and readers mistake watchlist with "Reading list".
We can "fix" this by showing different things to readers and editors
Bug: T88270
Change-Id: I5319ed7ff76b7d466ee63f16e1859d53cd8e7406
---
M extension.json
M includes/specials/SpecialMobileWatchlist.php
A tests/browser/features/special_watchlist_editors.feature
3 files changed, 21 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Jdlrobson: Looks good to me, approved
diff --git a/extension.json b/extension.json
index 329af48..efb348f 100644
--- a/extension.json
+++ b/extension.json
@@ -1876,7 +1876,8 @@
"MFEnableManifest": true,
"MFManifestThemeColor": "#252525",
"MFManifestBackgroundColor": "#FFFFFF",
- "MFLogWrappedInfoboxes": true
+ "MFLogWrappedInfoboxes": true,
+ "MFWatchlistEditCountThreshold": 10
},
"manifest_version": 1
}
diff --git a/includes/specials/SpecialMobileWatchlist.php
b/includes/specials/SpecialMobileWatchlist.php
index 060f397..4d60af9 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -70,7 +70,12 @@
'mobile.pagesummary.styles',
] );
$req = $this->getRequest();
- $this->view = $req->getVal( 'watchlistview', 'a-z' );
+
+ # Show watchlist feed if that person is an editor
+ $watchlistEditCountThreshold = $this->getConfig()->get(
'MFWatchlistEditCountThreshold' );
+ $defaultView = $this->getUser()->getEditCount() >
$watchlistEditCountThreshold ? 'feed' : 'a-z';
+ $this->view = $req->getVal( 'watchlistview', $defaultView );
+
$this->filter = $req->getVal( 'filter', 'all' );
$this->fromPageTitle = Title::newFromText( $req->getVal(
'from', false ) );
diff --git a/tests/browser/features/special_watchlist_editors.feature
b/tests/browser/features/special_watchlist_editors.feature
new file mode 100644
index 0000000..6e3aa9c
--- /dev/null
+++ b/tests/browser/features/special_watchlist_editors.feature
@@ -0,0 +1,13 @@
+@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration
@test2.m.wikipedia.org @vagrant @login
+Feature: Editor watchlist
+
+ Background:
+ Given I am using the mobile site
+ And I am logged in as a user with a > 10 edit count
+ And I have recently edited pages on my watchlist
+ And I am on the "Special:Watchlist" page
+
+ Scenario: Default view for seasoned editors is the feed view
+ Then I should see a list of diff summary links
+ And the modified button should be selected
+
--
To view, visit https://gerrit.wikimedia.org/r/355045
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5319ed7ff76b7d466ee63f16e1859d53cd8e7406
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: VolkerE <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits