react-movable icon indicating copy to clipboard operation
react-movable copied to clipboard

Promoted AUTOSCROLL_ACTIVE_OFFSET and AUTOSCROLL_SPEED_RATIO to props

Open peterkogo opened this issue 3 years ago • 4 comments

After a long search for a simple, extensible, reliable, mobile-ready drag-and-drop-list implementation with variable height support - I found this beautiful little project.

Only thing really preventing this from being 100% extensible and awesome are those hardcoded values mentioned in #68.

Hopefully I got this right. Current implementations shouldn't break because the previously hardcoded values are now the default values.

peterkogo avatar Feb 18 '22 11:02 peterkogo

@PeterKey Can you rebase master? It should fix the CI.

You should also update the documentation.

tajo avatar Mar 01 '22 05:03 tajo

@tajo Sure, can do. Will have some time this weekend.

peterkogo avatar Mar 01 '22 19:03 peterkogo

@cc-ebay In my opinion, the autoscroll behaviour should not change if the scroll container resizes in height. I want to set a fixed pixel value from top/bottom where autoscrolling should commence, so I can optimise it how it feels. This should not change over different screen sizes.

I agree with you however when the scroll containers size gets smaller than 2x the autoscrollActiveOffset. Here problems arise and autoscroll behaviour should default to a ratio.

Now that I think about it, this might also apply if list items are bigger than the scroll container in general: It might make sorting impossible because the list would always scroll. But this is a very weird edge case, that somehow defeats the idea behind a list anyway.

peterkogo avatar Mar 01 '22 20:03 peterkogo

The auto-scrolling behavior could be definitely better & work for more cases. If someone wants to research and implement it (including tests for various scenarios), I am open to it. I think "just works" approach makes more sense than letting users customize it.

tajo avatar Mar 02 '22 06:03 tajo