Page MenuHomePhabricator

New edit emails should offer a single-diff link
Closed, ResolvedPublic

Description

Currently, new edit notification emails offer links to view the edited article directly, to view all changes to the article from the first unviewed diff to the current version (diff=cur), and to unwatch the article. Generally, these links are more than enough, but there are situations where a link to only the first unviewed diff (diff=next) are far more useful. This can be done with the current links, but requires a bare minimum of three clicks (click the diff link in the email, then click "Older edit", then "Newer edit"), so a direct link would be a huge time saver.


Version: unspecified
Severity: normal

Details

Reference
bz32210

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:01 AM
bzimport set Reference to bz32210.

Hi, can you give an example please ?

Example of a current email:

Dear Dinoguy1000,

The Minecraft Wiki page Template talk:Entities has been changed on
4 November 2011 by Soandso2, see
http://www.minecraftwiki.net/wiki/Template_talk:Entities for the current
revision.

See
http://www.minecraftwiki.net/index.php?>title=Template_talk:Entities&diff=0&oldid=191510
for all changes since your last visit.

One possible way of adding a single-diff link:

Dear Dinoguy1000,

The Minecraft Wiki page Template talk:Entities has been changed on
4 November 2011 by Soandso2, see
http://www.minecraftwiki.net/wiki/Template_talk:Entities for the current
revision.

See
http://www.minecraftwiki.net/index.php?
title=Template_talk:Entities&diff=next&oldid=191510
for Soandso2's edit, or
http://www.minecraftwiki.net/index.php?
title=Template_talk:Entities&diff=0&oldid=191510
for all changes since your last visit.

(if you were looking for something else when you asked for an example, please correct me and I'll try to get what you're after =) )

Okay, I understand.

What you propose is to add the "diff-to-previous-revision" (*) also for "users". The current code forsees distinct mails for impersonal mail (sending the link you requested) and for personal mails (sending currently only the link to the "diff-to-the-last-seen-version"). In this case, you propose also to add the link (*).

A change is needed here ( /includes/UserMailer.php ):

572 if ( $this->oldid ) {
573 if ( $wgEnotifImpersonal ) {
574 // For impersonal mail, show a diff link to the last revision.
575 $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastdiff',
576 $this->title->getCanonicalUrl( 'diff=next&oldid=' . $this->oldid ) );
577 } else {
578 $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastvisited',
579 $this->title->getCanonicalUrl( 'diff=0&oldid=' . $this->oldid ) );

see also set of enotif system message texts, which not everyone knows (these can easily be changed):

http://www.minecraftwiki.net/index.php?title=Special%3AAllMessages&prefix=enotif&filter=all&lang=en

sumanah wrote:

This seems like it would be an easy fix, so I'm adding "easy".

(In reply to comment #4)

see also set of enotif system message texts, which not everyone knows (these
can easily be changed):

http://www.minecraftwiki.net/index.php?title=Special%3AAllMessages&prefix=enotif&filter=all&lang=en

Yep, I'm aware that the emails can be customized to a limited extent with these messages, but AFAIK there is no way to add what I'm looking for just by editing interface messages (I've played around with it in the past on another wiki and couldn't get it to work); and it's not any one wiki I'm looking for this on, it's a general feature request. =)

Created attachment 9837
Patch against trunk

Old behaviour:

  • if $wgEnotifImpersonal: show link to diff which triggered the mail
  • if !$wgEnotifImpersonal: show link to diff with all changes since the edit which triggered the mail

New behaviour:

  • always show link to diff which triggered the mail
  • if !$wgEnotifImpersonal: also show link to diff with all changes since the edit which triggered the mail

Attached:

sumanah wrote:

Platonides says it's good enough to commit. MrBlueSky, can you ping us to commit it in February, once the current "code slush" is over? Thanks!

sumanah wrote:

Or, MrBlueSky, now that you have commit access, you can commit it yourself! (Again, once the code slush is over.) :-)

I'd like to raise awareness of the enotif tracking bug 1932. If someone following this issue has invested serious time in understanding the notification code, please consider looking into more open issues with e-mail notification.

(In reply to comment #11)

I'd like to raise awareness of the enotif tracking bug 1932. If someone
following this issue has invested serious time in understanding the
notification code, please consider looking into more open issues with e-mail
notification.

Thanks for pining me. Yes, I do.

(In reply to comment #12)

(In reply to comment #11)

I'd like to raise awareness of the enotif tracking bug 1932. If someone
following this issue has invested serious time in understanding the
notification code, please consider looking into more open issues with e-mail
notification.

Thanks for pining me. Yes, I do.

s/pining/pinging/