Skip to content

Make it easier to diff against previous versions #2934

Description

@mootari

Describe the feature

In the current UI it's surprisingly difficult to diff a version against its predecessor:

  • If you're viewing the latest version (i.e., the default page) of a package then the diff link is hidden by default, so you first have to navigate to the version you want to compare against, then click the diff link there (which will then default to comparing against latest).
  • Things get even trickier for patch versions: To compare the prior version, you again first have to select the prior version, then choose the version you wanted to compare against in the first place.

I can think of a few changes that would reduce the friction:

  1. Always display the diff link. Hiding it just makes the feature more difficult to discover and doesn't do all that much to unclutter the UI.
  2. Show base and target version together. The base version (the one you're viewing) is currently displayed and selected in the top right header, while the target version is managed in the lefthand sidebar, which flips the direction of the comparison and URL parts. Showing both versions close to each other helps users understand what they are comparing, and makes it easier to add affordances to change the direction.
  3. Compare old vs new. When a user selects a target version in the UI and the relation to the base version is clear (e.g. shared semver parts), ensure that the older version becomes the base. UI affordances can still allow users to change the direction explicitly.
  4. Make the prior version more accessible. If a preceding version can be determined, either default the base to it or show it prominently in the base dropdown.

Additional information

  • Would you be willing to help implement this feature?

Final checks

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontFrontend, Design
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions