Summary:Fix bad wording in the docs change I did in #6534
cc mkonicek
Closes https://github.com/facebook/react-native/pull/6598
Differential Revision: D3085957
Pulled By: vjeux
fb-gh-sync-id: 2b45ac72acf089be6cf8e815aac430a2ce9d08ed
shipit-source-id: 2b45ac72acf089be6cf8e815aac430a2ce9d08ed
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
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
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
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
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
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
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
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
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
Summary: I see dead code
Reviewed By: bestander
Differential Revision: D3092668
fb-gh-sync-id: d80a0267aafd856b63e1d2ff1ae8b8e9f6deb8ce
shipit-source-id: d80a0267aafd856b63e1d2ff1ae8b8e9f6deb8ce
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
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
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
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
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
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
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
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
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
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
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
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