Page MenuHomePhabricator

Show estimate of number of edits to be reverted in rollback link
Closed, ResolvedPublic

Description

Author: jlerner

Description:
Patch against Linker.php r50720 - approximate number of edits in rollback

It's not particularly clear what the difference is between rollback and undo, as shown at http://lists.wikimedia.org/pipermail/wikitech-l/2009-May/042946.html, and I've chosen the wrong link myself before.

Perhaps it would be better if the link text read "rollback 3 edits | undo" - instead of "rollback | undo". The estimated number of edits could be anything from 1 to (literally) 10+. This should be enough to disambiguate the functionality.

If this code would run too slow on heavy traffic wikis, perhaps we could make it optional.

Somewhat related to the discussion at bug #10531.


Version: unspecified
Severity: enhancement

attachment Linker.diff ignored as obsolete

Details

Reference
bz18834

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:40 PM
bzimport set Reference to bz18834.
bzimport added a subscriber: Unknown Object (MLST).

jlerner wrote:

OK cool - then two other things:

  • Need to change "rollbacklink" in language files to "rollback {{PLURAL:$1|1

edit|$1 edits}}", right?

  • Since function buildRollbackLink() now may return false, we need to account

for that in PageHistory.php (will attach another diff).

jlerner wrote:

Don't show a rollback link when set to false

attachment PageHistory.diff ignored as obsolete

jlerner wrote:

Comment on attachment 6130
Don't show a rollback link when set to false

No longer needed.

jlerner wrote:

Approximate number of edits in rollback

Addresses most of http://www.mediawiki.org/wiki/Special:Code/MediaWiki/50721

attachment Linker.diff ignored as obsolete

jlerner wrote:

Reopening as it seems more debate is needed.

Reverted in r50732; patch fails to set default values, has some other potential issues per notes in CR, and the commit is wrapped up with what appear to be unrelated changes making code review extra confusing.

jlerner wrote:

Suggest enabling this feature by default. It should be useful on most sites and not too expensive except for the largest ones.

For DefaultSettings.php:

/**

  • Show rollback link as "rollback 3 edits" instead of just "rollback", to
  • differentiate it from the "undo" link with which it appears. Set to false
  • if too expensive for larger wikis. */

$wgShowRollbackEditCount = true;

jlerner wrote:

Add "rollbacklinkcount" to messages.inc

attachment messages.diff ignored as obsolete

jlerner wrote:

Should the number listed be exact or approximate?

If exact, the query is going to more expensive.

If approximate, then how to reflect that the count is an estimate? Setting the count to "10+" may break localization and apparently breaks {{PLURAL:}}.

Patch for the new Linker function

All changes needed to add the function as patch. Please controll it because in my commited changes was bug.

attachment Linker.patch ignored as obsolete

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

sumanah wrote:

Adding the need-review keyword to indicate that these patches are awaiting review. Joshua, Jan, could you mark any obsolete patches as obsolete to clarify what needs review currently? Thanks for your patches, and sorry for the wait.

Comment on attachment 6132
Add "rollbacklinkcount" to messages.inc

Marking as obsolete. No "rollbacklinkcount" message in MessageEn.php as of trunk

sumanah wrote:

Comment on attachment 6131
Approximate number of edits in rollback

This patch no longer applies to trunk per Rusty Burchfield's automated testing
https://docs.google.com/spreadsheet/ccc?key=0Ah_71HHl7qa7dGtvSms3TGpHQU9NU2Y1VmNzUEUteWc
.

sumanah wrote:

Comment on attachment 6135
Patch for the new Linker function

This patch no longer cleanly applies to trunk per Rusty Burchfield's automated testing
https://docs.google.com/spreadsheet/ccc?key=0Ah_71HHl7qa7dGtvSms3TGpHQU9NU2Y1VmNzUEUteWc
.

sumanah wrote:

I've removed the "patch" and "need-review" keywords since there's no applicable patch to be reviewed. Jan Luca, Josh Lerner, is one of you interested in revising and attaching the patch, if still desired?

For future reference. In $wgMiserMode (enabled by default on WMF servers) the rollback count for Special:RecentChanges and Special:Watchlist is disabled.

Can we please insert a colon ("rollback: 1 edit")? "Rollback" is a noun (not a verb), so the current formatting is grammatically incorrect.

There is the verb "to rollback".

Quote from http://oxforddictionaries.com/definition/english/rollback?q=rollback:

...
verb
[with object] Computing
restore (a database) to a previously defined state.

Thanks for bringing that to my attention. But the verb form describes a specific situation in computing (restoring a database to a previously defined state).

In the relevant context (reverting to an earlier revision of a wiki page, with subsequent edits retained in the database and history), "rollback" means "act or instance of rolling back".

http://dictionary.reference.com/browse/rollback
http://www.merriam-webster.com/dictionary/rollback

Is the addition of a colon ("rollback: 2 edits") technically feasible?

There is no problem on the technical side (change of < 10 code line) but I prefer the current version.

If there are more support for your version I could change the code.

Can you recommend an appropriate forum in which to discuss the matter? This bug is unlikely to generate much additional traffic.