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

Fix logic to determine final state (week view or month view) when releasing gesture. #1344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yccheok
Copy link

@yccheok yccheok commented Oct 20, 2021

When we perform

  • Gesture scroll from week view, to month view (without releasing gesture), and then back to week view. If we continue to scroll upward, and release the gesture, the resultant final state will be month view. This is an incorrect behavior. User is expecting the final view to be week view.

  • Gesture scroll from month view, to week view (without releasing gesture), and then back to month view. If we continue to scroll downward, and release the gesture, the resultant final state will be week view. This is an incorrect behavior. User is expecting the final view to be month view.

After fix

From week view, to month view, then back to week view. The final state (week view) is correct. However, you will observe incorrect UI before the gesture is releasing. This is fixed in #1343

0

From month view, to week view, then back to month view. The final state (month view) is correct. However, you will still observe incorrect UI before the gesture is releasing. This is fixed in #1343

1

Note

  • I remove the complex progress calculation. As I notice the value of progress is not being used inside performTransition function. Hence, I just simply pass in -1 constant.
  • The logic to mutate translation is being removed to simplify the code. Our only goal is to find out, whether the current scrolling direction (velocity) matched with initial intention (translation) direction. Revert will be performed if they aren't match.
  • scrollingOverflowRevertRequired is added to handle scrolling "overflow" edge case.

Please kindly let me know, if you have any question. Thank you for reviewing.

…easing gesture

Fix logic to determine final state (week view or month view) when releasing gesture.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant