-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass the current and previous transition props to
render
, `onTransi…
…tionStart` and `onTransitionEnd`. Summary: This shall make it convenient to handle transition changes. Reviewed By: ericvicenti Differential Revision: D3442291 fbshipit-source-id: aee0ffe18ada40ef133484b4a4999f282c66c181
- Loading branch information
Hedger Wang
authored and
Facebook Github Bot 4
committed
Jun 21, 2016
1 parent
6982f5a
commit c57bac4
Showing
2 changed files
with
73 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hedgerwang I am under the impression that this change prevents the old view from unmounting.
When I use this version, compared to the one that is in 0.29-rc.1 right now I see a shadow artifact on the right of the view when pressing back. Also if I add log in componentWillUnmount the previous view, only unmounts when another transition occurs.
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dozoisch : stale scenes should have been removed when the transition finishes.
react-native/Libraries/NavigationExperimental/NavigationTransitioner.js
Line 206 in c57bac4
please let me know if this is not happening for you. Thanks.
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dozoisch I'm not sure if this is related/what you mean but I've always noticed an issue with
NavigationCard
having its drop shadow "linger" before unmounting after pressing back. It's present in the below screenshot (it seems sped up).I've had a look at some other iOS apps and it seems like
shadowOpacity
should animate to 0.source: www.reactnative.com
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is using the version in master:
This is using the version in 0.29:
@hedgerwang so in master, you can see the following flow:
--- This is needed for unmounting
in 0.29 which is the correct behavior:
--- (this is not needed for unmounting)
So it does seem like the views doesn't get unmounted properly. And with master version I get the shadow lingering, where as with the 0.29 version of transitionner the shadow disappears.
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryankask Good question! Well in 0.29 I see the shadow disappearing exactly like in your gif, with the transitionner from masters, it stays there forever
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dozoisch : could you plz patch this to
NavigationTransitioner
and see if this fixes your issue?cc @ericvicenti
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hedgerwang Alright, so I repasted the transitionner from master. Bug still hapenning (as expected). Applied your fix:
It works now! It unmounts properly 🎉
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dozoisch : The fix will be land soon. Thanks for helping out to test this 👍
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I bumped into the same issue this morning- the fix is landing now.
Thanks for braving our master branch and catching this @dozoisch!
c57bac4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericvicenti @hedgerwang Thanks for being so responsive :)!
Yeah I've been following the changes to Navigation really closely, looking forward to see the "Experimental" being removed!