vscode-dvc icon indicating copy to clipboard operation
vscode-dvc copied to clipboard

Drag–and–Drop improvements

Open maxagin opened this issue 3 years ago • 9 comments

Motivation

The goal is to have a better user experience and performance.

  • UX: It's in general preferable to have as less as possible unnecessary movements of the UI elements
  • Performance: Fewer elements will change their positions, the faster will be the processing

Principles

  1. Do not change the composition before the user undersend where he wants to locate the object he is moving
  2. Move only the reflection of the dragged object
  3. Display the indicator that shows the exact place where the dragged object can be placed
  4. Only after the new place is found initiate the changes in the composition
  5. Be able to reset the workspace (will be added to the bar on top of the table #2075)

Apply these principles to following

  • [ ] Table's header https://github.com/iterative/vscode-dvc/issues/2262#issuecomment-1228670872
  • [ ] Table's body - EXPs (if we will like to have D&D for the EXPs)
  • [ ] Plots sections
  • [ ] Plots sections content
  • [ ] Other? - where the Drag–and–Drop is used

Related

D&D interaction patterns study

maxagin avatar Aug 25 '22 04:08 maxagin

Let's simplify and make a single checkbox with other improvements. The whole ticket can one checkbox please with performance as motivation.

There are also some bugs in DnD that we can do small tickets about or one with checkboxes - feedback is pretty bad still, no way to cancel DnD, almost no way to get back to the initial state while doing DnD - let's focus on these things first please.

shcheklein avatar Aug 25 '22 19:08 shcheklein

For the "Table's header sections"

  1. We do not want to change the table content before the user undersend where he wants to locate the section. Only after the user is sure where he like to place the section we can initiate the changes in the table.
  2. We move only the reflection of the dragged cell (just a cell not the column!) + display the indicator that shows the exact place where the cell can be located. After the place is found we initiate the changes in the table including the column relocation. This also will help to have a better performance, while dragging the object, as we will be dealing just with a cell instead of an entire column without changing the layout of the view all the time the object changes its position. and moving just one object instead of changing the column's positions.
  3. The style of the indicator can be the same one as we are planning to use when resizing the header cell (the new style is in Figma)

maxagin avatar Aug 26 '22 16:08 maxagin

For plots, isn't this already how it works? The only thing happening is that we hide the dragged plot and we have a drop section that moves. It is the exact same performance wise as an indicator that would be only one line it simply is more visible. The re-ordering is only applied once an item is dropped.

sroy3 avatar Sep 01 '22 14:09 sroy3

For plots, isn't this already how it works? The only thing happening is that we hide the dragged plot and we have a drop section that moves... The re-ordering is only applied once an item is dropped.

Do not think so. Maybe I am missing something. Motivation: UX. It's in general preferable to have as less as possible unnecessary movements of the UI elements. To achieve: Do not change the composition before the user undersend where he wants to locate the object he is moving. Only after the new place is found initiate the changes in the composition

Also, when testing D&D I got this:

  1. Start D&D of the Large plot from below Classic plots to on top
  2. Without dropping it put it back, the result below
Screen Shot 2022-09-01 at 11 03 17 AM

maxagin avatar Sep 01 '22 15:09 maxagin

For plots, isn't this already how it works? The only thing happening is that we hide the dragged plot and we have a drop section that moves... The re-ordering is only applied once an item is dropped.

Do not think so. Maybe I am missing something. Motivation: UX. It's in general preferable to have as less as possible unnecessary movements of the UI elements. To achieve: Do not change the composition before the user undersend where he wants to locate the object he is moving. Only after the new place is found initiate the changes in the composition

Nothing moves but the indicator that shows you where the item can be dropped.

Also, when testing D&D I got this:

  1. Start D&D of the Large plot from below Classic plots to on top
  2. Without dropping it put it back, the result below
Screen Shot 2022-09-01 at 11 03 17 AM

Seems like the inverse of a bug recently fixed. Can you create another issue just for that please? It's a real bug and not an improvement.

sroy3 avatar Sep 01 '22 15:09 sroy3

Nothing moves but the indicator that shows you where the item can be dropped.

Not sure we are talking about the same thing. Please check the video below. By saying "Do not change the composition before the user undersend where he wants to locate the object he is moving" I mean we won't move anything before the drop target is found.

https://user-images.githubusercontent.com/98249521/187959395-a5b270c3-8175-495e-ad6b-21a64cd5d3cd.mov

maxagin avatar Sep 01 '22 15:09 maxagin

Folks, this is assigned to me with p2. Let's not for now do anything here (except obvious bugs / improvements).

shcheklein avatar Sep 01 '22 16:09 shcheklein

Nothing moves but the indicator that shows you where the item can be dropped.

Not sure we are talking about the same thing. Please check the video below. By saying "Do not change the composition before the user undersend where he wants to locate the object he is moving" I mean we won't move anything before the drop target is found.

Screen.Recording.2022-09-01.at.11.54.30.AM.mov

This is a bug, this is not how the drag and drop works. Try moving inside the same section, you'll see

sroy3 avatar Sep 01 '22 17:09 sroy3

Related: D&D interaction patterns study

maxagin avatar Oct 04 '22 05:10 maxagin

I think we can close this and review plots DnD separately, I don't think we need to change there most of the things mentioned here, but there are quite a few other problems there that could be fixed one by one.

shcheklein avatar Dec 25 '22 21:12 shcheklein