Story #13494

Browse previous versions of a collection

Added by Tom Clegg over 2 years ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Start date:
02/19/2020
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

See Collection version history

When viewing a collection in Workbench, a tab/button should show the history of prior changes. For each prior update, it should be possible to
  • view/star/bookmark the selected version of the collection (name, description, files, etc. as they appeared after the update)
  • preview/download the files as they appeared in the selected version
  • copy the selected version into a new collection

Implementation

  • Build on work in #16718 and #16719
  • The version selector is built on the collapsable ‘details’ pane to the right (see attached mockup) instead of the currently unused "Activity" tab. This would allow us to minimize the quantity of UI changes when displaying past versions.
    • The versions listing should be ordered by date with the current version at the top.
  • Should include consideration for how #16300 will work (user needs to select two versions in order to display differences).
Version selector.png (28.7 KB) Version selector.png Collection's version selector on the "detals" pane. Lucas Di Pentima, 02/20/2020 06:58 PM

Subtasks

Task #16148: GroomingResolvedLucas Di Pentima

Task #16324: Review 13494-collection-version-browserResolvedPeter Amstutz


Related issues

Related to Arvados - Story #14086: [keep-web] Serve previous collection versionsResolved10/15/2018

Related to Arvados Epics - Story #15333: Workbench2 feature parity with WorkbenchIn Progress01/01/202012/31/2021

Related to Arvados - Feature #16718: Searching past collection versionsResolved10/13/2020

Related to Arvados - Feature #16719: Basic support for collection versionsResolved10/15/2020

Related to Arvados - Bug #17098: Collection "restore from previous version" buttonResolved11/25/2020

Blocked by Arvados - Feature #13561: [API] Store, and add APIs to retrieve, previous versions of collection objectsResolved10/04/2018

Blocked by Arvados - Bug #16118: Offers editing actions on read-only collectionsResolved02/28/2020

Blocks Arvados Workbench 2 - Story #16300: Compare 2 collection versionsNew

Associated revisions

Revision 3c2e3213
Added by Lucas Di Pentima about 2 months ago

Merge branch '13494-collection-version-browser'
Closes #13494

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <>

History

#1 Updated by Tom Clegg over 2 years ago

#2 Updated by Tom Morris over 2 years ago

  • Target version set to To Be Groomed

#3 Updated by Tom Morris over 2 years ago

When searching collections, the user should have an option to include non-current versions in the results -- at least when searching by PDH.

Including old versions should always be an available search option (off by default). I'm not sure why it's restricted to searches by PDH.

"Data blocks" is an implementation detail. From the user's point of view, there's just data and metadata.

It feels like we may want a version number which users can easily use to reference a particular version of a collection, rather than forcing them to rely on dates or logical UUID chains.

#4 Updated by Tom Clegg over 2 years ago

  • Description updated (diff)

#5 Updated by Tom Clegg over 2 years ago

  • Description updated (diff)

#6 Updated by Tom Morris over 2 years ago

  • Blocked by Feature #13561: [API] Store, and add APIs to retrieve, previous versions of collection objects added

#7 Updated by Tom Clegg over 2 years ago

  • Description updated (diff)

#8 Updated by Lucas Di Pentima over 2 years ago

Some thoughts

  • Update the collection view to show version list (using a dropdown widget?) and allowing the user to select another version of the collection
  • URL for previous versions: workbench.abcde.arvadosapi.com/collections/UUID/VERSION
  • On previous versions, the “Copy to project…” button may be replaced by “Copy as new version…”. The “Move collection…” shouldn’t appear
  • On previous versions, the “Upload” tab shouldn’t exist & file list should be read-only. The lock button isn’t necessary.
  • On previous versions, name & description can’t be edited. Should “Sharing and permissions” pane appear?

#9 Updated by Tom Clegg over 2 years ago

  • Related to Story #14086: [keep-web] Serve previous collection versions added

#10 Updated by Tom Morris about 2 years ago

#11 Updated by Tom Morris about 2 years ago

  • Subject changed from [Workbench] View/copy/expunge previous versions of a collection to [Workbench2] View/copy/expunge previous versions of a collection

We'll do this in the context of Workbench2 only.

#12 Updated by Ward Vandewege over 1 year ago

  • Related to Story #15333: Workbench2 feature parity with Workbench added

#13 Updated by Peter Amstutz about 1 year ago

  • Release set to 20
  • Target version deleted (To Be Groomed)

#14 Updated by Peter Amstutz 12 months ago

  • Target version set to 2020-02-12 Sprint

#15 Updated by Lucas Di Pentima 12 months ago

  • Assigned To set to Lucas Di Pentima

#16 Updated by Peter Amstutz 12 months ago

  • Target version changed from 2020-02-12 Sprint to 2020-02-26 Sprint

#18 Updated by Lucas Di Pentima 11 months ago

  • Description updated (diff)

#19 Updated by Peter Amstutz 11 months ago

  • Target version changed from 2020-02-26 Sprint to 2020-03-11 Sprint

#20 Updated by Peter Amstutz 11 months ago

  • Subject changed from [Workbench2] View/copy/expunge previous versions of a collection to View/copy/expunge previous versions of a collection

#21 Updated by Lucas Di Pentima 11 months ago

  • Blocked by Bug #16118: Offers editing actions on read-only collections added

#22 Updated by Lucas Di Pentima 10 months ago

  • Category changed from Workbench to Workbench2
  • Description updated (diff)

Updated description removing all backend notes as this story is only about the UI.

#23 Updated by Peter Amstutz 10 months ago

  • Target version changed from 2020-03-11 Sprint to 2020-03-25 Sprint

#24 Updated by Peter Amstutz 10 months ago

  • Status changed from New to In Progress

#25 Updated by Peter Amstutz 10 months ago

  • Target version changed from 2020-03-25 Sprint to 2020-04-08 Sprint

#26 Updated by Peter Amstutz 10 months ago

  • Target version changed from 2020-04-08 Sprint to 2020-04-22

#27 Updated by Lucas Di Pentima 10 months ago

#28 Updated by Lucas Di Pentima 10 months ago

  • Status changed from In Progress to New

#29 Updated by Lucas Di Pentima 9 months ago

  • Target version changed from 2020-04-22 to 2020-05-06 Sprint

#30 Updated by Lucas Di Pentima 9 months ago

  • Target version changed from 2020-05-06 Sprint to 2020-05-20 Sprint

#31 Updated by Peter Amstutz 8 months ago

  • Target version changed from 2020-05-20 Sprint to 2020-06-17 Sprint

#32 Updated by Lucas Di Pentima 8 months ago

  • Target version changed from 2020-06-17 Sprint to 2020-07-01 Sprint

#33 Updated by Lucas Di Pentima 7 months ago

  • Target version changed from 2020-07-01 Sprint to 2020-07-15

#34 Updated by Lucas Di Pentima 6 months ago

  • Target version changed from 2020-07-15 to 2020-08-12 Sprint

#35 Updated by Peter Amstutz 6 months ago

  • Target version changed from 2020-08-12 Sprint to 2020-09-09 Sprint

#36 Updated by Peter Amstutz 5 months ago

Customer feedback about collection versions:

  • Page needs to make it clear when you are viewing an old version
  • Sharing dialog needs to operate on the latest version and and say that it will share the entire version history
  • Tell the user you need to make a copy ("fork this version") to be able to edit or share a single past version
  • Should be able to search for and access old versions by PDH (on the UI side, the search dialog should have "include_past_versions=true" on the API side it should permit GET by PDH even if it is a past version).

#37 Updated by Peter Amstutz 5 months ago

#38 Updated by Peter Amstutz 5 months ago

I'm wondering if there is a minimum viable ticket here that only includes:

  • Something that says a collection is not the latest version
  • A link to the latest version
  • Tell the user they need to make a copy if they want to edit it
  • Tell the user to go to the latest version if they want to share it
  • #16718

#39 Updated by Peter Amstutz 5 months ago

Added #16719

#40 Updated by Peter Amstutz 5 months ago

  • Related to Feature #16719: Basic support for collection versions added

#41 Updated by Peter Amstutz 5 months ago

  • Description updated (diff)
  • Subject changed from View/copy/expunge previous versions of a collection to Browse previous versions of a collection

#42 Updated by Lucas Di Pentima 5 months ago

  • Target version changed from 2020-09-09 Sprint to 2020-09-23 Sprint

#43 Updated by Lucas Di Pentima 4 months ago

  • Target version changed from 2020-09-23 Sprint to 2020-10-07 Sprint

#44 Updated by Peter Amstutz 3 months ago

  • Target version changed from 2020-10-07 Sprint to 2020-10-21 Sprint

#45 Updated by Lucas Di Pentima 3 months ago

  • Status changed from New to In Progress

#46 Updated by Lucas Di Pentima 3 months ago

  • Target version changed from 2020-10-21 Sprint to 2020-11-04 Sprint

#47 Updated by Lucas Di Pentima 3 months ago

  • Target version changed from 2020-11-04 Sprint to 2020-11-18

#48 Updated by Lucas Di Pentima 2 months ago

  • Related to Bug #17098: Collection "restore from previous version" button added

#49 Updated by Lucas Di Pentima 2 months ago

Status update

Currrent code at arvados-workbench2|b7f96fb - Branch 13494-collection-version-browser
Test run: https://ci.arvados.org/view/Developer/job/developer-tests-workbench2/177/

Code updates

  • Allows PDH UI to list old versions.
  • Shows new "old collection" icon on any DataTable-based component.
  • Fixes places where the "search box label" on DataTable based components was wrong (ie: "Search files" on a project listing) by allowing customization.
  • Refactors details panel removing the unused "Activity" tab and allowing custom tabs per resource. (ie: Versions tab for collections)
  • Sets "Owner" column off (it's still possible to enable it) on various listing panels as the provided info is redundant and takes lots of horizontal space.
  • Populates the "Versions" tab on the collection's detail panel with a clickable listing of versions (aka the "version browser").
  • Makes the version retrieval only happen when the details panel is open.
  • Allows the user to directly open the version browser by clicking on the collection's version number on the main info panel.

Pending

  • Use virtual version listing to avoid the same issues we had with big collections: only process what's being rendered, avoding setting too many event handlers, etc.
  • Layout enhancements: the version browser column header needs better alignment with the listing contents. Also, the listing row height might need adjusting (making it more compact).
  • Add a "make version current" action on the old version UI. (Refs #17098)
  • Tests.

#50 Updated by Peter Amstutz 2 months ago

Timestamps are a little weird.

created_at is copied directly to the snapshot, so created_at is the same for every version.

modified_at is the last time the record is modified. But what this means is that when a snapshot is created, the modified_at is set to when the snapshot is created, but the "head" record is also modified, so both the "head" version and the second-to-last versions have the same modified_at.

However, what I probably want to see when browsing versions is the timestamp for when that version came into being. So version 1 is the created_at time, version 2 is when version 2 was created, version 3 is when version 3 was created. etc.

Currently, showing modified_at means version 1 actually shows the time version 2 came into being, version 2 shows the time that version 3 came into being, etc.

The details view is similarly confusing (modified_at doesn't really mean what you think it means).

Let's discuss whether the solution is to change the backend (maybe the snapshot should copy modified_at?) or accommodate it on the frontend.

#51 Updated by Peter Amstutz 2 months ago

The "head version" field is not shown on the "latest" collection. This causes the fields to shuffle around between "lastest" and past versions. We should either inlcude the head version field the same way or use a placeholder like "Head version: this"

#52 Updated by Peter Amstutz 2 months ago

The "Version: N" field lets you click on it and it opens the sidebar with the versions tab selected. Can we do the same thing with "info" button?

#53 Updated by Peter Amstutz 2 months ago

This is unrelated to versions except that you mentioned "Fixes places where the "search box label" on DataTable based components was wrong (ie: "Search files" on a project listing) by allowing customization."

When you search and there are no hits, the message is "Your project is empty. Please create a project or create a collection and upload a data." instead of something like "There are no results from your search".

#54 Updated by Lucas Di Pentima 2 months ago

  • Target version changed from 2020-11-18 to 2020-12-02 Sprint

#55 Updated by Lucas Di Pentima about 2 months ago

Updates at arvados-workbench2|f85043c3
Test run: https://ci.arvados.org/view/Developer/job/developer-tests-workbench2/182/

Updates

  • "Head version" attribute is always displayed on the collection panel, so that other attributes don't get shuffled on the UI.
  • Optimised the details panel component so that it re-renders only when necessary.
  • Enhanced the version browser layout, making it more compact, getting the column labels aligned.
  • Changes the collection status renderer so that "current version" is now "head version" and "old version" is now "version N". This labels appear on search and pdh listings.
  • Fixed a collection property removal bug that I found while playing with versioning.
  • Changed several collection related actions to be asynchronous instead of using "async/await".
  • Fixed failing integration tests related to searching old versions.

Pending

  • Writing some integration tests for this new feature
  • Re: empty project icon/message when no search results: can we make that a different ticket? I've briefly checked if it was something super trivial but couldn't find a solution yet.
  • Re: Information icon displaying the "versions" tab: This is a generic piece of UI and what it does is toggling the (status of) details panel. Because it was not super obvious the best way to not show a certain tab depending on the current UI view (ie: show the details tab on project listings, but not on collection panel) I added the "direct access" link to the version browser via clicking the version number. Maybe if I can somewhat know in which UI the user is at any moment (not sure if this is recorded on the app's state) I can add a "default tab number" per type of detail panel.

#56 Updated by Peter Amstutz about 2 months ago

Lucas Di Pentima wrote:

Updates at arvados-workbench2|f85043c3
Test run: https://ci.arvados.org/view/Developer/job/developer-tests-workbench2/182/

Updates

  • "Head version" attribute is always displayed on the collection panel, so that other attributes don't get shuffled on the UI.
  • Optimised the details panel component so that it re-renders only when necessary.
  • Enhanced the version browser layout, making it more compact, getting the column labels aligned.
  • Changes the collection status renderer so that "current version" is now "head version" and "old version" is now "version N". This labels appear on search and pdh listings.
  • Fixed a collection property removal bug that I found while playing with versioning.
  • Changed several collection related actions to be asynchronous instead of using "async/await".
  • Fixed failing integration tests related to searching old versions.

This all looks great!

Pending

  • Writing some integration tests for this new feature

Yep, I think that's the last thing to do.

  • Re: empty project icon/message when no search results: can we make that a different ticket? I've briefly checked if it was something super trivial but couldn't find a solution yet.

https://dev.arvados.org/issues/17153

  • Re: Information icon displaying the "versions" tab: This is a generic piece of UI and what it does is toggling the (status of) details panel. Because it was not super obvious the best way to not show a certain tab depending on the current UI view (ie: show the details tab on project listings, but not on collection panel) I added the "direct access" link to the version browser via clicking the version number. Maybe if I can somewhat know in which UI the user is at any moment (not sure if this is recorded on the app's state) I can add a "default tab number" per type of detail panel.

If this is too annoying to fix, then leave it as is.

#57 Updated by Lucas Di Pentima about 2 months ago

Updates at arvados-workbench2|f40add99
Test run: https://ci.arvados.org/view/Developer/job/developer-tests-workbench2/186/

  • Added integration test for collection's version browsing.

#58 Updated by Peter Amstutz about 2 months ago

Two things:

1) The "Add to favorites" shows up in the action menu, but this doesn't work for past versions.

2) How hard would it be to make an action context menu show up when you right-click a row in the "Versions" list?

Otherwise this looks really good and I think it's almost ready to merge

#59 Updated by Lucas Di Pentima about 2 months ago

From chat: above comment nr 1) is about not showing the "add to favorites" action on past version collections. It'll be implemented on #17098 as I already have related code written on it.

#60 Updated by Lucas Di Pentima about 2 months ago

Updates at arvados-workbench2|306d28fe
Test run: https://ci.arvados.org/view/Developer/job/developer-tests-workbench2/190/

  • Adds context menu support on collection versions browser.
  • Adds checks on the integration test case.

#61 Updated by Peter Amstutz about 2 months ago

Lucas Di Pentima wrote:

Updates at arvados-workbench2|306d28fe
Test run: https://ci.arvados.org/view/Developer/job/developer-tests-workbench2/190/

  • Adds context menu support on collection versions browser.
  • Adds checks on the integration test case.

On Firefox, I'm not getting the action context menu when I click on an item in the versions list (I do get the browser's context menu).

#62 Updated by Lucas Di Pentima about 2 months ago

It works on my side, with Firefox 83.0 64-bits. Do you get any kind of JS console message?

#63 Updated by Peter Amstutz about 2 months ago

Lucas Di Pentima wrote:

It works on my side, with Firefox 83.0 64-bits. Do you get any kind of JS console message?

It's working now. Maybe I had a stale js cache.

LGTM, please merge!

#64 Updated by Anonymous about 2 months ago

  • % Done changed from 50 to 100
  • Status changed from In Progress to Resolved

Also available in: Atom PDF