survey-creator icon indicating copy to clipboard operation
survey-creator copied to clipboard

Collapse pages and panels on drag start for questions and panels dragging (option)

Open novikov82 opened this issue 1 year ago • 5 comments

novikov82 avatar Aug 07 '24 06:08 novikov82

We haven't found a good and easy end-user solution for this and decided to postpone this task

tsv2013 avatar Oct 09 '24 09:10 tsv2013

Left this open to fine tune the solution implemented in https://github.com/surveyjs/survey-creator/issues/6450

tsv2013 avatar Jan 30 '25 11:01 tsv2013

Notes.

When a user grabs the question, everything collapses — pages, panels, questions, except for the container (page or panel) where the question is located. Then the user drags the question, reaches the next page — the page expands. Inside the page, everything is still collapsed. The user drags it for example to a panel — the panel expands. Inside the panel, all the questions are still collapsed. The user easily finds a place among the compact collapsed questions. Drops it, and only then everything expands.

No collapse if everything is visible -> Start to drag in the moment when surface starts scrolling -> Option

Apply a new collapsed view for elements.

Image

mikeamelin avatar Feb 03 '25 13:02 mikeamelin

Comments from

@ElenaGorbatkova here you have pages with a bunch of questions, you stand on one of them and start pulling, the page remains open, other questions collapse so that he can see where he is pulling and does not get stuck. If the question is in the panel and he is pulling from the panel, then the panel collapses only at the moment when the element is taken from it

@andrewtelnov we need to check the current state of visible/expanded/collapsed questions on drag start and make smart decision - what we need to collapse and whether we need to collaspe something

@dmitry-kurmanov wants to be one of reviewers

@mikeamelin make collapse on drag optional by keyboard shortcut - e.g. turn collapsing on only if user started drag with "Alt" (or another) key pressed

tsv2013 avatar Mar 26 '25 08:03 tsv2013

TODOs:

  • [ ] Need to check the updatePathToDragOver for inner items of panels, dynamic panels, row panels in matrixes and other comples cases

tsv2013 avatar May 21 '25 14:05 tsv2013