Community Wishlist Survey 2023/Admins and patrollers/Inline diffs and inline patrol/Proposal/en

  • Problem: Patrolling recent changes is a time-consuming duty with very little help from MediaWiki software. It takes several clicks and browser tabs to patrol even the smallest change, while everything could be done inline, without ever leaving Recent changes, Page history or User contributions pages and losing track of where we left off. Unpatrolled changes are marked with a single ! in Recent changes, but not on Page histories and User contributions.
  • Proposed solution: I found the combination of "inline diffs" and "inline patrol" scripts extremely useful, and I'm proposing that their logic be added to MediaWiki software for all users with patrol rights. Every edit would get two buttons, one to [show diff] inline, one to [patrol] the change.
  • Who would benefit: users with any kind of patrol rights; the feature should be enabled for them by default
  • More comments: Everything needed for this feature is already there: diff table (example) and patrol actions are in the API. What's lacking are some hooks in the frontend software, consistent across recent changes, page histories and user contributions: buttons to expand or hide diffs, buttons to patrol a change, revision ID data present in every line of the lists.
Try it now

What the feature could look like can be tested by loading either (ExpandDiffs) mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Bradv/Scripts/ExpandDiffs.js&action=raw&ctype=text/javascript");
or inlineDiff: mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Writ Keeper/Scripts/commonHistory.js&action=raw&ctype=text/javascript");
together with inline-patrol.js mw.loader.load("//meta.wikimedia.org/w/index.php?title=User:Ponor/inline-patrol.js&action=raw&ctype=text/javascript"); This goes in one's local common.js, or in global.js at Meta. The first of the "inline diff" scripts only works on the English language wikis, but adds nice buttons in the style of Twinkle. The second script works on all wikis, as far as I know, but uses a tiny triangle to expand the diffs and messes up the "Group results by page" RC feature. Because all scripts depend on some hooks to manipulate the browser's DOM, they're very prone to breaking with any MediaWiki software updates and may not work on all pages on mobile/desktop sites.

Our wikis depend on the hard work of users with patroller rights. This feature would make their work much more efficient.
I know there is some external software or scripts that can do the same, but:
  • they seem to be enwiki-centric and don't play well with other wikis, or don't work at all
  • users, arguably, prefer working (writing, reading, patrolling, administrating) from the same interface (browser window), and on different devices
  • most users (patrollers) are, in my experience, reluctant to even create common.js and c&p two lines of code, because "not everyone is a computer scientist"
  • these tools and scripts are not easily discoverable, and debugging them to work on all wikis and for all users is likely very hard
  • some, if not all, do not have centralized message translation
  • or they show diffs separate from the changes list, causing a lot of scrolling back and forth.
My thanks go to Bradv, Writ Keeper, and Ivi1o4 for some inspirational code.