Page MenuHomePhabricator

show only changed lines when viewing the change of an abuse filter in the abuse filter history
Closed, ResolvedPublic


There is no need to show an item in a diff, when there is no change to it. Please show only items with a difference, so the user can easilier catch all necessary information. Thanks.

Event Timeline

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

Diffs show a few lines before and a few lines after as context. This is supposed to be a feature.

Oh this is an AbuseFilter bug, I'm sorry. Reopening so Andrew can do with it what he wants.

beau wrote:

*** Bug 20310 has been marked as a duplicate of this bug. ***

beau wrote:

*** Bug 20851 has been marked as a duplicate of this bug. ***

beau wrote:

*** Bug 26433 has been marked as a duplicate of this bug. ***

anderson.kleiner wrote:

The problem related on bug 20851 has been seen by me a couple of days ago. As I'm not sure if that bug is really a duplicate from this bug, I guess I should report it here too:

Please, compare the value of added_lines and removed_lines variables with the
actual diff on this case:

  • Actual diff:

What I've found particulary odd was that this problem occured only with some
edits, and mostly with bots edits, although at time the code wasn't filtering
by user group (I've even added a user group condition, thinking at first this
could be the problem, though it not seems the case now).

If bug 20851 is indeed a duplicate of this bug, I'm sorry.

Maybe it's related to line feeds. Let them be visible below:

Old text:

Line 1\n
Line 2

New text:

Line 1\n
Line 2\n
Line 3

So "
Line 2
" is removed and "
Line 2\n
Line 3
" is added. We may want to add trailing line feeds when calculating diff variables.

(In reply to comment #6)

It's private and I cannot see it.

Also may be some CRLF & LF issue? but this can affect the whole article...

(In reply to comment #9)

Also may be some CRLF & LF issue? but this can affect the whole article...

That problem is fixed with bug 20310

I'm not sure, but is this related to diffs between two version of a filter? And, if I understood right, the proposal is not to show unchanged elements at all, instead of graying them? If so, it would be easy to do, but the diff could become terribly short and will miss some context. I'm not sure whether this is desired.

He7d3r rescinded a token.
He7d3r awarded a token.

Yeah, I know the diff isn't clean. So what should we show? Only changed elements? And maybe reduce the number of displayed unchanged lines?

Maybe begin with only showing changed elements / sections. That would be a benefit.

Change 430107 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Show only changed sections in diffs

This is it. Diffs can be pretty slim with that, but probably it's a good thing.

Huji removed a project: Patch-For-Review.

Change 430107 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Show only changed sections in diffs