Page MenuHomePhabricator

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

Description

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.

Details

Reference
bz19716

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:

https://pt.wikipedia.org/w/index.php?title=Alexis_Texas&diff=27267727&oldid=27110744

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

Daimona updated the task description. (Show Details)May 1 2018, 11:48 AM

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 awarded a token.May 1 2018, 6:33 PM
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

https://gerrit.wikimedia.org/r/430107

Daimona claimed this task.May 1 2018, 7:07 PM

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

Huji closed this task as Resolved.May 3 2018, 12:26 AM
Huji removed a project: Patch-For-Review.

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

https://gerrit.wikimedia.org/r/430107