Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: add Drag step type #491

wants to merge 2 commits into from

Conversation

jrandolf-2
Copy link
Contributor

@jrandolf-2 jrandolf-2 commented Mar 14, 2023

No description provided.

@jrandolf-2 jrandolf-2 requested a review from OrKoN March 14, 2023 22:15
@jrandolf-2
Copy link
Contributor Author

jrandolf-2 commented Mar 14, 2023

@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 {
Copy link
Collaborator

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)

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

3dirty5

This comment was marked as spam.

Natecreate13

This comment was marked as spam.

Manny1210

This comment was marked as spam.

Rifkisetiawan29

This comment was marked as spam.

Rifkisetiawan29

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants