-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Drag
step type
#491
base: main
Are you sure you want to change the base?
Conversation
@OrKoN @Lightning00Blade This is still a WIP. PTAL and see if the idea here makes sense. In theory, a drag should do both drawing and dragging (i.e. drag n drop API calls), but I don't believe actual 'dragging' works right now, only drawing) |
*/ | ||
duration?: number; | ||
} | ||
|
||
export interface DragStep extends ClickAttributes, StepWithTarget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is value in a drag step based on coordinates. We should do the following instead #273 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rationale: 1) no one is going to define coordinates by hand so recording part is a must 2) coordinates are fragile and any change in the viewport/website will break the recorded drag.
If it's for the drawing use case, let's use maybe a different name but the point 1 still applies. Without Recording, it is difficult to use. Let's, therefore, re-consider the whole story starting with the use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. While designing this it didn't make sense to use coordinates for drag 'n drop.
One thing I wanted as a requirement for this feature is to ensure drag n' drop and "draw"ing were the same API. It's not reasonable to separate them since from the user point of view, they are the same motion. Because of this, it's fairly important we find the correct granularity so we can do this.
No description provided.