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

V2: DnD: slow perfomance at https://surveyjs.io/create-survey-v2 #2243

Open
dmitry-kurmanov opened this issue Nov 24, 2021 · 6 comments
Open
Assignees

Comments

@dmitry-kurmanov
Copy link
Member

dmitry-kurmanov commented Nov 24, 2021

Ah you mean changing the image based on the drop target it is over? Yeah, that's not possible at the moment.
Note that you shouldn't limit yourself to 1 kind of drag; ie use the manual one in small ranges for ordering items, but use the proper one for adding questions to a survey.

Currently the creator is just very laggy when doing drag & drop from the toolbox. Personally I'd rather have smooth drag & drop, and the UX can be improved by showing contextual information in the drop target instead of on the cursor

.

Originally posted by @SamMousa in #2236 (comment)

@dmitry-kurmanov
Copy link
Member Author

@SamMousa could you please describe that "very laggy" in greater detail to reproduce on our side. Probably we could fix it with the current approach. If not we will discuss the "pros" and "cons" of using native API with the team.

@SamMousa
Copy link
Contributor

https://webm.red/view/tRfH.webm

As soon as there are a few existing question on the page it becomes very noticably laggy.

@dmitry-kurmanov
Copy link
Member Author

what version of the creator you are using react or knockout?

we faced with some performance problem in react version and this is not related to the implementation of the drag drop.

Could you please check it with the production mode react scripts: https://plnkr.co/edit/bzCV9nGIZUB2e4OB ?

@SamMousa
Copy link
Contributor

The video was filmed on https://surveyjs.io/create-survey-v2

@SamMousa
Copy link
Contributor

Could you please check it with the production mode react scripts:

That is a lot better. Even with more questions on the page performance is very acceptable (hard to see any lag unless really looking for it and moving the mouse like a mad man)

Btw, looking at the drag and drop for item sorting, I can't find a case where you actually change the drag preview. The only spot is the toolbox where you put in a question number. That part I already solved in my fiddle.

@dmitry-kurmanov dmitry-kurmanov changed the title V2: DnD: use native html drag and drop api V2: DnD: slow perfomance at https://surveyjs.io/create-survey-v2 Nov 24, 2021
@dmitry-kurmanov
Copy link
Member Author

dmitry-kurmanov commented Nov 24, 2021

The video was filmed on https://surveyjs.io/create-survey-v2

it is ko version we will investigate it

Btw, looking at the drag and drop for item sorting, I can't find a case where you actually change the drag preview. The only spot is the toolbox where you put in a question number. That part I already solved in my fiddle.

we use it in the ranking question in the Library not in the Creator (but drag drop core is the same): https://surveyjs.io/Examples/Library?id=questiontype-ranking&platform=Reactjs&theme=modern please try to "drag over" item and see the number changes

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

No branches or pull requests

2 participants