Last modified: 2014-04-09 18:10:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65442, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63442 - [[Special:Diff]] - counterintuitive order of oldid/newid parameters
[[Special:Diff]] - counterintuitive order of oldid/newid parameters
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.23.0
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-02 19:05 UTC by Eduard Braun
Modified: 2014-04-09 18:10 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Eduard Braun 2014-04-02 19:05:05 UTC
This is not exactly a bug a this time but I wasn't quite sure where to report it otherwise:

The new special page [[Special:Diff]] allows to easily link to diff pages, e.g.
[[Special:Diff/newid]] will link to the difference introduced "newid"

When one wants the diff between multiple versions one has however to write
[[Special:Diff/oldid/newid]] to get the difference between "oldid" and "newid"


Therefore the order of parameter changes: "newid" is now the second instead of the first parameter. "oldid" takes it's place.

- Isn't this highly counterintuitive?
- Wouldn't be [[Special:Diff/newid/oldid]] bemuch more natural?
Also in a normal workflow one would propaply 1) start with creating a difflink with respect to the resulting version and only *afterwards* one would add the old version (which the resulting version should be compared to) if necessary. In most cases an old version isn't necessary though and "newid" will almost always be the first parameter (with only those few exceptions where an "oldid" is actually needed).


I therefore want to ask, if anybody feels differently and would propose to change the ordering otherwise as long as [[SPecial:Diff]] isn't much used yet.
Comment 1 Andre Klapper 2014-04-03 09:45:23 UTC
Any idea how long it's been like this? Wondering if breaking is really worth it...
Comment 2 Eduard Braun 2014-04-03 09:59:43 UTC
This has been merged on January 26th, see
https://gerrit.wikimedia.org/r/#/c/63395/

I think usage (with two parameters) is still very low so we wouln't break much if we make the change now.

If you look at the linked commit, the actual behaviour is even contrary to the one implied by the commit message (which uses "12345" as the "diff" ID in the first four examples therfore suggesting "98765" would be the "oldid" in the last example). So it could even be considered a bug and for not working "as designed".
Comment 3 Eduard Braun 2014-04-03 10:08:49 UTC
CC'ing authors of the commit so they can add their judgment.
Comment 4 Bartosz Dziewoński 2014-04-03 14:32:34 UTC
This is the expected behavior (you're right that the commit message is not clear on this) and personally I think this order is more "natural" (even if inconsistent with the single-parameter version), but I'm not particularly attached to it.
Comment 5 Jérémie Roquet 2014-04-09 12:48:45 UTC
Hi everyone,

This is just my opinion, but I don't think the current behavior is less intuitive than the suggested one — rather the opposite, actually:
 - the left parameter is what will be shown on the left side of your screen and the right parameter on the right side (remember that it's possible to diff revisions in whatever order you want; it'll just display the diff leftside right);
 - this syntax is consistent with Diff/<oldid>/next and Diff/<oldid>/cur (arguably, it's not with Diff/<newid>/prev, though);
 - this is similar to the syntax of popular VCS, such as subversion (svn diff -c newid vs svn diff -r oldid:newid) and git (git show newid vs git diff oldid:newid).

If anything is to be changed, for me it would be to make “prev”, “next” and “cur” usable both as first and second parameters (with the result of Diff/<newid>/prev syntax meaning the opposite of what it means today, ie. newid shown on the left and prev shown on the right).

Best regards,
Comment 6 Eduard Braun 2014-04-09 18:10:42 UTC
(In reply to Jérémie Roquet from comment #5)
> If anything is to be changed, for me it would be to make “prev”, “next” and
> “cur” usable both as first and second parameters (with the result of
> Diff/<newid>/prev syntax meaning the opposite of what it means today, ie.
> newid shown on the left and prev shown on the right).

Actually (from my side) this would be fine, too. For me the crucial point is consistency. That is meaning (or order) of the parameters shouldn't change regardless of what kind of parameters you pass (an ID or prev/cur/next).

Therefore it basically breaks down to these two options:
1) [[Special:Diff/right_version/left_version]]
2) [[Special:Diff/left_version/right_version]]

If only one parameter is specified both cases above would get
   [[Special:Diff/right_version]]


1) is what I initially proposed. It's advantage is that also if only one parameter is specified, it still is the version on the right in the current implementation. Therefore the meaning of the first parameter *never* changes.

2) is slightly more intuitive in that it normally orders versions chronologically (since normally the older version will be shown on the left and the newer version will be shown on the right).
However if only one parameter is specified, this will be the version that is shown on the right therefore switching the meaning of first/second parameter.


All in all I could live with both options, but changing behavior based on whether an ID is given or a relation like prev/cur/next is inconsistent and seems wrong to me.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links