✨ Feat: Auto scroll when dragging #262
Merged
+143
−78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes issue
This PR implements an auto scroll feature to auto scroll the user when they drag an event to the bottom or top edge of the main grid area.
It handled refactoring parts of the code along the way, mainly removing
gridScrollRef
to simplify the code.It also handled fixing a bug caused by an edge case that was always present, but became more apparent with this new feature. The bug is: when dragging an event to the very bottom of the screen, you can place the event in a way that the end date would overflow outside the bottom edge of the main grid area container. Details in below video:
Summary:
gridScrollRef
Introduces known bugs: #267 #266
Videos
Before
auto_scroll_event_overflow_jittering_before.webm
auto_scroll_before.webm
After
auto_scroll_event_overflow_jittering_after.webm
auto_scroll_after.webm