Commit Graph

150 Commits

Author SHA1 Message Date
Naman Goel 1673e00e2b correct flow types
Summary:
The function should have optional arguments, but not nullable types.
Closes https://github.com/facebook/react-native/pull/7580

Differential Revision: D3304994

Pulled By: davidaurelio

fbshipit-source-id: 9918817429126ea16dd3076b61a3493c3a3a8388
2016-05-16 07:58:26 -07:00
Hedger Wang 8975bb8e70 `didFocus` event should fired after transition finishes.
Summary:
For now, we emit `didFocus` event before fully resetting the transition and
hiding the stale scenes, so handler for `didFocus` event does not get the right
scenes in place. We should emit the didFocus event after resetting the transition and
hiding the stale scenes.

Reviewed By: ericvicenti

Differential Revision: D3299002

fbshipit-source-id: 6a79528097aabc4f61d4dba322820c228c889a84
2016-05-13 12:58:24 -07:00
Sebastian Gronewold 07767e86a3 Navigator - velocity override
Summary:
This code change allows changing the transition velocity of the navigator
when switching views.

Whats the use case? If you have different types of
animations your animations might also need different transition velocities.
Closes https://github.com/facebook/react-native/pull/5439

Differential Revision: D3264719

Pulled By: ericvicenti

fb-gh-sync-id: 1bc0a1191ed3bd51b624acd161c3ee77fd748d72
fbshipit-source-id: 1bc0a1191ed3bd51b624acd161c3ee77fd748d72
2016-05-05 15:06:47 -07:00
Christoph Pojer d363b1f2e2 Update Jest APIs on fbsource
Reviewed By: javache

Differential Revision: D3229435

fb-gh-sync-id: b0e252d69e1f399a946fca6e98ef62ff44c2ef9c
fbshipit-source-id: b0e252d69e1f399a946fca6e98ef62ff44c2ef9c
2016-04-27 19:16:32 -07:00
Tomasz Netczuk 9a82c03e1f Navigator.SceneConfigs.PushFromRight similar to native iOS animation.
Summary:The animation looks ok now.

However, the original iOS navigator adds transparent overlay and shadow. Any idea how to implement it? I'd like to add it.
Closes https://github.com/facebook/react-native/pull/5061

Differential Revision: D3129246

Pulled By: ericvicenti

fb-gh-sync-id: ee86261a49ea4b8f6854abf69bef3ebfd6878852
fbshipit-source-id: ee86261a49ea4b8f6854abf69bef3ebfd6878852
2016-04-15 18:23:29 -07:00
Luke Dubert ca2fb70fa9 Fix: swiping in navigator too quickly causes the gesture to be lost
Summary:**Issue:**

In the Navigator if a user attempts to navigate backwards (or forwards) through the route stack by swiping and they perform the gesture too quickly, the gesture is lost and nothing happens.

**Cause:**

In the `_matchGestureAction` function, the variable `moveStartedInRegion` is created and evaluates the gesture to determine if it was initiated in a valid region, (a.k.a. within the `edgeHitWidth`). The issue arises because `moveStartedInRegion` uses `currentLoc` (which is created from `gestureState.moveX`/`Y`) and when the gesture is performed using a flick of the finger, the first value of the `currentLoc` is outside of the `edgeHitWidth`.

**Solution:**

The solution is to track the coordinates of the initial grant (`gestureState.x0`/`y0`), and use that value instead of the `currentLoc` when evaluating `moveStartedInRegion`. The `currentLoc` is still needed however, for when the gestureState does not have a an initial x and y value, because the pan responder has not been granted.
Closes https://github.com/facebook/react-native/pull/6249

Differential Revision: D3168726

Pulled By: ericvicenti

fb-gh-sync-id: f2ac462e59bdc38536b99cac6a4877c99fa4e869
fbshipit-source-id: f2ac462e59bdc38536b99cac6a4877c99fa4e869
2016-04-12 11:08:23 -07:00
Janic Duplessis 49fdd99633 Display component methods on the website and tweak the documentation
Summary:The website now displays public methods on components. This was implemented mostly in react-docgen via #66. This adds a <Method> component that is used by the component and API doc pages to display documentation for a method.

It also adds some missing documentation and tweak some existing one to integrate with this feature. I also prefixed some component methods with an '_' so they don't show up in the doc.

**Test plan (required)**

Tested every component page locally to make sure the methods doc was displayed properly.
Tested an API page to make sure it still worked properly.
Closes https://github.com/facebook/react-native/pull/6890

Differential Revision: D3159911

Pulled By: vjeux

fb-gh-sync-id: 1e6a4640cda6794496d9844c1af6a1451c017dcc
fbshipit-source-id: 1e6a4640cda6794496d9844c1af6a1451c017dcc
2016-04-09 11:13:28 -07:00
Kyle Corbitt bafc506f7c Ignore Navigator touch events for background buttons
Summary:Currently, if the Navigator with the default `NavigatorNavigationBar` has two scenes on its `routeStack` and the bottom one defines a `RightButton` but the top one doesn't, a touch to the location of the underlying  `RightButton` will trigger its action.

This fix checks if the button's opacity is set to 0 (indicating it has been transitioned off the scene and shouldn't be interacted with) and ignores touch events if so.
Closes https://github.com/facebook/react-native/pull/5624

Differential Revision: D3139553

fb-gh-sync-id: 6d6da1459e289499b6d8769120a3b6114548c090
fbshipit-source-id: 6d6da1459e289499b6d8769120a3b6114548c090
2016-04-05 11:33:27 -07:00
Bruno Barbieri 9eb75b4dfb - added available SceneConfigs to Navigator docs
Summary:At the beginning of the navigator docs it says " See Navigator.SceneConfigs for default animations and more info on scene config options."

but then this is the only information available:

<img width="658" alt="screen shot 2016-03-23 at 2 40 49 am" src="https://cloud.githubusercontent.com/assets/1247834/13977670/733cdaa6-f0a1-11e5-92e6-fc98725f65e0.png">

And the only way of knowing about the available options is to look at the source code. I think a lot of people will appreciate this...

If you think this is too much, maybe adding a link to the source code would help.
Closes https://github.com/facebook/react-native/pull/6599

Differential Revision: D3088592

fb-gh-sync-id: f11025b76441e9394ce42ed6c796fa1ace3e8c27
fbshipit-source-id: f11025b76441e9394ce42ed6c796fa1ace3e8c27
2016-04-01 09:03:25 -07:00
Weijia Wang d0f6a1a13e Imporve docs for the prop "navigationBar" in Navigator
Summary:The doc of props "navigationBar" in Navigator is not  detailed enough. I make an improvement to it.
Closes https://github.com/facebook/react-native/pull/6615

Differential Revision: D3102065

fb-gh-sync-id: da96e3c422e053d0a8203bbd160ea10ed590878a
fbshipit-source-id: da96e3c422e053d0a8203bbd160ea10ed590878a
2016-03-26 07:01:23 -07:00
Adrien Brault 7fdabd8f14 Navigator: emit didFocus after routeStack reset
Summary:Hi,

I am using https://github.com/aksonov/react-native-router-flux / https://github.com/exponentjs/ex-navigator and I needed a way to update my redux store with the current route.

I'm using the navigation context to do this:

```javascript
if (navigationContext) {
  const handler = () => {
    updateCurrentRouteState(navigationContext.currentRoute);
  };
  navigationContext.addListener('willfocus', handler);
  navigationContext.addListener('didfocus', handler);
}
```

However, when the whole stack is replaced, no event is emitted. This PR aims to fix that.
Closes https://github.com/facebook/react-native/pull/5596

Differential Revision: D3080004

Pulled By: ericvicenti

fb-gh-sync-id: 0ef4ecebec7076275b6433c80aae6102cf28c039
shipit-source-id: 0ef4ecebec7076275b6433c80aae6102cf28c039
2016-03-21 19:18:53 -07:00
Wenjing Wang 8a1629166e nested emit call in a queue should be handled in FIFO
Summary: I think we should dispose events in FIFO order

Reviewed By: fkgozali

Differential Revision: D2987425

fb-gh-sync-id: a4ad256512725d0bed0086b642e10fe7e7715070
shipit-source-id: a4ad256512725d0bed0086b642e10fe7e7715070
2016-03-03 18:57:52 -08:00
David Aurelio ad8a335864 Remove knowledge of fbjs from the packager
Summary:Follow-up to https://github.com/facebook/react-native/pull/5084

This…
- changes all requires within RN to `require('fbjs/lib/…')`
- updates `.flowconfig`
- updates `packager/blacklist.js`
- adapts tests
- removes things from `Libraries/vendor/{core,emitter}` that are also in fbjs
- removes knowledge of `fbjs` from the packager

Closes https://github.com/facebook/react-native/pull/5084

Reviewed By: bestander

Differential Revision: D2926835

fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
2016-03-02 04:28:38 -08:00
Hedger Wang 3812c74e7c Guard navigator from dismatching gestures.
Reviewed By: fkgozali

Differential Revision: D2985510

fb-gh-sync-id: 72639c37fa61c91bbd75ba74166eed96f11d7564
shipit-source-id: 72639c37fa61c91bbd75ba74166eed96f11d7564
2016-02-26 18:11:32 -08:00
Hedger Wang 5ca9245067 stop wanring about using `onWillFocus` and `onDidFocus`.
Reviewed By: chaceliang

Differential Revision: D2925643

fb-gh-sync-id: d12b774b5c43d5369e2c02832d80541b2534fba6
shipit-source-id: d12b774b5c43d5369e2c02832d80541b2534fba6
2016-02-11 22:27:33 -08:00
Hedger Wang 7b57b5c84a re-render the whole navigation bar while calling immediatelyResetRouteStack
Summary:
public

Navigator expects that the navigation bar implements the method to refresh itself.
NavigatorNavigationBar already has this method but not for NavigatorBreadcrumbNavigationBar.

Fix diff fixes this with the same fix as D2751922 did.

Reviewed By: wenjingw

Differential Revision: D2914475

fb-gh-sync-id: a2960bad5df3b403bdd2ab1dc4d349d7251b86c8
shipit-source-id: a2960bad5df3b403bdd2ab1dc4d349d7251b86c8
2016-02-08 19:51:35 -08:00
Janic Duplessis 1c6e837504 Add a deprecatedPropType module to show deprecation warnings
Summary:
To allow smoother API changes for users we often deprecate props and keep them around for a while before removing them. Right now it is all done manually, this adds a consistent way to show a warning when using a deprecated prop.

This also adds a deprecation warning of the website generated from the deprecatedPropType.

<img width="643" alt="screen shot 2016-01-26 at 7 43 08 pm" src="https://cloud.githubusercontent.com/assets/2677334/12600172/7af28fb0-c465-11e5-85e5-3786852bf522.png">

It also changes places where we added the warnings manually to use deprecatedPropType instead.
Closes https://github.com/facebook/react-native/pull/5566

Reviewed By: svcscm

Differential Revision: D2874629

Pulled By: nicklockwood

fb-gh-sync-id: c3c63bae7bbec26cc146029abd9aa5efbe73f795
2016-01-29 02:05:38 -08:00
Hedger Wang 1edcf4c6ac Disable navigation bar right button when it's transparent.
Reviewed By: chaceliang

Differential Revision: D2863157

fb-gh-sync-id: ca73545303607333fe32cd8e2e8f040134ee1d24
2016-01-26 01:28:34 -08:00
Nick Lockwood cb45eaa0e8 Made Map & Set polyfills available globally
Summary:
public

Map and Set are a standard JavaScript features, but are only supported in a subset of JSC versions that we target (e.g. iOS 7's JSC doesn't support Set).

The consequence of this is that failing to require('Set') before using it won't error during testing on a modern OS, but will fail on older OS versions. This diff makes the Map and Set polyfills available globally to all RN apps to avoid that problem.

Reviewed By: davidaurelio

Differential Revision: D2833997

fb-gh-sync-id: 713d8b69f6a1bce2472a1b2e6b84f69d75f30289
2016-01-20 08:27:38 -08:00
Gaëtan Renaudeau 1abd12b68b configureScene: add routeStack in second argument
Summary:
Giving routeStack in second parameter of configureScene allows to do more advanced scene configuration.
I have use-case where I can only determine the scene config from the navigation context (not only from the route object but also from where it's located).
Closes https://github.com/facebook/react-native/pull/5254

Reviewed By: svcscm

Differential Revision: D2828415

Pulled By: androidtrunkagent

fb-gh-sync-id: 27b6c79b24cbc194e080541e9202ca84c55a0bc4
2016-01-13 13:27:31 -08:00
Eric Raio 5fb1966509 Adding `resetTo` documentation in Navigator methods
Summary: Closes https://github.com/facebook/react-native/pull/5220

Reviewed By: svcscm

Differential Revision: D2818993

Pulled By: bestander

fb-gh-sync-id: 0bc0feb68e6c6f6132203daef586d78489047731
2016-01-12 04:47:37 -08:00
Christoph Pojer b84ad2ab0d Updates for haste2 inside of jest
Summary:
I'm working on deploying haste2 with jest. This updates all the files that require changes for this to work and they are backwards compatible with the current version of jest.

* package.json was just outdated. I think haste1's liberal handling with collisions made this a "non-issue"
* env.js didn't properly set up ErrorUtils, also unsure why that isn't a problem in jest right now already?
* some things were mocking things they shouldn't
* Because of the regex that matches against providesModule and System.import, it isn't possible to list module names more than once. We have multiple tests reusing the same providesModule ids and using System.import with modules that only exist virtually within that test. Splitting up the strings makes the regexes work (we do the same kind of splitting on www sometimes if we need to) and using different providesModule names in different test files fixes the problem. I think the BundlesLayoutIntegration-test is going to be deleted, so this doesn't even matter.

public

Reviewed By: voideanvalue

Differential Revision: D2809681

fb-gh-sync-id: 8fe6ed8b5a1be28ba141e9001de143e502693281
2016-01-08 06:52:29 -08:00
Gaëtan Renaudeau 4f9086f0e7 Fixes error when navigationBar is set back to null
Summary:
This fixes a regression introduced in df70005c12

If you set navigationBar props (on Navigator) and then later set it back to null, it will crashes.
(N.B. this should be possible as navigationBar is optional)

cc satya164
Closes https://github.com/facebook/react-native/pull/4941

Reviewed By: svcscm

Differential Revision: D2788889

Pulled By: bestander

fb-gh-sync-id: f8f1cd6cc2ce13b1b1b86fa76d3b22c26a8adb5b
2016-01-07 12:01:37 -08:00
sunnylqm 58bbd7bc5b Hint for passing navigator in renderScene
Summary: Closes https://github.com/facebook/react-native/pull/4999

Reviewed By: svcscm

Differential Revision: D2790687

Pulled By: androidtrunkagent

fb-gh-sync-id: af055123b351e37081a37d6153333666a878113c
2015-12-28 06:39:32 -08:00
Sameer Rahmani f48961388e FloatFromLeft scene configuration fixed. HorizontalSwipeJumpFromRight…
Summary:
`FloatFromLeft` configuration was wrong. its animation was ok but the swipe back was wrong. for example you had to swipe from left to right for a `back` action which should be swipe from right to left.

`HorizontalSwipeJumpFromRight` is the same as `HorizontalSwipeJump` but for RTL layouts.
Closes https://github.com/facebook/react-native/pull/4815

Reviewed By: svcscm

Differential Revision: D2766720

Pulled By: androidtrunkagent

fb-gh-sync-id: 2b60f2d238a8f8e5b27dbfb307887934be477c81
2015-12-16 15:08:44 -08:00
Hedger Wang 67c6afd14b immediatelyResetRouteStack does not update Navigator's title
Summary:
re-render the whole navigation bar while calling immediatelyResetRouteStack
from navigator.

Reviewed By: zjj010104

Differential Revision: D2751922

fb-gh-sync-id: 79bcd1457a96eaf3ca94b81da9bfecbec7f8af46
2015-12-15 15:40:27 -08:00
Oleg Lokhvitsky 7377fb8baf Fix Navigator.NavigationBar Title interactivity
Reviewed By: hedgerwang

Differential Revision: D2755832

fb-gh-sync-id: 22f937ba271703d49f54acf2e3cdbf1994fad878
2015-12-15 12:02:27 -08:00
Gaëtan Renaudeau db69004300 Fix events to go through the navigation bar layers
Summary:
Here is a showcase of 2 bugs that are fixed with this PR: touchability of title, touchability of overlapped top-right positionned (under the navbar).

(i'm using the inspector)

![bug](https://cloud.githubusercontent.com/assets/211411/11809475/7b6ba71a-a327-11e5-90cf-cbe58637c447.gif)

I have a navbar with a back button, a Title area with a **Green Circle**, a Right area with nothing inside.
In my Screen View, I've positioned in absolute a **Red Rectangle** just on the top-right corner under the navbar.

I want my **Green Circle** and **Red Rectangle** to be touchable but in current React Native version, this is not possible: as shown in the gif, the 3 LeftButton/Title/RightButton wrapper View are **catching the touch events**. My PR allows events to go through these wrapper View.

**After the fix:**

![nobug](https://cloud.githubusercontent.com/assets/211411/11809590/3b803994-a328-11e5-81f7-c1a3bab45e1b.gif)

Complementary Notes:
- in the case of the Red Rectangle, only the lower part of it i
Closes https://github.com/facebook/react-native/pull/4786

Reviewed By: svcscm

Differential Revision: D2760205

Pulled By: androidtrunkagent

fb-gh-sync-id: 55bb141c8f61ab537ff9e832b65b04cb904dfeb9
2015-12-15 11:04:43 -08:00
Justas Brazauskas 0e8b207cc3 Bugfix - Typos
Summary:
Fixed few typos in `./Examples` and `./Libraries` folders.
Closes https://github.com/facebook/react-native/pull/4788

Reviewed By: svcscm

Differential Revision: D2759918

Pulled By: androidtrunkagent

fb-gh-sync-id: d692b5c7f561822353e522f9d4dfde7e60b491cf
2015-12-15 09:09:32 -08:00
Satyajit Sahoo 93f9a4a7ee Fix for flow (https://github.com/facebook/flow/tree/v0.19.0)
Summary:
From flow release notes (https://github.com/facebook/flow/releases),
> import type * as Foo is now disallowed in favor of import type Foo
Closes https://github.com/facebook/react-native/pull/4565

Reviewed By: svcscm

Differential Revision: D2723280

Pulled By: mkonicek

fb-gh-sync-id: 57074ab893c3e2eae3cefc3002853bfdfed91734
2015-12-07 11:29:24 -08:00
Wenjing Wang 0571250521 8/n Fix warnings at startup
Summary:
public
- Add missing required `key` prop for array of child components

Reviewed By: zjj010104

Differential Revision: D2711271

fb-gh-sync-id: b9848abffd3c458cf45b1231be5eff0a5de805f1
2015-12-01 22:53:30 -08:00
Gabe Levi 892dd5b86a Fix errors uncovered by v0.19.0
Reviewed By: mroch

Differential Revision: D2706663

fb-gh-sync-id: 017c91bab849bf18767cacd2ebe32d1a1b10c715
2015-12-01 20:11:26 -08:00
Huang Yu 7242efde0a fix navigator lint warnings
Summary: fix some lint warnings under `Libraries/CustomComponents/Navigator/` directory
Closes https://github.com/facebook/react-native/pull/4447

Reviewed By: svcscm

Differential Revision: D2706390

Pulled By: ericvicenti

fb-gh-sync-id: 5bfed687265e07a162ffc528a41fa5b0d384f635
2015-11-30 19:31:30 -08:00
Danny Arnold df70005c12 calling navigationBar's overridden ref function
Summary: Before that it was not possible to get a ref to a navigation bar (unless using Navigator's internal `_navBar` prop)
Closes https://github.com/facebook/react-native/pull/3755

Reviewed By: svcscm

Differential Revision: D2674315

Pulled By: nicklockwood

fb-gh-sync-id: 26120f7bcbb675e8217b8bd963dcc6ed314d4ba3
2015-11-30 08:32:23 -08:00
Hedger Wang e0d53e1c48 Fix move gesture handling.
Summary: public

The gesture that moves scene around should only be attached when the
move starts at the moment that the first move is granted.

No move would ever be granted if the move event is prevented by the
decendent children (e.g. a slider component).

For now, the move gesture is attached at `onPanResponderGrant`
instead of `onPanResponderMove` thus we'd create "ghost-move-gesture"
when no actual moves is received my the navigator.

Reviewed By: fkgozali

Differential Revision: D2683802

fb-gh-sync-id: 50ae877787167511df48378304bd2ad665c73300
2015-11-23 09:20:28 -08:00
Christine Abernathy 12488da9cf Left nav shouldn't visible when moved to left
Summary: This issue shows up if you have a really long left nav item. When the navigator is pushed in iOS, the long nav item will be visible alongside the new nav item.

Steps to repro:
1/ Modify Examples/UIExplorer/Navigator/NavigationBarSample.js
2/ In NavigationBarRouteMapper.LeftButton, make the following change

    <Text style={[styles.navBarText, styles.navBarButtonText]}>
      Very Long Title {previousRoute.title}
    </Text>

3/ On iOS, get the UIExplorer project up and navigate to Navigator > Navbar Example > Next (top-right nav item) > Next

You should see the overlap.

<img width="592" alt="leftnavitem_issue" src="https://cloud.githubusercontent.com/assets/691109/11086934/b5b82e26-880a-11e5-9945-13901346a5c5.png">

With these changes the overlap is gone.
Closes https://github.com/facebook/react-native/pull/4067

Reviewed By: svcscm

Differential Revision: D2641934

Pulled By: ericvicenti

fb-gh-sync-id: 962536b97f77a3b7f176423aa11dc94f24f07332
2015-11-11 09:02:57 -08:00
Hedger Wang 1f0566f55f clean up navigator when it's unmounted.
Summary: public

We've noticed that some of the navigator functions are called after the navigator
being unmounted. This diff adds the checks to protect the navigator from throwing
error when it's calling function after be unmounted.

Reviewed By: fkgozali

Differential Revision: D2629484

fb-gh-sync-id: 1cbee02b1a8d2a5d285e7d76f382d2599ed8caed
2015-11-06 23:41:26 -08:00
Hedger Wang 4763f89efa update NavigationContext API.
Summary: 1. Add a new api `top` which returns the root navigator of a nested navigator.
2. Remove the param `context` from the method `addListener` because it's not used and not necessary.

public

Reviewed By: fkgozali

Differential Revision: D2613852

fb-gh-sync-id: 0d5544422ff0be7875824989a4fbefbef9aac986
2015-11-03 19:08:31 -08:00
Hedger Wang a33fe94dac build nested navigation context based on the hierarchy of navigators.
Reviewed By: zjj010104

Differential Revision: D2598388

fb-gh-sync-id: 9655bcc86021678984e2a29df20ad2496a1762d1
2015-10-30 11:09:28 -07:00
Hedger Wang 064de3b338 Replace Navigator with AdsManagerNavigator - step 1
Reviewed By: fkgozali

Differential Revision: D2585102

fb-gh-sync-id: 6f0d51d755e0926f7c6f4d411a026cebf49333a2
2015-10-28 18:27:26 -07:00
Hedger Wang ae58fe221b Stop handling animation once Navigator is unmounted.
Summary: public
Navigator subscribes to its internal animation spring that may still
asks navigator to re-render after being unmounted.

This diff clears the listeners of its animation spring once navigator
is unmounted.

Reviewed By: zjj010104

Differential Revision: D2588434

fb-gh-sync-id: 2b3ee65d3a6c3d45e5c6904d1dc65ac5a3e4534a
2015-10-27 18:30:24 -07:00
Hedger Wang 06a154e061 Fix Js error in Navigator
Summary: public

In Navigator, there are several places that mutate `this.state.presentedIndex`
with the express `this.state.presentedIndex = destIndex` instead of calling
`this.setState`, which creates the problem that not all internal states are
updated within the same React update cycle.

One of the symptoms is that over-swiping within the Navigator may throw JS error
due to `this.state.sceneConfigStack` and `this.state.presentedIndex` are not both
updated.

The workaround is to bypass the over-swiping gesture to avoid JS error.

Reviewed By: ericvicenti

Differential Revision: D2557140

fb-gh-sync-id: 1e5c9047ed17c04a63e2a568118848b00723fb1d
2015-10-20 11:04:23 -07:00
Hedger Wang 73b80773ba supports event capturing and bubbling phases in Navigation context.
Summary: Adds the API that enables the navigation events capturing and bubbling which is the feature
that is enabled if the nested navigation contexts is created by the navigator.

This would allow developer to observe or reconcile navigation events within the navigation tree.

public

./Libraries/FBReactKit/jest

Reviewed By: zjj010104

Differential Revision: D2546451

fb-gh-sync-id: dfc9d16defaa563b9e80fd751a20570f6e524b74
2015-10-19 10:06:22 -07:00
Hedger Wang a2524bac33 Support nested navigation context.
Reviewed By: fkgozali

Differential Revision: D2525434

fb-gh-sync-id: 18e7d672b2cbadc318a207c8812f38d8669bad30
2015-10-17 04:25:26 -07:00
James Ide 2c7de35dee Export per-platform NavigatorNavigationBarStyles for consistent styling
Summary: This allows for the iOS-style navigation bar on Android and vice versa in order to simplify design. It is entirely optional in that NavigationBars will continue to defauly to their platform-specific style, but you can override it with the `navigationStyles` prop:

```js
<Navigator.NavigationBar
  navigationStyles={Navigator.NavigationBar.StylesIOS}
/>
```

Fixes #2995.
Closes https://github.com/facebook/react-native/pull/3028

Reviewed By: @​svcscm

Differential Revision: D2527902

Pulled By: @ericvicenti

fb-gh-sync-id: c7b1bfac200b5e03fc0d9dfb8acc8b916c825595
2015-10-10 15:32:46 -07:00
Hedger Wang 200d9af315 Add method `stopPropagation` and `stop` to NavigationEvent
Summary: @​public

Add method `stopPropagation` and `stop` to NavigationEvent so we can stop event easily once event bubbling and capturing is supported.

Reviewed By: @fkgozali

Differential Revision: D2471903
2015-09-24 08:19:52 -07:00
Elia Grady 88b101bb3e Fixed typo
Summary: _setRenderSceneToHarwareTextureAndroid was changed to _setRenderSceneToHardwareTextureAndroid.
Closes https://github.com/facebook/react-native/pull/2869

Reviewed By: @​svcscm

Differential Revision: D2472438

Pulled By: @vjeux
2015-09-23 19:29:14 -07:00
Hedger Wang b2049e3ccb Hierarchical event bubbling - 1
Reviewed By: @fkgozali

Differential Revision: D2469495
2015-09-23 19:28:56 -07:00
Jan Kassens 9486642322 Prop routeMapper of Navigator.NavigationBar is required
Summary: The component will crash if the prop is not provided. This helps with a better
error message in the console output.
Closes https://github.com/facebook/react-native/pull/2894

Reviewed By: @​svcscm

Differential Revision: D2461752

Pulled By: @ericvicenti
2015-09-22 14:44:28 -07:00
Tamara Woodson 4447bff976 Fix minor grammatical error in documentation
Summary: No code changes; comments/documentation only.
Closes https://github.com/facebook/react-native/pull/2083

Reviewed By: @​svcscm

Differential Revision: D2468024

Pulled By: @vjeux
2015-09-22 14:25:25 -07:00