qri-io / 2017-frontend

qri electron & web frontend
https://qri.io
MIT License
23 stars 7 forks source link

feat(dataset): delete one version of the dataset #478

Closed ramfox closed 5 years ago

ramfox commented 5 years ago

First, we need to expand the qri api to take a Gen param, that determine which generation of version we are looking to remove. qri-io/qri#736 We must also change the removeDataset action to reflect any changes occur.

We have a few options: 1) The simplest version of this would be an undo button, that pops off the head. This undo button could be placed below our DatasetButtonGroup, along with the Rename and Remove actions.

2) And/or it could exists in the History tab, next to each version of the dataset.

tbh not sure if one or both is better. will get some feedback!

In any case, we have to ensure that the undo or remove version buttons only appear when the dataset is both local and in the current repo's namespace.

b5 commented 5 years ago

ok, lots to think about on this delete thing. Delete is a seldom-executed action, but needs very clear UI that shows which versions will be removed.

I vote we go with option for now. It's a great stand-in while we work on a better solution. Ideally clicking Undo would open a custom modal that asks "would you like to delete the latest commit?", with "delete 1 commit" in the bottom right of that model. a second button in the bottom left of that modal should be labelled "delete entire dataset"

dustmop commented 5 years ago

I don't think we should go with Undo, as that's typically used only to talk about the most recent "action" the user has done, which might be saving a new revision, or deleting the newest revision, or doing something on a totally different dataset than the one the UI is currently showing. I'd lean towards Revert instead, maybe a button like Revert most recent revision.

I like the 2 idea of having a history list, but that seems like a lot more work. It sounds similar to how Google Docs works (used to work?).

ramfox commented 5 years ago

We have a delete button already, what if instead of saying undo we have the delete button do what @b5 mentioned:

open a custom modal that asks "would you like to delete the latest commit?", with "delete 1 commit" in the bottom right of that model. a second button in the bottom left of that modal should be labelled "delete entire dataset"

So the options are to delete 1 commit or delete entire dataset, and we don't use the word undo