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

[Navigator] Navigator vs. NavigatorIOS please fix docs #1219

Closed
soheil-zz opened this issue May 9, 2015 · 28 comments
Closed

[Navigator] Navigator vs. NavigatorIOS please fix docs #1219

soheil-zz opened this issue May 9, 2015 · 28 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@soheil-zz
Copy link

Someone should update this doc; how is one supposed to know the difference between Navigator and NavigatorIOS?
http://facebook.github.io/react-native/docs/navigator.html#content

It should be noted Navigator uses JS animations and that you cannot pass props in the same way as NavigatorIOS. I modified my entire app only to find out that Navigator is not what I want because the animations suck and don't feel native!

Also explain exactly why they are two different components, this should be in bold on top of both their doc pages. I'm yet to know the logic behind having two different ones.

@jtremback
Copy link
Contributor

👍

@brentvatne
Copy link
Collaborator

I modified my entire app only to find out that Navigator is not what I want because the animations suck and don't feel native!

@soheil - aw man, sorry to hear that. Which animations are you having trouble with? When you say they don't feel native, is it because they feel janky or just don't seem like they are the correct animations?

Someone should update this doc; how is one supposed to know the difference between Navigator and NavigatorIOS?

Also explain exactly why they are two different components, this should be in bold on top of both their doc pages. I'm yet to know the logic behind having two different ones.

I believe that by reading the docs for each it is not too difficult to determine the differences, but agree that it might be useful to have a sentence at the top explaining how they relate to each other.

Notice how with NavigatorIOS there is no way to add your own custom navigation bar? It uses the native implementation for it. Navigator allows you to write your own component to use as a navigation bar. Additionally, NavigatorIOS adds support for swipe-back, but Navigator has many more transitions available (eg: you can swipe a view down to dismiss it with floatFromTop), and they can be customized as well!

Would a description like the above help to have in the documentation? Or would there need to be more information?

As for passProps, this is all done with renderScene I believe - you get the data from the route object that you pushed and then pass it in as a prop to the component that you render here.

@jtremback
Copy link
Contributor

I feel like there was some way to add custom stuff to a basic nav bar when I was doing a little true native dev- would this be at all worth adding or is the functionality too hobbled?

@brentvatne
Copy link
Collaborator

@jtremback - NavigatorIOS uses UINavigationController, check it out to see what options are exposed

@jtremback
Copy link
Contributor

I can set leftBarButtonItem from JS?

@brentvatne
Copy link
Collaborator

@jtremback - you can set the leftButtonIcon and leftButtonTitle, see #1230 for issue to improve parsing of the docs for this

@bakso
Copy link

bakso commented May 11, 2015

Doc no good

@nigeman
Copy link

nigeman commented May 11, 2015

+1 the documentation needs to be clearer. PS good work guys so far..

@yelled3
Copy link
Contributor

yelled3 commented May 14, 2015

I was about to open a similar PR and found this, so 👍 @soheil

@brentvatne

Would a description like the above help to have in the documentation? Or would there need to be more information?

I would even go further and suggest adding a new page in the docs that compares between Navigator and NavigatorIOS.
It would also be helpful to include examples to use cases where it's best to use one and not the other.

@sharathprabhal
Copy link
Contributor

I would even go further and suggest adding a new page in the docs that compares between Navigator and NavigatorIOS.

^ +1

@brentvatne
Copy link
Collaborator

Thanks for the 👍's folks, helps me to prioritize this

@richardscarrott
Copy link

+1

@faithfe
Copy link

faithfe commented May 23, 2015

+1

@mitchozer
Copy link

+1, thanks!

@AdamBrodzinski
Copy link

+1 and thanks for the info in this issue, makes it much more clear 👍

@brentvatne brentvatne changed the title Navigator vs. NavigatorIOS please fix docs [Navigator] Navigator vs. NavigatorIOS please fix docs May 30, 2015
@albertwchang
Copy link

+1
The problem I am having is with giving a bar button item access to objects and variables local within the target scene. Example: Scene 1 goes to Scene 2, but I setup the "onRightButtonPress()" function in Scene 1.

I am using the REACT-NATIVE-SIDE-MENU module in Scene 2, and do not know how to have the Bar Button Item access this component...

@ssssssssssss
Copy link

@soheil - aw man, sorry to hear that. Which animations are you having trouble with? When you say they don't feel native, is it because they feel janky or just don't seem like they are the correct animations?

@brentvatne The animation of Navigator feels really janky and the animation is not identical to the NavigatorIOS. The interpolator of Navigator module should be "RightToLeft" if I remember correctly.

@soheil-zz
Copy link
Author

sorry I stopped using react native

On Sun, Jun 7, 2015 at 8:31 PM, fxwan notifications@github.com wrote:

@soheil https://github.com/soheil - aw man, sorry to hear that. Which
animations are you having trouble with? When you say they don't feel
native, is it because they feel janky or just don't seem like they are the
correct animations?

@brentvatne https://github.com/brentvatne The animation of Navigator
feels really janky and the animation is not identical to the NavigatorIOS.
The interpolator of Navigator module should be "RightToLeft" if I remember
correctly.


Reply to this email directly or view it on GitHub
#1219 (comment)
.

@brentvatne
Copy link
Collaborator

I haven't had much time for this recently but should get around to fixing up a bunch of docs this week. Additionally, to better reflect Facebook's priorities the idea is to move NavigatorIOS to an OSSLibraries folder and outside of the internal sync process which will allow us (the OSS community) to iterate on it more quickly.

@paramaggarwal
Copy link
Contributor

From what I understand, the two drawbacks Navigator has are swipe-to-go-back and JS driven animations - while there are a number of other benefits. Any view 'controller' that iOS provides can very well be in JS because it is just logic. The view continues to remain native, but the control is now driven from JS. This makes it more customisable.

Fortunately even the two drawbacks as mentioned can theoretically be fixed. Apple provides a EdgeSwipe UIGestureRecognizer that can be used/enabled on Navigator, to get fluid swipe to go back animation. Also JS driven animations will definitely get better as the RN team is working/exploring it very deeply.

@wootwoot1234
Copy link

+1

@brentvatne
Copy link
Collaborator

Done: https://facebook.github.io/react-native/docs/navigator-comparison.html

(just pushed, should be up within a few minutes)

@wootwoot1234
Copy link

@brentvatne cool! links broken though. ;)

@ide
Copy link
Contributor

ide commented Jun 18, 2015

That's github being too clever. Try this: https://facebook.github.io/react-native/docs/navigator-comparison.html

@paramaggarwal
Copy link
Contributor

This is very nice, thanks @brentvatne! I have a thought, should we move all the stuff that is going to move out of React Native core, like TouchableBounce and NavigatorIOS into a separate sidebar section called Third Party or Libraries or something like that?

@brentvatne
Copy link
Collaborator

@paramaggarwal - if we can come up with a name that communicates that these libraries are considered not part of the core and not actively maintained by the core team, that would be nice 😄

let's get them moved into an OSSLibraries directory first, and we can revisit when that's done!

@yelled3
Copy link
Contributor

yelled3 commented Jun 18, 2015

@brentvatne amazing work - thanks!

separate sidebar section called Third Party or Libraries

@paramaggarwal I agree - I think people should know which component is more supported.

@nwpuhmz
Copy link

nwpuhmz commented Aug 20, 2015

+1 ,thanks

@facebook facebook locked as resolved and limited conversation to collaborators Jun 18, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests