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

bzimport added projects: MediaWiki-Email, Easy.Via ConduitNov 22 2014, 12:01 AM
bzimport set Reference to bz32210.
Dinoguy1000 created this task.Via LegacyNov 4 2011, 8:40 PM
Wikinaut added a comment.Via ConduitNov 4 2011, 8:43 PM

Hi, can you give an example please ?

Dinoguy1000 added a comment.Via ConduitNov 4 2011, 10:17 PM

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 =) )

Wikinaut added a comment.Via ConduitNov 4 2011, 10:37 PM

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 ) );

Wikinaut added a comment.Via ConduitNov 4 2011, 10:38 PM

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

bzimport added a comment.Via ConduitNov 4 2011, 10:52 PM

sumanah wrote:

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

Dinoguy1000 added a comment.Via ConduitNov 5 2011, 12:06 AM

(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. =)

MrBlueSky added a comment.Via ConduitJan 10 2012, 11:44 PM

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: UserMailer.php.patch

Platonides added a comment.Via ConduitJan 11 2012, 3:26 PM

Looks good.

bzimport added a comment.Via ConduitJan 11 2012, 3:42 PM

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!

bzimport added a comment.Via ConduitJan 12 2012, 11:38 PM

sumanah wrote:

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

siebrand added a comment.Via ConduitJan 13 2012, 12:55 PM

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.

Wikinaut added a comment.Via ConduitJan 14 2012, 10:47 AM

(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.

Wikinaut added a comment.Via ConduitJan 14 2012, 10:48 AM

(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/

MrBlueSky added a comment.Via ConduitFeb 15 2012, 8:45 PM

Done with r111203

Add Comment