Skip to content

Fix/dialog animation #891

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

Merged
merged 12 commits into from
Aug 16, 2020
Merged

Fix/dialog animation #891

merged 12 commits into from
Aug 16, 2020

Conversation

ethanshar
Copy link
Collaborator

@ethanshar ethanshar commented Aug 12, 2020

WOAUILIB-972
The purpose of this fix is to improve the dialog entrance/exist animation.
On the way I fixed small stuff I found

  • In PanResponderView I'm now using View's internal animation prop instead of the Container ternary.
  • In DialogDismissibleView I removed unnecessary state update (isAnimating doesn't affect render)

In the Dialog component

  • I changed the Modal animationType to "none" so we can have better control over the background fading animation
  • I created a separate component, OverlayFadingBackground, with a single purpose - the handle the background fading transition. (Technically, now the background fade animation and the dialog entrance/exit animation happen together.)
  • Also, minor tweaks with the animation duration, easing, etc..

@ethanshar ethanshar requested a review from M-i-k-e-l August 12, 2020 09:28
@ethanshar ethanshar marked this pull request as ready for review August 12, 2020 09:28
@M-i-k-e-l
Copy link
Collaborator

M-i-k-e-l commented Aug 12, 2020

Technically, now the background fade animation and the dialog entrance/exit animation happen together

I believe we had a bug with that, I cannot remember ATM what it was (I think it was on iOS), I hope our e2e will find it (or it doesn't happen :) ).

Edit: this was before I saw the PR, I'm guessing that not using the Modal's fade can solve that.
Edit 2: regarding the things that are not used anymore: I did not find any bugs, so I hope the added OverlayFadingBackground solved all these issues, nice! With that said, we should run e2e + manual test on the private repo.

if (!dialogVisibility) {
animateFading(0);
}
}, [dialogVisibility]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hooks plugin says you are missing animateFading

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed the warnings..
But I gotta say, the plugin is not that smart.
It just blindly check what's being used and ask to add it as a dependency, which sometimes is not really necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, and it has bugs sometimes (see AutoLockScrollView, it cannot recognize that not all the props need to be checked), but it did find these which are bugs, I think, so it's worth using IMHO.

@ethanshar ethanshar requested a review from M-i-k-e-l August 13, 2020 13:39
@ethanshar ethanshar requested review from M-i-k-e-l and removed request for M-i-k-e-l August 14, 2020 05:31
@M-i-k-e-l M-i-k-e-l merged commit aa5c54f into master Aug 16, 2020
@ethanshar ethanshar deleted the fix/Dialog_animation branch September 21, 2020 08:02
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.

2 participants