Page MenuHomeSoftware Heritage

Add explanatory tooltips on the pictos for the revision history
Closed, ResolvedPublic

Description

When browsing the history of revisions, some revisions are shown with a tag lable, other with a commit label, and there is no clear meaning shown. See for example: https://archive.softwareheritage.org/browse/origin/https://github.com/scilab/scilab/releases/

For readability, we need explanatory tooltips that explain what each picto means.

Event Timeline

rdicosmo triaged this task as Normal priority.May 24 2019, 12:06 PM
rdicosmo created this task.

Hi, I would like to take up this task. What should the tooltips be, to me also I think label and commit picto dont make sense.

I think label and commit picto dont make sense.

I guess this is because you did not check our Release model.
There is a target_type field in it that indicates which type of object a release is targetting,

You can find which types of object a release may target in the current state of the archive below:

17:00 $ psql service=swh
psql (13.2 (Debian 13.2-1.pgdg100+1), server 12.6 (Debian 12.6-1.pgdg100+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

softwareheritage=> select distinct(target_type) from release;
 target_type 
-------------
 revision
 directory
 content
 release

What should the tooltips be

So the tooltips for each type of targeted object could be:

  • revision: "The release <release_name> targets revision <revision_id>"
  • directory: "The release <release_name> targets directory <directory_id>"
  • content: "The release <release_name> targets content <content_id>"
  • release: "The release <release_name> is an alias for release <target_release_id>"

Also it would be nice to replace the targeted release id by its name in the releases list view.

I think the simplest way to implement this is to hack on the browse_snapshot_releases code by adding a new tooltip field in the dictionaries holding releases display data.
You should then be able to use that new field in releases view template to add the tooltips.

Cool, makes sense. Will work on it and create a diff.

release: "The release <release_name> is an alias for release <target_release_id>"

Hmmm it's not exactly an alias. <release_name> is actually a reference that can point to a release :|

But let's go with this for now

Hmmm it's not exactly an alias. <release_name> is actually a reference that can point to a branch :|

Ah right the non annotated git tags, big source of confusion for users.
But in that case the target type will be revision.

So for a release target type, this is really an alias.

I had one doubt regarding this, so if the target_type is content then the target would be the content_id, right? But the ids are like this "8e5adfbd7e605bda9c5e96c10e015b3dc0df688e" so for a user having an id like this in the tooltip would feel like an arbitrary string.

Currently it looks like this:

so for a user having an id like this in the tooltip would feel like an arbitrary string

All SWH objects have an intrinsic identifier compatible with git, so that's not an arbitrary string.

Thanks @faux, it will be deployed with next swh-web release.

It has been deployed to production, closing this.