Skip to content

Feature request for diff: Add who/when/why info and prev/next (also selection control) #571

Description

@jclxx

Three related issues on the usability of revision comparisons.

  1. Missing critical information in diff output
  2. Need for Previous Edit and Next edit buttons
  3. Selectability of versions for diff (much less important)

Related Issue: diff enhancement is also subject of #567

Thank you kindly for considering.

from pascal import apology

Image showing possible design

This page https://otterwiki.com/Installation/diff/4ff378/bf29fc could be rendered somewhat like this:

Image

1 Missing Information

The present version diff output is missing some critical information: who, when and commit message. The history page has the information we need, but it should be on the same screen as the diff, as in any typical git log output.

I had a skim-read of the code to get a sense of difficulty, and it looks like there's no metadata going into render_template from diff(), and it would need to. Metadata does go in from show_commit(), so there's a model for it. I will look further.

2 Previous and Next buttons

When looking at diffs from one revision to the next, very frequently you want to scan for a particular editor or changed text or just "was it big edit." Obviously it's possible (four clicks) to navigate by the history page but it's easy to lose your place..

We're converting from MediaWiki, which has this, and we use it heavily.

Definition of "previous" and "next": assuming a is earlier than b, from diff(a, b), "previous" would take us to diff(a-1, a) and "next" takes us to diff(b, b+1). I believe this is the behaviour of MediaWiki.

Implementation idea: one possible way to do this would be to allow prev and next as one of the commit hashes. And either render directly, or look up the commits and issue a redirect.

https://otterwiki.com/Installation/diff/prev/bf29fc
https://otterwiki.com/Installation/diff/4ff378/next

3. Selectability of diffs

This is only a nice-to-have, and as it's javascript, might be more trouble than it's worth, given the difficulty of testing against browser variation.

The history page allows arbitrary selection of two versions to compare, including old-on-right (which can be confusing). Also, selecting diff of the same version gives a cryptic "nothing happened" behaviour, should either be unselectable or show the null changes.

Image from Wikipedia highlighting removed radio buttons to ensure a older than b.

Image

For what little it's worth, MediaWiki's javascript function is updateDiffRadios().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions