Commit Graph

5768 Commits

Author SHA1 Message Date
Hedger Wang 62e80a600e Refactor <NavigationHeader /> API.
Summary:- All the public sub component renderers should implement the interface
  NavigationSceneRenderer, which will help to reuse renderer or
  replace renders for different composition.

- Perf improvement. <NavigationHeader /> is rendering way more
  sub component than necessary, we shall fix that.

- No UI or behavior change.

Reviewed By: ericvicenti

Differential Revision: D3091442

fb-gh-sync-id: fba5f7ce74597fa6036b5b216c02b06052801983
shipit-source-id: fba5f7ce74597fa6036b5b216c02b06052801983
2016-03-24 15:49:28 -07:00
Sebastian Markbage 433fb336af Refactor Attribute Processing (Step 4)
Summary:This avoids flattening styles in most common cases. It diffs against the nested
arrays. The special case is when a property gets removed, it creates an object
that stores the removed keys which then gets resolved using a second pass
through the nested array.

You can conceptually think of this algorithm as:
1) Diff and store changes as you go
2) If something was removed, flatten as necessary

I also merged in another commit that renames the StyleSheetRegistry to ReactNativePropRegistry. There is nothing in here that makes it specific to styles anymore. That's just a decoupled view attribute configuration option. This registry can be used for any set of nested props, if we even want to keep this feature at all.

Reviewed By: vjeux

Differential Revision: D2492885

fb-gh-sync-id: c976ac28b7e63545132c36da0ee0c1c562e7c9e5
shipit-source-id: c976ac28b7e63545132c36da0ee0c1c562e7c9e5
2016-03-24 15:13:24 -07:00
Dom Christie 07697d15cc Improve consistency of NavigationCardStack animations.
Summary:Currently there?s an inconsistency between the animations used in `NavigationAnimatedView` (`spring`) and those in `NavigationCardStack` (`timing`), which is noticeable when switching between the two implementations.

By removing the `_applyAnimation` method, the `NavigationAnimatedView` will simply use its [default `applyAnimation`](6c22a2174e/Libraries/NavigationExperimental/NavigationAnimatedView.js (L56-L67)), making the animation styles the same.

**Before** (with `Animated.timing`)
Video: http://quick.as/Yexku8DdJ

**After** (with the default `NavigationAnimatedView` animations)
Video: http://quick.as/qrqbsnj8n
Closes https://github.com/facebook/react-native/pull/6636

Differential Revision: D3094638

Pulled By: ericvicenti

fb-gh-sync-id: 6e1c7c54b4ef102c4003719381d334d2c6f7a531
shipit-source-id: 6e1c7c54b4ef102c4003719381d334d2c6f7a531
2016-03-24 14:50:25 -07:00
Christopher Chedeau b80698df1c Introduce blog
Summary:Ported the infrastructure from jest.

![screen shot 2016-03-24 at 9 47 50 am](https://cloud.githubusercontent.com/assets/197597/14024237/85db1132-f1a5-11e5-84be-f525e302c6ca.png)
Closes https://github.com/facebook/react-native/pull/6629

Differential Revision: D3094423

Pulled By: vjeux

fb-gh-sync-id: a01aec6a55d28484c45bb241d037ca6717bc5e81
shipit-source-id: a01aec6a55d28484c45bb241d037ca6717bc5e81
2016-03-24 14:11:30 -07:00
Konstantin Raev 05b8944382 added script to release blog independent of website versioning
Summary:I suppose over time we should simplify the script.
But for now this will do.

Logic:
1. don't copy "blog" folder to /releases/XX when doing a docs release
2. don't copy "blog" folder to / when doing stable docs release
3. copy "blog" folder to / only when doing building docs for master branch

CC vjeux
Closes https://github.com/facebook/react-native/pull/6634

Differential Revision: D3094267

Pulled By: vjeux

fb-gh-sync-id: 1f972703ed371c114e34d9f524092ea1d2fd985b
shipit-source-id: 1f972703ed371c114e34d9f524092ea1d2fd985b
2016-03-24 13:28:24 -07:00
Satyajit Sahoo 6c22a2174e Fix fetching sourcemap in genymotion. Fixes #5338
Summary:Source maps are broken on Genymotion right now as they aren't being loaded from the correct URL. refer - https://github.com/facebook/react-native/issues/5338#issuecomment-188232402

**Test plan**

Build and install UIExplorer from master branch in genymotion and enable hot reload. When you change a file and save it, you'll see a Yellow box due to source map fetching failed, as per the referenced comment.

Doing the same for this branch doesn't produce any yellow boxes.
Closes https://github.com/facebook/react-native/pull/6594

Differential Revision: D3088218

Pulled By: martinbigio

fb-gh-sync-id: 0d1c19cc263de5c6c62061c399eef33fa4ac4a7b
shipit-source-id: 0d1c19cc263de5c6c62061c399eef33fa4ac4a7b
2016-03-24 12:06:45 -07:00
Alex Kotliarskyi c4699d8b73 Open source FBPortForwarding
Summary:FBPortForwarding is incomplete and flaky implementation of `adb reverse`
functionality for iOS. We haven't worked on it internally for a while now,
but I think it might be a very usefull tool for the community. Some external
contributors (hello philikon!) expressed interest in maintaining it.

This diff moves it over to OSS RN `Libraries` folder.

Reviewed By: vjeux

Differential Revision: D3056293

fb-gh-sync-id: 9ced61fa8480a923771bba26fe09337c344ab3b3
shipit-source-id: 9ced61fa8480a923771bba26fe09337c344ab3b3
2016-03-24 10:51:34 -07:00
Konstantin Raev aec90bb46b Version release script
Summary:npm-publish.js is not cohesive enough: besides building and publishing it also modifies some files.

It is better to have a separate script that will bump versions, make a commit and tag it.

scripts/bump-oss-version.js does exactly that.

This simplifies release process and allows manual release to npm if CI is not available.
Closes https://github.com/facebook/react-native/pull/6625

Differential Revision: D3092849

fb-gh-sync-id: 92cf38bd3df31c8c9c433fc5f9e15c129855fe0e
shipit-source-id: 92cf38bd3df31c8c9c433fc5f9e15c129855fe0e
2016-03-24 08:41:24 -07:00
Jason Als 0f62dcecf5 Add Bitt Wallet to showcase
Summary: Closes https://github.com/facebook/react-native/pull/6623

Differential Revision: D3092891

fb-gh-sync-id: 9745bf191096c874cabb51c87579c57cb066c205
shipit-source-id: 9745bf191096c874cabb51c87579c57cb066c205
2016-03-24 08:32:19 -07:00
Dmitry Gladkov 393890e00f Don't strip NativeRunnable constructor. Fixes #6624
Summary:Fixes proguard in RN 0.22.+. Closes #6624
Closes https://github.com/facebook/react-native/pull/6626

Differential Revision: D3092892

fb-gh-sync-id: 3aaf97c6f1c7b5d575cb912196b43955d9ef10fb
shipit-source-id: 3aaf97c6f1c7b5d575cb912196b43955d9ef10fb
2016-03-24 08:17:21 -07:00
Steven Chaitoff 1396de9989 file change listener for relay fragments in packager server
Reviewed By: martinbigio

Differential Revision: D3011797

fb-gh-sync-id: 9f7ddc7b3c0c0e2a78db829343d9fa93a46b4ad6
shipit-source-id: 9f7ddc7b3c0c0e2a78db829343d9fa93a46b4ad6
2016-03-24 08:08:34 -07:00
sunnylqm 32aafaa2c4 Update EmbeddedAppAndroid.md
Summary: Closes https://github.com/facebook/react-native/pull/6621

Differential Revision: D3092794

fb-gh-sync-id: f5e75377f00d8215e0e026dfe1f682c832f1e7e6
shipit-source-id: f5e75377f00d8215e0e026dfe1f682c832f1e7e6
2016-03-24 07:11:30 -07:00
Konstantin Raev 945306e397 Add testing HMR into manual testing steps
Reviewed By: dmmiller

Differential Revision: D3087133

fb-gh-sync-id: cb3b073dd77d40fb051a9bc17b6c24b49a325371
shipit-source-id: cb3b073dd77d40fb051a9bc17b6c24b49a325371
2016-03-24 06:37:21 -07:00
Krzysztof Magiera 65ccdffc8d Execute Animated.js declarative animation on UIThread on Android.
Summary:This is the first from the series of PRs I'm going to be sending shorty that would let Animated.js animations to run off the JS thread (for Android only).

This PR introduce a new native module that will be used for offloading animations - NativeAnimatedModule. It has a simple API that allows for animated nodes management via methods like: create/drop animated node, connect/disconnect nodes, start animation of a value node, attach/detach animated from a native view.

Similarly to how we handle UIManager view hierarchy updates we create a queue of animated graph operations that are then executed on the UI thread. This isolates us from problems that may be caused by concurrent updates of animated graph while UI thread is "executing" the animation.

The most important class NativeAnimatedNodesManager.java implements a management interface for animated nodes graph as well as implements a graph traversal algorithm that is run for each animation frame. For each animation frame we visit animated nodes th
Closes https://github.com/facebook/react-native/pull/6466

Differential Revision: D3092739

Pulled By: astreet

fb-gh-sync-id: 665b49900b7367c91a93b9d8864f78fb90bb36ba
shipit-source-id: 665b49900b7367c91a93b9d8864f78fb90bb36ba
2016-03-24 06:19:27 -07:00
Dave Miller bd8007300f Remove sendMomentumEvents property from public ScrollView properties
Summary: This property is only used by the native code as an optimization to not send events that no one is listening to.  We don't need to expose it externally on the js api.  Set sendMomentumEvent to be a native only property.

Reviewed By: bestander

Differential Revision: D3092650

fb-gh-sync-id: 95f5f0ae4cd04a7d1cbc9cf17c93647d3c644878
shipit-source-id: 95f5f0ae4cd04a7d1cbc9cf17c93647d3c644878
2016-03-24 05:43:25 -07:00
Konstantin Raev 993835c815 Allow react-native init <version> + removed sinopia from being required for e2e testing
Reviewed By: mkonicek, frantic

Differential Revision: D3087524

fb-gh-sync-id: 048e23b55916a6be17fa9fabb6e41b0b2f3f7a16
shipit-source-id: 048e23b55916a6be17fa9fabb6e41b0b2f3f7a16
2016-03-24 05:31:23 -07:00
Dave Miller ad41a0b326 Clean up dead code in ScrollView
Summary: I see dead code

Reviewed By: bestander

Differential Revision: D3092668

fb-gh-sync-id: d80a0267aafd856b63e1d2ff1ae8b8e9f6deb8ce
shipit-source-id: d80a0267aafd856b63e1d2ff1ae8b8e9f6deb8ce
2016-03-24 05:29:20 -07:00
Tim Yung a72f45bb61 RN: Upgrade to node-haste@2.9.4
Reviewed By: davidaurelio

Differential Revision: D3091056

fb-gh-sync-id: ad6f53306a95290424258f092b596a601fa7be7b
shipit-source-id: ad6f53306a95290424258f092b596a601fa7be7b
2016-03-23 18:52:26 -07:00
Adam Ernst e28bfdd61a Remove apparently unused _runBlock: method
Reviewed By: nicklockwood

Differential Revision: D3088409

fb-gh-sync-id: 279ce18f2a336819dbdc54087b1b7e203fbecac2
shipit-source-id: 279ce18f2a336819dbdc54087b1b7e203fbecac2
2016-03-23 18:30:23 -07:00
Adam Ernst a16771c5dc Remove unused RCTBridgeModuleClassIsRegistered
Reviewed By: nicklockwood

Differential Revision: D3088367

fb-gh-sync-id: e91a8905bb361bcb430d3efc0dd56ab53321572e
shipit-source-id: e91a8905bb361bcb430d3efc0dd56ab53321572e
2016-03-23 17:23:20 -07:00
Mart?n Bigio 3888d052f1 Fix OSS tests
Reviewed By: bestander

Differential Revision: D3088301

fb-gh-sync-id: 310d9c7c1956f21f3c8e5da6a1455c2a9fad2d04
shipit-source-id: 310d9c7c1956f21f3c8e5da6a1455c2a9fad2d04
2016-03-23 15:17:21 -07:00
Hedger Wang 4f8668b110 Support animation and gesture for Pager.
Summary: We need to support animation and gesture for Pager.

Reviewed By: ericvicenti

Differential Revision: D3066596

fb-gh-sync-id: 1c1a3d34b4298b4b0dd158f817057ae22dea72f4
shipit-source-id: 1c1a3d34b4298b4b0dd158f817057ae22dea72f4
2016-03-23 12:51:00 -07:00
Saurabh Aggarwal 3c488afb0f Remove stetho dependency in OSS react native's NetworkingModule
Reviewed By: astreet

Differential Revision: D3038280

fb-gh-sync-id: 169e21b9276f928b7144ebf2f3b8487b5e87c073
shipit-source-id: 169e21b9276f928b7144ebf2f3b8487b5e87c073
2016-03-23 12:41:24 -07:00
Shayne Sweeney 8cd3a38fd4 Use different tmpdir
Reviewed By: wez

Differential Revision: D3086091

fb-gh-sync-id: b26a792b80b523205ceafaa0e9d2299527bc8176
shipit-source-id: b26a792b80b523205ceafaa0e9d2299527bc8176
2016-03-23 12:36:21 -07:00
Dave Miller e8e31823b9 Fix the clip rect computation for removeClippedSubviews
Summary: The computation for calculateClippingRect didn't work if you had a horizontal scroll nested in a vertical scroll view.  The fix is to simplify the logic to first intersect the inner view within its parent and then apply transforms (translation by top/left and scroll offset).  That now provides the correct clipping rectangle for nested views.

Reviewed By: astreet

Differential Revision: D3087367

fb-gh-sync-id: efdd430e024c4599189ddb8dbb258fd2b118690f
shipit-source-id: efdd430e024c4599189ddb8dbb258fd2b118690f
2016-03-23 12:28:27 -07:00
Sokovikov 67efe4c1a9 custom back button handler
Summary:sometimes it is nessesary to handle back button
specifically for component, by changing its state.
 For ex. exit from edit mode.
Closes https://github.com/facebook/react-native/pull/5062

Differential Revision: D3084590

Pulled By: ericvicenti

fb-gh-sync-id: 13a4ea1d64ce725daa5d3af0d629a0c132a3f3d5
shipit-source-id: 13a4ea1d64ce725daa5d3af0d629a0c132a3f3d5
2016-03-23 12:22:20 -07:00
Gant Laborde 973ea8ed95 update GettingStarted.md for new iOS run
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).

the iOS run is now aligned with Android and can be run preferably from the command line.
Closes https://github.com/facebook/react-native/pull/6590

Differential Revision: D3087759

Pulled By: vjeux

fb-gh-sync-id: 9a75f960dce2f3aaa182c4e98537397e5b71dde2
shipit-source-id: 9a75f960dce2f3aaa182c4e98537397e5b71dde2
2016-03-23 10:35:40 -07:00
Tadeu Zagallo e291cda380 remove extra thumb directive from trampoline
Differential Revision: D3087319

fb-gh-sync-id: 667582a468f2b3686b897a1f0aa9b3b966519c86
shipit-source-id: 667582a468f2b3686b897a1f0aa9b3b966519c86
2016-03-23 10:09:28 -07:00
Andre Giron fd2cf119b1 Fix issue #6300: Improve error message for unregistered callbacks.
Summary:Fix for issue #6300:
Motivation: When more than one callback is registered to a native module, the error message that a user receives is not indicative of what is really happening.
Closes https://github.com/facebook/react-native/pull/6436

Differential Revision: D3087551

Pulled By: tadeuzagallo

fb-gh-sync-id: 93c703348dc53b75c5b507edc71754680ab5c438
shipit-source-id: 93c703348dc53b75c5b507edc71754680ab5c438
2016-03-23 10:08:29 -07:00
Martin Konicek 85197a0326 Add Modal to the main Java package
Reviewed By: dmmiller

Differential Revision: D3087508

fb-gh-sync-id: 066b8c4102f9669ed58e6cda1b0013e74a3627f8
shipit-source-id: 066b8c4102f9669ed58e6cda1b0013e74a3627f8
2016-03-23 09:38:26 -07:00
Martín Bigio 24508d0d58 register `nativeRequire` on JS thread
Reviewed By: tadeuzagallo

Differential Revision: D3087194

fb-gh-sync-id: 9c7bb37260dd202d1ee54606007be02de6c0fb55
shipit-source-id: 9c7bb37260dd202d1ee54606007be02de6c0fb55
2016-03-23 09:28:31 -07:00
Martín Bigio 8edc35004c Move preloaded modules to startup code section
Summary:We found that moving the preloaded modules to the startup section of the RAM Bundle improves TTI quite a bit by saving lots of through the bridge calls and injecting multiple modules at once on JSC. However, doing this on a non hacky way required a lot of work. The main changes this diff does are:
  - Add to `BundleBase` additional bundling options. This options are fetched based on the entry file we're building by invoking a module that exports a function (`getBundleOptionsModulePath`).
  - Implement `BundleOptions` module to include the `numPreloadedModules` attribute as a bundle additional option. This value is computed by getting the dependencies the entry file has and looking for the first module that exports a module we don't want to preload. The `numPreloadedModules` attribute is then used to decide where to splice the array of modules.
- Additional kung fu to make sure sourcemaps work for both preloaded and non preloaded modules.

Reviewed By: davidaurelio

Differential Revision: D3046534

fb-gh-sync-id: 80b676222ca3bb8b9eecc912a7963be94d3dee1a
shipit-source-id: 80b676222ca3bb8b9eecc912a7963be94d3dee1a
2016-03-23 09:28:31 -07:00
Martin Konicek 7be18819ec Retry e2e test consistently
Summary:Travis tests have been flaky recently:
https://travis-ci.org/facebook/react-native/builds

Clicking through the last 10 failures, 8 of them are caused by the `npm install` flakiness in the `./e2e-test.sh --packager`. This test works in a very similar way to the iOS e2e test which we retry (see line 18). Let's be consistent.

All the random errors are 404s during `npm install` through Sinopia:

![screen shot 2016-03-23 at 10 33 39 am](https://cloud.githubusercontent.com/assets/346214/13982618/07f338f2-f0e3-11e5-97ad-e887cb46bede.png)

JS tests are more stable (saw 1 random failure but likely the test can be fixed), let's not retry them just yet:

![screen shot 2016-03-23 at 10 33 27 am](https://cloud.githubusercontent.com/assets/346214/13982648/26f46820-f0e3-11e5-8d56-c770549b9275.png)

**Test plan (required)**

Travis tests on this pull request.
Closes https://github.com/facebook/react-native/pull/6604

Differential Revision: D3087044

fb-gh-sync-id: a5c74e2578617656c67fd4d05d4f60ffe63a5e2a
shipit-source-id: a5c74e2578617656c67fd4d05d4f60ffe63a5e2a
2016-03-23 04:24:25 -07:00
Jakub Woyke 2ec88028f5 Add .thumb to RCTProfileTrampoline-arm.S
Reviewed By: jasonprado

Differential Revision: D3079658

fb-gh-sync-id: a20195f8be1c90a4feb6ec30a6a06edc5cc59ccd
shipit-source-id: a20195f8be1c90a4feb6ec30a6a06edc5cc59ccd
2016-03-22 18:34:27 -07:00
Jakub Woyke 236dadad96 Add .thumb to RCTProfileTrampoline-arm.S
Reviewed By: jasonprado

Differential Revision: D3079658

fb-gh-sync-id: a5b1d877bd26186942e39e9efd97e7df4c07c36f
shipit-source-id: a5b1d877bd26186942e39e9efd97e7df4c07c36f
2016-03-22 18:25:23 -07:00
David Aurelio 83fb122406 Add Random Access Module file names to stack traces
Summary: Adds support to generate stack traces that can be used with source maps that have a `x_facebook_offsets` field. If a file name of a stack frame contains only digits and ends with “.js”, it is included in the trace format generated by `ExceptionsManagerModule`

Reviewed By: martinbigio

Differential Revision: D3072953

fb-gh-sync-id: 69a57e3e2c758034939e5264008871f38f48a78f
shipit-source-id: 69a57e3e2c758034939e5264008871f38f48a78f
2016-03-22 15:22:23 -07:00
Satish Sampath 78ad15d85b Fix arc focus build
Reviewed By: majak

Differential Revision: D3081868

fb-gh-sync-id: c776cf5de04cecdf6b8e0b9a11ef590b12f2b875
shipit-source-id: c776cf5de04cecdf6b8e0b9a11ef590b12f2b875
2016-03-22 10:58:29 -07:00
Alexey Lang 030e34959e Don't schedule script execution on the main thread
Reviewed By: martinbigio

Differential Revision: D3069375

fb-gh-sync-id: baa9e4217957c82eb0bba05a8e93527476084a3b
shipit-source-id: baa9e4217957c82eb0bba05a8e93527476084a3b
2016-03-22 09:33:28 -07:00
Martín Bigio e53a6a2931 Bump preset version
Reviewed By: davidaurelio

Differential Revision: D3081487

fb-gh-sync-id: aa3f16f3ac16185fe8c3590ecd34e9d6738e7e0f
shipit-source-id: aa3f16f3ac16185fe8c3590ecd34e9d6738e7e0f
2016-03-22 07:46:23 -07:00
Chirag Shah 777983c05b Typo in NativeMethodsMixin.js
Summary:Fixed a typo in NativeMethodsMixin.js

Before:
![before](https://cloud.githubusercontent.com/assets/6805530/13948549/a429c224-f046-11e5-903f-a04bd9eaa1b3.png)

After:
![after](https://cloud.githubusercontent.com/assets/6805530/13948555/a9ba505a-f046-11e5-84fa-87f236aca486.png)
Closes https://github.com/facebook/react-native/pull/6583

Differential Revision: D3081509

Pulled By: javache

fb-gh-sync-id: 016febb449ac61870a161673120f706c6c7992ed
shipit-source-id: 016febb449ac61870a161673120f706c6c7992ed
2016-03-22 06:53:21 -07:00
Satyajit Sahoo 720c76f94d Rework the NavigationHeader
Summary:Add ability to specify custom left, right components, and title component. Style the `NavigationBar` according to the Platform.

Refer https://github.com/ericvicenti/navigation-rfc/pull/21

cc ericvicenti
Closes https://github.com/facebook/react-native/pull/5971

Differential Revision: D3080601

Pulled By: ericvicenti

fb-gh-sync-id: 7b921cd36b4c2ec1edf6f52629f1f9890d272dfd
shipit-source-id: 7b921cd36b4c2ec1edf6f52629f1f9890d272dfd
2016-03-21 22:07:26 -07:00
Shayne Sweeney 98aea639b2 Fix asset path-traversal outside of roots
Summary:`/assets/...` requests previously supported path-traversal potentially exposing and serving (private) files outside roots.

**Test plan**

Prior to patching perform the a path-traversal request to the server:
```
GET /assets/../../../../etc/hosts HTTP/1.1
Cache-Control: no-store
Host: 127.0.0.1:8081
Connection: close
Accept-Encoding: gzip
User-Agent: okhttp/2.5.0
```

Apply patch and verify a `404` response with body: `Asset not found`

Test normal asset requests work.
Closes https://github.com/facebook/react-native/pull/6398

Differential Revision: D3034857

Pulled By: shayne

fb-gh-sync-id: f0e6714e4e3c5a63a3a402634a1eb5f3186d3561
shipit-source-id: f0e6714e4e3c5a63a3a402634a1eb5f3186d3561
2016-03-21 21:58:22 -07:00
Spencer Ahrens 1f94a00785 Add JS Minify option to settings in Android
Summary: Useful for debugging minification issues and more representative perf testing.

Differential Revision: D3080489

fb-gh-sync-id: 315f696d3847a213eb95f247f409173a01864567
shipit-source-id: 315f696d3847a213eb95f247f409173a01864567
2016-03-21 21:12:23 -07:00
Fada Chen e3fe66acfc Backed out D3073724, revert changes in master only
Reviewed By: zjj010104

Differential Revision: D3076377

fb-gh-sync-id: da9ca730904c2d520c5c0619b68f3ebee2c74f02
shipit-source-id: da9ca730904c2d520c5c0619b68f3ebee2c74f02
2016-03-21 19:32:26 -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
Emily Janzer 7035ada867 Use 'background' app state when app is foregrounded from notif
Summary:Changing app state back to 'background' for UIApplicationWillEnterForegroundNotification.

On iOS we use the 'background' app state to determine whether a notification was tapped to foreground the app vs. received while app was already active. The PR https://github.com/facebook/react-native/pull/6379 changed RCTAppState so that it returned 'active' when app was being foregrounded from a notification; this changes it back to 'background' so that we can distinguish between the two cases again

Reviewed By: hedgerwang

Differential Revision: D3078746

fb-gh-sync-id: 8b5e9118a7e14f15871bfb68e9f85d20108b1faf
shipit-source-id: 8b5e9118a7e14f15871bfb68e9f85d20108b1faf
2016-03-21 18:39:21 -07:00
DengYun 90aa7b951d Fix #5599: toast doesn't disappear after app exited.
Summary:Run `Toast.makeText` other than UI Thread will cause bug #5599 : toast doesn't disappear after app exited.

use `UiThreadUtil.runOnUiThread` to fix this.
Closes https://github.com/facebook/react-native/pull/6443

Differential Revision: D3047261

fb-gh-sync-id: 0096879f2a4b4d76bda996a32089f068ae68e3f3
shipit-source-id: 0096879f2a4b4d76bda996a32089f068ae68e3f3
2016-03-21 17:43:23 -07:00
David Aurelio e691b7c9f4 Uprgade node-haste dependency to v2.9.2
Reviewed By: jingc

Differential Revision: D3078868

fb-gh-sync-id: 33dd5bee0d32ee93939030c25228e25fe314c0ee
shipit-source-id: 33dd5bee0d32ee93939030c25228e25fe314c0ee
2016-03-21 17:03:24 -07:00
Martín Bigio 1ef9e4dc59 Make HMR compatible with numeric IDs
Summary:We recently refactor the packager to transform the module names into numeric IDs but we forgot to update the HMR call site. As a consequence, HMR doesn't work the first time a file is saved but the second one.

This is affecting master as of 3/20. If we don't land this before v0.23 is cut we'll have to cherry pick it. This rev does *not* need to be picked on v0.22.

Reviewed By: bestander

Differential Revision: D3075192

fb-gh-sync-id: 410e4bf8f937c0cdb8f2b462dd36f928a24e8aa8
shipit-source-id: 410e4bf8f937c0cdb8f2b462dd36f928a24e8aa8
2016-03-21 15:51:24 -07:00
Martín Bigio 3a1634ec7b Fix HMR preset config path
Reviewed By: davidaurelio

Differential Revision: D3077935

fb-gh-sync-id: b1e89f9e34a505f0611cf8991afe4224d5a6f05d
shipit-source-id: b1e89f9e34a505f0611cf8991afe4224d5a6f05d
2016-03-21 15:45:27 -07:00