Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Rewrite stack navigator#131

Merged
satya164 merged 56 commits intomasterfrom
@satya164/reanimated-stacks
Jul 8, 2019
Merged

Rewrite stack navigator#131
satya164 merged 56 commits intomasterfrom
@satya164/reanimated-stacks

Conversation

@satya164
Copy link
Member

@satya164 satya164 commented May 24, 2019

This is a re-implementation of stack navigator using kmagiera/react-native-reanimated.

TODO

@satya164 satya164 changed the title Rewrite stack animation Rewrite stack navigator May 24, 2019
@satya164 satya164 force-pushed the @satya164/reanimated-stacks branch 11 times, most recently from 4f3babe to 883a169 Compare May 31, 2019 12:41
@satya164 satya164 force-pushed the @satya164/reanimated-stacks branch 18 times, most recently from 44a2442 to 2ae1ea5 Compare June 4, 2019 19:43
index === self.length - 1
? 1
: Platform.OS === 'android'
? cond(eq(next, 1), 0, 1)
Copy link
Member

@osdnk osdnk Jun 21, 2019

Choose a reason for hiding this comment

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

I think we may get rid of screens support for iOS now. @kmagiera promised me to fix lines breaking this implementation.

Copy link
Member

Choose a reason for hiding this comment

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

Right, I suggest to turn off screens on iOS for the time being. Even when fixed there are still going to be some people on the old version (via expo for example). I am also confident that the fix may not be necessary, we already use screens and panning works fine with gesture handler in the non-reanimated implementation AFAIK

Copy link
Member

Choose a reason for hiding this comment

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

@kmagiera
How did it happen that it worked 🤔?

Copy link
Member Author

@satya164 satya164 Jun 21, 2019

Choose a reason for hiding this comment

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

Even when fixed there are still going to be some people on the old version (via expo for example)

I think this is not a problem coz it's enabled explicitly by the user by calling useScreens

Copy link
Member Author

Choose a reason for hiding this comment

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

@brentvatne wdyt? should I remove screens usage?

Copy link
Member

Choose a reason for hiding this comment

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

is it?

Copy link
Member

Choose a reason for hiding this comment

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

if it isn't then we can just disable screens on iOS temporarily :)

Copy link
Member Author

Choose a reason for hiding this comment

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

What is the issue? If @kmagiera doesn't have time maybe someone else can fix it?

Copy link
Member

Choose a reason for hiding this comment

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

I wonder how it was possible that the prev version of stack was working

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure. @brentvatne did last one and you did this one XD

Though I only had this problem on Android when implementing it here react-navigation/reanimated-stacks#3

@brentvatne
Copy link
Member

in uikit example:

  1. push a screen
  2. push a screen with no header
  3. go back and the content is under the header

@satya164
Copy link
Member Author

satya164 commented Jul 4, 2019

@brentvatne is it alpha or latest commit?

@christoph-jerolimov
Copy link

christoph-jerolimov commented Jul 8, 2019

Hey @satya164, create work in the reanimated-stacks alpha branch. 👍

I use already the branch and the alpha versions of the react-navigation-stack. Why did you disable screens (f04b9bf) in the latest alpha for modal dialogs? Using screens and also the new iOS 13 effect was one reason for me to use already the alpha.

(edit: After updating from alpha.2 to alpha.5 is lost the new iOS 13 modal effect. I switched back to the old version for now.)

@satya164
Copy link
Member Author

satya164 commented Jul 8, 2019

Why did you disable screens in the latest alpha for modal dialogs

Because for modals such as ModalPresentationIOS, the previous screen needs to be visible underneath. If screens is enabled, the previous screen will be removed from the tree, and screens has a bug which doesn't make it possible to keep last 2 screens active at the same time.

The only things mode: 'modal' does are pick a default transition and disable screens. You don't have to use it, you can specify custom transition.

After updating from alpha.2 to alpha.5 is lost the new iOS 13 modal effect

Please read the release notes: https://github.com/react-navigation/stack/releases/tag/v2.0.0-alpha.3

@satya164
Copy link
Member Author

satya164 commented Jul 8, 2019

Merging this to master and continue development from there. This will make sure any new PRs and issues we receive are against the latest changes.

@christoph-jerolimov
Copy link

Thanks for the fast feedback @satya164

With moving the TransitionPreset attributes into the defaultNavigationOptions it works great with alpha.5 again. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants