Commit Graph

184 Commits

Author SHA1 Message Date
Paul Mestemaker 8378f0f9f7 Ensure documentation has consistent relative links
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

I had tried fixing a broken link in a previous commit (#11453). My commit was merged, but it did not resolve the underlying problem. I have looked into how links should be formed for the docs and have fixed the original problem as well as updated all other links to be consistent.

Previous link formats:

- /docs/sample.html <-- broken link
- sample.html <-- broken link
- https://facebook.github.io/react-native/docs/sample.html <-- works
- /react-native/docs/sample.html <-- works
- docs/sample.html <-- works (permalink format)

This PR updates all links to the permalink format.

**Test plan (required)**
I ran the website locally and manually tested half of the links in each category. They all worked.
```
$ cd website
$ npm install && npm start
```
Closes https://github.com/facebook/react-native/pull/12064

Differential Revision: D4489153

Pulled By: mkonicek

fbshipit-source-id: bf0231d941ba147317595c3b3466dc579a887169
2017-01-31 12:13:31 -08:00
Hedger Wang a83af44a59 Fix Navigator scene that is falsely collapsed.
Reviewed By: ericvicenti

Differential Revision: D4472405

fbshipit-source-id: 90022598f0fd8edfddc4460fee2338a7b67538c2
2017-01-26 17:43:28 -08:00
Kevin Lee 09801aac30 fix direction of VerticalSwipeJump gestures
Summary:
When something comes in from the right, we swipe from left to
right to move back. That means, when something comes in from the bottom,
we should swipe from top to bottom to get rid of it. This diff makes that
behavior occur - right now it's somewhat nonsensical as both jumpBack
and jumpForward are mapped to the same gesture.

thanks to #11192 for making gestures work on VerticalUpSwipeJumps

Reviewed By: ericvicenti, shergin

Differential Revision: D4412129

fbshipit-source-id: 6a3b202b0a90ca459b4ef106ba5bf48d0b1aec9e
2017-01-12 17:43:42 -08:00
alekhurst 55ce19d84e Change gesture direction strings in NavigatorSceneConfigs
Summary:
I see there is a string matching inconsistency in  `Libraries/CustomComponents/Navigator/Navigator.js` and `Libraries/CustomComponents/Navigator/NavigatorSceneConfigs.js`, which caused a bug resulting in gestures not working for vertical SceneConfigs. This PR fixes the inconsistency, and the bug.

**Motivation for making this change**
When working with the navigator, I was using the `VerticalUpSwipeJump` Navigator SceneConfig. The gesture to pop to the previous scene (in this case `jumpBack`) was not working.

**How I tested?**
I changed these strings (as shown in this PR) and swiped down. After these changes, everything worked as expected.

**Example**
In `Libraries/CustomComponents/Navigator/Navigator.js`, we check for gesture direction strings `bottom-to-top` and `top-to-bottom` in multiple places, but nowhere do we ever check for `up-to-down` and `down-to-up`.

```
var isTravelVertical = gesture.direction === 'top-to-bottom' || gesture.direction === 'bottom-to-top';
var isTravelInverted =
Closes https://github.com/facebook/react-native/pull/11192

Differential Revision: D4392103

Pulled By: ericvicenti

fbshipit-source-id: fd80578031f94b1b409815481c82e481c7ff2f13
2017-01-09 01:43:33 -08:00
Pieter De Baets c92ad5f6ae Apple TV support 4: support for input (tvOS focus engine)
Reviewed By: shergin

Differential Revision: D4333546

fbshipit-source-id: 8655070e81dbb62a80ab1f00a43ef6c2d9654618
2016-12-19 06:28:40 -08:00
Seph Soliman fde4fb1485 Typo
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?

Just fixed a typo.

Feel free to make the change directly in the repo without my credit if the process is easier than accepting this PR.
Closes https://github.com/facebook/react-native/pull/11164

Differential Revision: D4236963

Pulled By: mkonicek

fbshipit-source-id: 72c059596216602f9ab30dea6eb5f9cdbf89d31b
2016-11-28 03:43:32 -08:00
Adam Comella 54e947152f Navigator: null check on gesture.overswipe to prevent crash
Summary:
Sometimes, `gesture.overswipe` can be `null`/`undefined` in `_moveAttachedGesture` resulting in a crash. This change adds a null check to avoid the crash. `_matchGestureAction` has a similar check so it looks like this case was overlooked in `_moveAttachedGesture`.

**Test plan (required)**

My team's app is using this change.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/11017

Differential Revision: D4207277

Pulled By: ericvicenti

fbshipit-source-id: a22817c2ebec1c996583269a59d6767f5713771b
2016-11-20 15:28:31 -08:00
Naisheel Verdhan 1888a0af16 Add a new Navigator SceneConfig swipeFromLeft
Summary:
Add a new `SwipeFromLeft` Navigator SceneConfig.

The animation is the opposite of `HorizontalSwipeJump`, however there's no `Jump` while animating as `HorizontalSwipeJump`.  Should `HorizontalSwipeJump` be renamed to `SwipeFromRight`?

![swipe-left-anim-2](https://cloud.githubusercontent.com/assets/8182981/18466947/8ca4dd24-79bb-11e6-8cae-8ffa34c0c7da.gif)
Closes https://github.com/facebook/react-native/pull/9877

Differential Revision: D4160059

Pulled By: hramos

fbshipit-source-id: 7426ec72adea80af2d5612aae1dd9d2e6dc090f3
2016-11-10 08:13:57 -08:00
d.chernyatiev f64538943e Navigator - Fix wrong scene transformation after pop
Summary:
Fixes #9485
Closes https://github.com/facebook/react-native/pull/9516

Differential Revision: D4080618

Pulled By: lacker

fbshipit-source-id: 296c209a0438c4a06b3b3556d7084c5435d60c72
2016-10-26 00:13:35 -07:00
YUYA FUJIMOTO 2230117f36 Add HorizontalSwipeJumpFromLeft animation to Navigator
Summary:
This brings RN Navigator to add HorizontalSwipeJumpFromLeft animation.
HorizontalSwipeJumpFromRight has been implemented but FromLeft version of SwipeJumpAnimation hasn't been there.
Closes https://github.com/facebook/react-native/pull/10406

Differential Revision: D4035212

fbshipit-source-id: edcbae18148e533b02a7d056de03154fb86280d0
2016-10-18 08:43:41 -07:00
Tim Yung a3868722f8 Cleanup: Remove `@typechecks`
Reviewed By: spicyj

Differential Revision: D4010629

fbshipit-source-id: b243b2ca09cdfcaeec49b5f6850139d0461b80c5
2016-10-12 19:28:42 -07:00
Jeff Thomas de70a622aa Docs improvement
Summary:
In the `Additional Scenes` section, the `TouchableHighlight` component is used, but is not present in the import statement.

This is confusing and results in a `Can't find variable: TouchableHighlight` error.

This PR attempts to correct this confusion.
Closes https://github.com/facebook/react-native/pull/10276

Differential Revision: D3997058

Pulled By: hramos

fbshipit-source-id: 22ebf39cd39d8a76427c89cecc774ff9aef2c3c8
2016-10-10 18:29:03 -07:00
leeight 176f96d7b6 Remove duplicated call from NavigatorSceneConfigs
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

For more info, see
Closes https://github.com/facebook/react-native/pull/10299

Differential Revision: D3997827

Pulled By: ericvicenti

fbshipit-source-id: a98e112d95015842936a9d2bdc89553772ba49c2
2016-10-10 17:44:28 -07:00
Domenico Matteo b6719b247d Fix small typo in the help text
Summary:
Not much to add. My OCD spotted this 😄
Closes https://github.com/facebook/react-native/pull/10275

Differential Revision: D3984542

Pulled By: hramos

fbshipit-source-id: 2de8c8f7f5c2c518e0ec5277087095e0553c72d6
2016-10-06 20:28:37 -07:00
Lord Daniel Zautner 95b1fc42b7 Emit `willfocus` from immediatelyResetRouteStack
Summary:
The Navigator component inconsistently emits the `willfocus` event.

While it is emitted in `Navigator#resetTo`, `Navigator#push`, `Navigator#pop` and event `Navigator#replaceAtIndex` it is not emitted from `Navigator#immediatelyResetRouteStack`. This leads to surprising inconsistencies when working with these events.

With the PR I suggest to emit the `willfocus` event before resetting the route stack.
Closes https://github.com/facebook/react-native/pull/10125

Differential Revision: D3931284

fbshipit-source-id: 6e4f45c6d38426bcd0acc8f8c39478524032a03a
2016-09-27 11:43:32 -07:00
Lord Daniel Zautner 9584480261 Remove unnecessary double test in Navigator
Summary:
_renderScene would unnecessary test if `this.state.transitionFromIndex != null` twice.

The left side and right side of the 'or' statement would always be the same.

For cleaner code I suggest to remove it.
Closes https://github.com/facebook/react-native/pull/10042

Differential Revision: D3923058

fbshipit-source-id: 7466c1f0f24eac3f9f296debd9a5e9f5320aea28
2016-09-26 01:43:41 -07:00
Fred Liu 0c7ccfe172 Prevent 1st breadcrumb from stealing touches from title
Summary:
In certain cases, if a navigation title is present in place of an empty nav stack, the first breadcrumb may steal part of the title's touch events since it's hardcoded to sit 1/4 from the left of the screen (for animation reasons). This diff fixes it, allowing titles on an empty nav stack to be entirely touchable while retaining all other breadcrumb functionality.

Also, applied some suggested lint changes.

Reviewed By: hedgerwang

Differential Revision: D3891909

fbshipit-source-id: 97d1fb3bba4e4118401d84cec2d8836b94bfde75
2016-09-20 14:13:30 -07:00
yunfeng 8ebe66d0e3 Added the PushFromLeft animation to Navigator
Summary:
Added the  PushFromLeft animation to Navigator
Closes https://github.com/facebook/react-native/pull/8911

Differential Revision: D3841403

Pulled By: mkonicek

fbshipit-source-id: d8e388e507270a24be0b85cb5974d34f9aa1c6fa
2016-09-09 06:28:34 -07:00
Andrew Grewell 7b18b2c409 check if this._navBar has immediatelyRefresh method
Summary:
`Navigator` throws an error if using a custom `NavigationBar` component that does not have a `immediatelyRefresh` method present.
Closes https://github.com/facebook/react-native/pull/9438

Differential Revision: D3838928

Pulled By: mkonicek

fbshipit-source-id: 74d62ef09e179f457a4b14f8537dfaf0d4697322
2016-09-08 17:28:57 -07:00
David Aurelio 94666f16c7 Auto-fix lint errors
Reviewed By: bestander

Differential Revision: D3683952

fbshipit-source-id: 9484d0b0e86859e8edaca0da1aa13a667f200905
2016-08-09 06:43:46 -07:00
yueshuaijie bbe95c2acf Add method popN() to Navigator.
Summary:
Compareing API of
`Navigator`(http://facebook.github.io/react-native/releases/next/docs/navigator.html)
and
`NavigatorIOS`(http://facebook.github.io/react-native/releases/next/docs/navigatorios.html),

we found `Navigator` object lacks of the method `popN()` which is sometimes useful. This PR add it.
Closes https://github.com/facebook/react-native/pull/8806

Differential Revision: D3648001

Pulled By: ericvicenti

fbshipit-source-id: 661efba39e68049fd4a094304ec080092a14296d
2016-07-31 13:43:36 -07:00
Ben Alpert a2fb703bbb Convert from React.createClass to ES6 classes
Reviewed By: cpojer

Differential Revision: D3619143

fbshipit-source-id: e14e81468d467437ee3d79c34c34b7780a46ca1c
2016-07-26 01:13:31 -07:00
David Aurelio 94efa8f58f Adapt unit tests
Reviewed By: mirciulix, bestander

Differential Revision: D3561508

fbshipit-source-id: afede6b03112d99f73ed7cf6bbce03d1aeea0492
2016-07-14 06:28:21 -07:00
David Aurelio 9bfa393a79 fix new flow errors after D3561327
Reviewed By: bestander

Differential Revision: D3561376

fbshipit-source-id: 226f0d1c6a771a987f9e04f114dc3ba1cca531b1
2016-07-14 04:58:43 -07:00
Hedger Wang 5189c94a6e Fix Navigator transition.
Summary: Fix the bug reported as https://github.com/facebook/react-native/pull/8071

Reviewed By: fkgozali

Differential Revision: D3553062

fbshipit-source-id: 286feddc268f51c0d9005a8831640c5e6af4880e
2016-07-12 17:43:26 -07:00
Mengjue Wang 471ee87445 Wrap native module I18nManager with a new RCTI18nManager.js and fix current use of native module I18nManager
Summary: create new RCTI18nManager.js to warp-up native module I18nManager and fix current use of it.

Reviewed By: ericvicenti

Differential Revision: D3547427

fbshipit-source-id: 53a695c94ca6bba2f566d0725c553e58d60bf451
2016-07-11 20:58:32 -07:00
Mengjue Wang cadc753e4c Change NavigatorSceneConfig for RTL
Summary:
For RTL experiment, we need to swap all the Left and Right gesture and animation.
 Provide RTL support for Navigator in RN.

Reviewed By: hedgerwang

Differential Revision: D3519811

fbshipit-source-id: b53d9bf901ec056614658b627823d2225bdc82b1
2016-07-08 10:58:55 -07:00
Héctor Ramos 3085b35e63 Initial stab at NavigationExperimental tutorial
Summary:
Add a NavigationExperimental section to the Navigation guide.

![navexp](https://cloud.githubusercontent.com/assets/165856/16355280/120e7d38-3a67-11e6-9567-51c19c249fdf.png)
Closes https://github.com/facebook/react-native/pull/8431

Differential Revision: D3493158

Pulled By: JoelMarcey

fbshipit-source-id: 5e9646c3abf97f5cce6f5ba5b3d10853aa84ee8e
2016-06-29 05:28:24 -07:00
Christine Abernathy 4ec53ee8fa Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.

**Test plan (required)**

Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html

![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)

**Note**

The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318

Differential Revision: D3471185

Pulled By: JoelMarcey

fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
2016-06-22 15:28:27 -07:00
Fred Liu b3886652ab Fix navigation jump on multi-tap
Summary:
On iOS, if a non-selected breadcrumb is tapped multiple times, the navigator will transition to the tapped breadcrumb, then back to the previously selected breadcrumb. Then, when another breadcrumb is tapped, it would go to the previously multi-tapped breadcrumb.

This seems to be because transitions are queued when they shouldn't be. I've reverted to the way it was before PR 8701, but added a `transitionQueue.length === 0`. This should solve the race condition from 8701, ensuring all transitions in the queue are flushed in sequence, and thus landing on the finally tapped one.

Reviewed By: hedgerwang

Differential Revision: D3469901

fbshipit-source-id: 0143a27d6c875d47d28b77eed4e5a28b1c40c8bb
2016-06-22 11:13:26 -07:00
Fred Liu 6982f5aa24 Fix Navigator jumpTo same route issue
Summary: https://github.com/facebook/react-native/pull/8071 introduced a bug where jumping to the same navigator route would show a blank screen since the `index` check is not catching cases where the `transitionQueue` is empty.

Reviewed By: ericvicenti

Differential Revision: D3464697

fbshipit-source-id: 494527d1fb0ac5aea394abd3231dd19c56596549
2016-06-21 13:43:25 -07:00
carlos 12754839a1 if quick call jumpTo the transitionQueue will be quit before handle a…
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/8071

Differential Revision: D3453372

Pulled By: ericvicenti

fbshipit-source-id: 3494faee1a83574c3937a6545b246713ec38e0d0
2016-06-17 16:43:23 -07:00
dragonwong 8731494990 change leftButton init position
Summary:
In navigationBar, when back to the previous view, the left button of the previous view should fade in like iOS native navBar, instead of move in. It's interesting that the right button acts correct.

React Native:

![clear](https://cloud.githubusercontent.com/assets/2622602/15535443/fa5e77bc-229f-11e6-8632-0dd9f5f2fb26.gif)

iOS Native:

![clear2](https://cloud.githubusercontent.com/assets/2622602/15535452/05999918-22a0-11e6-877c-63590b7bb9ef.gif)
Closes https://github.com/facebook/react-native/pull/7745

Differential Revision: D3392307

Pulled By: nicklockwood

fbshipit-source-id: e5384140049bf7b6f78fc093209ee48814a2ffdc
2016-06-06 07:28:24 -07:00
Kasim Tan f49f28ce15 Fix typo (shoud -> should)
Summary: Closes https://github.com/facebook/react-native/pull/7928

Differential Revision: D3390537

fbshipit-source-id: 97ce2331d0942ffe21078b3aec27daed20cd8af5
2016-06-04 16:43:41 -07:00
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