-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Auto scrolling #27
Comments
Sounds cool. I've seen this behavior when dragging boards in trello.com. This is very convenient and it seems that this should work by default. |
Yeah it is very convenient - just need the time to do it! |
I would personally love this feature, although I'm a little unsure of how I'd integrate auto scrolling into all of my other containers where applicable. DOM magic via CSS selectors? |
I am super keen to work on this @tim-soft . We are currently working on #2 which is our primary focus for now. Once that ships I am really keen to get onto auto scrolling and touch support #11 We already know all the droppable scroll containers - so i am expecting we can create some interesting scroll propagator for them as well as the window. We will also need to consider keyboard and ensuring that the page / containers scroll as expected with that also |
Hi guys. Congrats for the excellent work! |
@kupkovski I try not to give out time estimates - but this is huge priority for us. After we solve the big scale performance we will be on this like bees on honey - sweet glorious honey |
Sorry everyone, I'm going to look entitled and ungrateful, but auto scrolling is essential and should have been baked into v1. Love everything about this library otherwise. This library might be useful for inspiration and implementation time saving. https://github.com/StreakYC/react-draggable-list |
We are planning on working on it very soon. We also have a number of competing internal priorities. The plan is to work on it after #86 is shipped. |
FWIW, react-sortable-hoc has this feature. |
Yep. It will be added soon |
I am now starting work on this. If there any great examples people are aware of feel free to post them. I am currently researching! |
https://app.asana.com and https://www.notion.so both have block based DnD, with autoscroll. Both seem to be built with React. |
I'll state the obvious - Trello :) |
Assorted thought on behaviour Mouse / TouchWindow scrollingOnce the user gets close to the edge of the window and the window is able to be scrolled - then we scroll the window. Droppable scrollingIf the user drags near the edge of a scrollable Droppable we scroll the droppable. If the user goes beyond the edge of the container we continue to scroll at maximum speed. This is unless we are now over the top of a new Droppable - in which case we stop auto scrolling PriorityIf an auto scroll would be activated for both the window and the Droppable at the same time then we give preference to [TO BE DECIDED] Keyboard scrollingIf ever an item is moved within a list or into a new list and its location is partially invisible then the container or window will be scrolled so that it becomes visible. ApproachI am still considering where the best place for this logic to live is. Initially I thought a redux middleware (or similar) location would be perfect - but we need to have access to the elements themselves to update their scroll which is not available from the state. Either we split the logic between Without breaking the redux principles the only place right now that has access to the DOM refs and the state is the dimension marshal. Otherwise we need components to also register themselves with another marshal - which feels like a lot of duplication and opportunity for inconsistencies |
@jaredcrowe and I are white boarding behaviour |
git checkout -b auto-scroll 😄 |
I have raised a but in webkit about this one. I can reproduce it in an isolated example. After a scroll a touchmove does not correctly account for clientX, clientY intermittently. I tried to create a work around for this but I was unable to given that:
Given that the webkit team is responding to the bug I will proceed with the bug exposed in the library. It sucks, but I cannot get around it at the moment. The result of this will be some jittering of a draggable as a window is auto scrolling on iOS11 |
It may seem a little quiet but this is well underway. There is a lot of complexity in doing this well for all of the different input types |
Here is our work in progress
We have put an extreme amount of love ❤️ into every interaction to make it feel great regardless of your page composition. We have also been giving keyboard lots of attention which is slowing things down a bit. Auto scrolling with a keyboard is a completely different beast to pointer input dragging |
@alexreardon you're a wizard harry! Is this branch still React v15 compatible? |
Yep @tim-soft |
This is the mess I am currently working through: https://twitter.com/alexandereardon/status/959195944326643713 The browsers update document.documentElement.scrollTop and window.pageYOffset WebkitdocumentElement.scrollTop: no update. Stays at 0 ChromedocumentElement.scrollTop: update with fractional value FireFoxdocumentElement.scrollTop: updates to whole number IE11 (same as firefox)documentElement.scrollTop: updates to whole number Edge (same as webkit)documentElement.scrollTop: no update. Stays at 0 I have no idea if the rounding is the same between the browsers |
@alexreardon Sending you a virtual pat on the back, and a cup of tea with a biscuit. |
I am drinking a tea right now! ☕️ |
good luck |
It just so happened that I sent you an email today inquiring about this feature before I found this post. Do you have an ETA when this feature will be ready? |
We do not give out time estimates. It is actively being worked on so it should not be too much longer 👍 |
This is so close 🔥. There has been some really great work done to ensure this entire experience works in an initiative, beautiful and performant way with mouse, keyboard and touch. Getting keyboard working was a world of pain - but super worth it. It is looking fantastic Thank you for your patience everyone |
Appreciate your efforts on this !!! 🥇 |
You da man!! |
@alexreardon |
any updates on this ;( |
Current mitigation: use your trackpack or mouse to scroll while you are dragging. There was actually a lot of work done to make sure scroll is being listened to directly
Currently when dragging with a mouse the window will not automatically scroll. Nor will scroll containers automatically scroll. We could support this behaviour.
A few things to consider:
Scroll containers
The text was updated successfully, but these errors were encountered: