Page MenuHomePhabricator

Whitespace changes should be identifiable in wiki diffs
Closed, ResolvedPublic

Description

Author: hardy

Description:
Look at this edit and see if you can figure out what was done, with your naked eye and no help from computers:

http://en.wikipedia.org/w/index.php?title=Cognos_Reportnet&diff=207131735&oldid=207131625

I did several similar edits on the same article within a minute or so. They were visible, if minor, improvements in the article's appearance. If anyone wants to know what I did and looks at the "diff", they will probably be baffled. Things like this should be made more visible.


Version: unspecified
Severity: normal

Details

Reference
bz13809

Event Timeline

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

robert wrote:

What did you change, it would be very difficult to fix without knowing what you did?

alexsm333 wrote:

Michael added one space (as shown by my userscript which is similar to [[User:Cacycle/wikEdDiff]] which uses its own JavaScript diff engine).

I would like to note that the diff engine has become a bit inconsistent lately: 1) see bug 13804, 2) added lines (green cell on the right, white on the left) sometimes have red font color and sometimes black as it was before.

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

jidanni at bug 29587 had an interesting potential solution of putting a "w" at the side of the lines that are only whitespace changes.

Or you can make it a bold "*" to save on translations. However the mouseover message still needs to be translated. Also please make sure any solution will also be equally visible/accessible in text browsers.

Putting 'w' or '*' in the diff makes it more complicated that it is. No need for such complexity that new comers will not understand.

Whenever non-whitespace changes take place, MediaWiki adds a <span class="diffchange"> element around it. This class, by default, only has text color styling (red color), however it can also be given a background shade. For example, look at:

http://commons.wikimedia.org/w/index.php?title=Commons:Sandbox&diff=55911338&withCSS=MediaWiki:Gadget-diffGreenBlue.css

The diffchange part (a full stop was inserted in the middle) has a darker background.

If MediaWiki were to output <span class="diffchange"> for whitespaces changes as well, combined with a new css rule for background-color, this bug can be solved.

The same was done in CodeReview on MediaWiki.org (bug 27375). See for example
the whitespace changes in r42730.

Text browsers are not supported by MediaWiki for full functionality. Basic functionality (reading articles, browsing the wiki, searching/finding pages) will work, but there is no active testing or compatibility part of the MediaWiki development cycle for them: http://www.mediawiki.org/wiki/Compatibility#Browser