Summary:
Changes made in React-Native Docs
1. Removed unnecessary imports `Text, View` from `SimpleNavigationApp`
2. Took MyScene propTypes out of the class as `static propTypes = {` throws parsing error via eslint
Closes https://github.com/facebook/react-native/pull/10513
Differential Revision: D4066367
Pulled By: hramos
fbshipit-source-id: f7d0ccd5f20637a043e96e115a4c40ce6121a737
Summary:
Fixes warnings such as `Warning: Native component for "RCTView" does not exist` when you don't mock the native view class on `UIManager`.
**Test plan (required)**
Run `npm test` with it and without it, notice that warnings are gone and results are the same.
cc cpojer
Closes https://github.com/facebook/react-native/pull/10486
Differential Revision: D4063500
Pulled By: cpojer
fbshipit-source-id: f6bdda1fdd1ad87958f435071d353684cb812af4
Summary: In order to make `Config` and defaults available to our new code, I’ve added flow types and put default values into one shared modile
Reviewed By: cpojer
Differential Revision: D4044600
fbshipit-source-id: 875ed3ade69c5b22bb3c1b177e7bad732834d476
Summary:
This makes ResolutionRequest stop calling `dirname` when arriving at `"."`, not only at `parse(path).root`.
Needed for Buck integration, as we are using relative paths there
Reviewed By: cpojer
Differential Revision: D4058723
fbshipit-source-id: d1856043193cfad3f750577ba0f63f03f8effe7a
Summary:
This diff adds support for native spring animations on iOS. This overlaps some spring work done by kmagiera on the Android side of things.
**Test plan (required)**
Run UIExplorer NativeAnimated examples before and after - compare the results. Pay special attention to the spring examples.
Closes https://github.com/facebook/react-native/pull/9048
Differential Revision: D4056088
Pulled By: foghina
fbshipit-source-id: a593408cb61cb850572bab4a0884f7157cece656
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/10484
Differential Revision: D4057708
Pulled By: javache
fbshipit-source-id: e38216092195e5a38bd3afb43c4521cc4edb66ba
Summary:
Some tools, like `react-native-cli` only works correctly if the `android` and `iOS` projects respect the react native folders structure. Usually, when you are integrating react native with other existing projects, that is not the case. This note will help the developers to identify and avoid potential issues.
Closes https://github.com/facebook/react-native/pull/10480
Differential Revision: D4056046
Pulled By: JoelMarcey
fbshipit-source-id: ef8d75b338616b2319f7e0418a7bfcfa1a0604dc
Summary:
This diff adds support for clamping on iOS. It separates out code originally submitted in #9048.
Test plan (required)
Run UIExplorer NativeAnimated examples before and after - compare the results. Pay special attention to the new clamped spring example.
Closes https://github.com/facebook/react-native/pull/9625
Differential Revision: D4053231
fbshipit-source-id: 29048de444ff5f6d7fe7dce7897399b483ee6d2d
Summary: This is a simple hook to allow native side to fetch any file under the js root folder via packager. Historically, only the `main.jsbundle` is fetched via the packager. This then allows fetching local file like a json file that lives under the same root js folder
Reviewed By: yungsters
Differential Revision: D4037730
fbshipit-source-id: a2d6eb5e30d148fee573d413fc4036d0189f4938
Summary:
To access to the `DevSettingsActivity` it is required to declare the `Activity` in the `AndroidManifest.xml` or the application will crash every time the developer tries to access it.
Closes https://github.com/facebook/react-native/pull/10478
Differential Revision: D4050931
Pulled By: JoelMarcey
fbshipit-source-id: 4b587ab84375a6f08bc69e18d2cd00ae9dfa726d
Summary: I originally added fastpath to node-haste to speed up `path` operations by an order of magnitude. Now we are exclusively using Node 6 at FB so we don't need to ship this thing any more.
Reviewed By: bestander
Differential Revision: D4029092
fbshipit-source-id: 064cf67f4f79ce4f2774fb4e430d22eef4a95434
Summary:
Specify where to find `keytool` on Windows as current command does not normally work.
Closes https://github.com/facebook/react-native/pull/10215
Differential Revision: D4049285
Pulled By: lacker
fbshipit-source-id: f7033e9a596c472181ca75c927cd1efb4b6cf35d
Summary:
In most .gradle files, lines are indented with 4 spaces, but in some places they are indented with 2 spaces. This PR fixes them and enforce it by adding .editorconfig settings.
Closes https://github.com/facebook/react-native/pull/10267
Differential Revision: D4048335
Pulled By: lacker
fbshipit-source-id: df2f2556380f56672cf85690eb1c80e640a6aedf
Summary:
Use a Error Code as first parameter instead since `Promise.reject(String message)` is depriciated
Closes https://github.com/facebook/react-native/pull/10459
Differential Revision: D4048222
Pulled By: lacker
fbshipit-source-id: 5676a459a1f1d21d0edcfb4385524eaad6b05954
Summary:
The `position` animated value is used for scale, translateX, and tranlateY
animations, which are all supported by NativeAnimatedHelper. Unfortunately,
native animations are incompatible with JS driven animations, which the
`enableGestures` flag enables.
This diff therefore conditionally enables native animations based on the native
module's precense, and the state of `enableGestures`.
Ideally the animations would be refactored so that they could fully leverage
native animations, as they are far superior for navigational components.
Reviewed By: oyvindkinsey
Differential Revision: D4020977
fbshipit-source-id: 8e1d015c4d41fee103469f6f9ffa02ff4f1f5517
Summary:
See #10448.
Confirmed link is rendered correctly. cc foghina
Closes https://github.com/facebook/react-native/pull/10468
Differential Revision: D4047432
Pulled By: lacker
fbshipit-source-id: dfa1427d6dcd7b2e5e66ce276cae1ed10778c4ff
Summary:
Updates the documentation for the the android life cycle methods, recent changes has deprecated
`onHostPause()` for `onHostPause(Activity activity)`
`onHostDestroy()` for `onHostDestroy(Activity activity)`
[deprecation commit](0b5c61250b)
Closes https://github.com/facebook/react-native/pull/10460
Differential Revision: D4044420
Pulled By: JoelMarcey
fbshipit-source-id: 54c5fc8fcd332235b6c0237a180e0c5bb2310a20
Summary:
- switched to yarn on travis (experimental)
- removed xcpretty, we need more verbose logs
- returned jest test for e2e
Closes https://github.com/facebook/react-native/pull/10442
Differential Revision: D4043991
Pulled By: davidaurelio
fbshipit-source-id: 50062f6a77a17643bf9a7ba7add8cee5b3bb26d2
Summary:
This creates flow types for the module resolution code in node-haste, and implementations of types used by that code.
The idea is to use that code until we can replace it with something leaner, and provide objects that don’t touch the file system. These objects will be initialized with the static data provided by ModuleGraph/worker.
Reviewed By: cpojer
Differential Revision: D4037372
fbshipit-source-id: 2698dbb630f4122fc1d839d06e414d0963bd6ff2
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
Fix typo on line 47 "make" to "makes"
> **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/CONTRIBUTI
Closes https://github.com/facebook/react-native/pull/10449
Differential Revision: D4039572
Pulled By: hramos
fbshipit-source-id: 21ba41365f24f4f615b73051de63dfd5be6b4893
Summary:
Implemented 2 TODOs from ReactART for Android:
- TODO(7255985): Use TextureView and pass Surface from the view to draw on it asynchronously instead of passing the bitmap (which is inefficient especially in terms of memory usage)
- TODO(6352067): Support dashes in ARTShape
We use ReactNativeART in our Android project.
1. Our app crashes sometimes on large screen smartphones with OutOfMemoryError. Crashes happen in ARTSurfaceShadowNode where TODO(7255985) was suggested in a comment in order to use memory more efficiently.
2. We needed dashes for drawing on ARTSurface.
**Test plan (required)**
I attach a screenshot of our app which shows dashed-lines and two ARTSurfaces on top of each other rendering exactly the same as in the pervious implementation of ARTSurface.
![screenshot_2016-08-19-16-45-43](https://cloud.githubusercontent.com/assets/18415611/17811741/cafc35c4-662c-11e6-8a63-7c35ef1c5ba9.png)
Closes https://github.com/facebook/react-native/pull/9486
Differential Revision: D4021303
Pulled By: foghina
fbshipit-source-id: 880175e841e3c598013982a7748b6fc691c7e8d6
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
Summary:
We had a classic integer underflow problem here. Before we would let you type endlessly when the text already exceeded the TextInput maxLength, now we only let you erase characters.
There is still a small problem with the TextInput: how do you handle when the value (set from JS) exceeds the maxLength? This could happen pragmatically, just by passing in a very large value or when changing maxLength (e.g. when changing from 4 to 3 digits in the case of a AMEX security code -> VISA security code).
Me and achen1 discussed firing onChange in these cases and truncating the number manually (to ensure JS's data model) was aware of the change but it seemed fraught with bugs and general weirdness in what the caller would expect to happen.
Reviewed By: javache
Differential Revision: D3991210
fbshipit-source-id: dc401c4a7aefe09fa749cd1168d36343d39dc196
Summary: Removes code that is no longer used
Reviewed By: matryoshcow
Differential Revision: D4021932
fbshipit-source-id: d73dc8450478288afd71eab451a30a505e7de945