Summary: The method is being used in a test, so if a private method name mangling happens, the name of the method changes and the test fails.
Reviewed By: cpojer
Differential Revision: D5347967
fbshipit-source-id: ee964c2876bcfea5253d2ce7f9f02d4dbeebeab3
Summary:
Currently React Native cli does not support linking native Android modules written in Kotlin. This PR aims to add support to it and closes#14561
- New unit tests added to verify the added functionality, they can be found inside:
`local-cli/core/__tests__/android/findPackageClassName.spec.js`
- Existing unit tests passed.
Closes https://github.com/facebook/react-native/pull/14660
Differential Revision: D5316981
Pulled By: shergin
fbshipit-source-id: 98354ba1e1ce1080a9a4b9958ef39893472038a1
Summary:
This isn't exhaustive, but it's a few more functions that these modules normally export which need to be stubbed.
Closes https://github.com/facebook/react-native/pull/14432
Differential Revision: D5345928
Pulled By: shergin
fbshipit-source-id: f333056ac43ce7c75c6734bca8dc9035745721df
Summary:
This exposes a way to listen to JS bundle download events when creating a ReactInstanceManager. This can be used to display a custom native UI while the JS bundle is loading. It is a pretty specific use case but Expo will need this to display loading progress on the app loading splash screen.
**Test plan**
Tested by adding a listener to the ReactInstanceManager in the Expo app and checked that it gets called when the bundle is loading.
Closes https://github.com/facebook/react-native/pull/12984
Reviewed By: devknoll
Differential Revision: D4797638
Pulled By: hramos
fbshipit-source-id: 04d7cd4071535670c1bcb121566748e495197c80
Summary:
Standard only-numeric (number pad) keyboard on iOS does not have any "Done" or "Enter" button, and this is often very badly hurt user experience.
Usually it can be solved by implementing custom `inputAccessoryView`, but RN does not have built-in support for customizing it.
So, this commit introduced limited support only for "Done" button (returnKeyType="done") and it should suite very well for the vast majority of use cases.
This is highly requested feature, see more details here:
https://github.com/facebook/react-native/issues/1190
Reviewed By: mmmulani
Differential Revision: D5268020
fbshipit-source-id: 90bd5bffac6aaa1fb7c5c2ac539b35b04d45918f
Summary:
Nothing really changed except that there is no code duplication in this part anymore.
More unification is coming!
Reviewed By: mmmulani
Differential Revision: D5144435
fbshipit-source-id: 390f795be3228907b254f8656783232013c36abe
Summary: Some basic same to both classes functionality was moved to base class, and it is just a beginning.
Reviewed By: mmmulani
Differential Revision: D5144429
fbshipit-source-id: 56c6400d46f4cf3c0058fe936cba524dd5d490df
Summary: RCTBackedTextInputViewProtocol is supposed to unify interface of backed text inputs which will make them accessible from managers and wrapper views.
Reviewed By: mmmulani
Differential Revision: D5144428
fbshipit-source-id: 473e7364d4af2edcd87c5555200e1325c38a8214
Summary: We have to have RCTTextView and RCTTextInput as much unified as possible, and this is a small step in this direction.
Reviewed By: javache
Differential Revision: D5143877
fbshipit-source-id: ee8fcab6093fe5d994c85110b07ea16e64fed262
Summary: `UITextField` surprisingly does not have `editable` property (only UITextView does), so we have to implement it ourselfs.
Reviewed By: javache
Differential Revision: D5153070
fbshipit-source-id: 5a76c623fc5c7c3eec10c600c942cf82c93833cd
Summary:
Thanks for submitting a PR! Please read these instructions carefully:
- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
What existing problem does the pull request solve?
* Combined repeating `if` checks for clearer logic.
* `defaultBlue` is inlined because it is only used once for each OS.
- Updated the `Button.js` file in an existing project and all buttons behave exactly the same. Here is a simple demo:
![](http://i.makeagif.com/media/6-11-2017/B0Bhry.gif)
- There is no change in the underlying logic of the code.
Closes https://github.com/facebook/react-native/pull/14455
Differential Revision: D5330112
Pulled By: hramos
fbshipit-source-id: 7fd1a0609f0bb2123208d0e1b3da2bc779f9583d
Summary:
Fixes#14566, as suggested by hramos. Only change from our convo is that I set the height to 180 in this pull request instead of 240. This to respect the aspect ratio of the source image.
- run website, visit in browser, verify that second example code section renders correctly
- copy and paste example code of second example into the App.js of a freshly created react native app
- prepend "export default" to line 4 of the pasted code
- run the app for ios or android (npm start ios)
- verify that the image of that terrible high-five actually renders in the app now
Closes https://github.com/facebook/react-native/pull/14571
Differential Revision: D5330093
Pulled By: hramos
fbshipit-source-id: a0afcd16d07ac25080af41f9619df0703f11b152
Summary:
Fix a bug that allows us to run integration tests in our android project, where RN is specified as a module to our project.
sdkHandler does not exist. The android documentation suggests that we should be using android.ndkDirectory instead.
http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0
An alternative solution would be to set the environment variable ANDROID_NDK, but we do not want to rely on setting this environemnt variable at a system wide level.
We ran two tests.
1.) perform a gradle sync from within our Android studio project, and verify there is no error output.
2.) build android using ./gradleW, from command land. Verify there are no build errors.
Closes https://github.com/facebook/react-native/pull/14136
Differential Revision: D5327421
Pulled By: shergin
fbshipit-source-id: d9e18519a8ca318f2026eb409b90cb09e2adbda1
Summary: Changing AppContainer to render a wrapper component in it, if it exists. This wrapper is NOT a required property of AppContainer. Now, app-wide properties can be passed down via context to the container's children.
Reviewed By: sahrens, fkgozali
Differential Revision: D5283895
fbshipit-source-id: 8595e22c4b5ebf5d0e57f358152fba8a80cb2723
Summary: Upgrade metro-bundler to v0.9.0. This version has no functional change. The only change is that the structure of the npm package reflects the structure of the source code.
Reviewed By: bestander
Differential Revision: D5315651
fbshipit-source-id: 3a69337106d4ccf708823c80d304941973360e8e
Summary:
How to load images from the Android assets folder was undocumented, and took us a little while to find out how to do it.
This is a documentation-only change.
To confirm the syntax works create a sample app with an image at `android/app/src/main/assets/foo.png`.
Then add JSX `<Image style={{width:100, height:100}} source={{uri: 'asset:/foo.png'}} />`.
See that the image is rendered (Android only).
Closes https://github.com/facebook/react-native/pull/14626
Differential Revision: D5316887
Pulled By: AaaChiuuu
fbshipit-source-id: f7d07b8b83d6460de86c1a2efac0955300cfcd78
Summary:
Otherwise you may get the error `"Package <package_name> signatures do not match the previously installed version; ignoring!`
<details>
Thanks for submitting a PR! Please read these instructions carefully:
- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.
Please read the [Contribution Guidelines](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md) to learn more about contributing to React Native.
</details>
_What existing problem does the pull request solve?_
_A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website._
Closes https://github.com/facebook/react-native/pull/14577
Differential Revision: D5272060
Pulled By: AaaChiuuu
fbshipit-source-id: 23d88b8dddc4a7d8c6f58361a1cbcd8e6bb750d3
Summary:
* Cleanup some header files so we use more forward declarations
* Rename Executor to JSExecutor.h
* Move some typedefs to more appropriate locations
Reviewed By: mhorowitz
Differential Revision: D5301913
fbshipit-source-id: e75154797eb3f531d2f42a5e95409f4062b85f91
Summary:
<details>
Thanks for submitting a PR! Please read these instructions carefully:
- [ x ] Explain the **motivation** for making this change.
- [ x ] Provide a **test plan** demonstrating that the code is solid.
- [ x ] Match the **code formatting** of the rest of the codebase.
- [ x ] Target the `master` branch, NOT a "stable" branch.
Please read the [Contribution Guidelines](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md) to learn more about contributing to React Native.
</details>
Consolidates the install to 1 command for windows. Also add the `-y` flag so chocolatey doesn't license prompt for each command.
* Get a windows laptop
* Run the 1 command
Closes https://github.com/facebook/react-native/pull/14710
Differential Revision: D5314510
Pulled By: hramos
fbshipit-source-id: 54d46822eb93d4dec7161ef7d4933d6964f40ef3
Summary: This regression was recently introduced when RCTTextField was splitted into two classes.
Reviewed By: mmmulani
Differential Revision: D5313055
fbshipit-source-id: 1027ddeed7ea9a4bf6f30b0182092f42588b83e3
Summary:
1. Calculated the fling slow down velocity using OnScrollDispatchHelper
2. Calculated the END_DRAG velocity using velocity tracker in VelocityHelper.
3. Change the interface of ReactScrollViewHelper to pass velocity on x & y.
Pending future work:
Calculate the velocity of BEGIN_DRAG, MOMENTUM_BEGIN and MOMENTUM_END
Add threshold in ScrollResponder.js instead of checking x & y velocity equal zero
Reviewed By: achen1
Differential Revision: D5238126
fbshipit-source-id: 35fb70dda8ab66cd152413cb9c1c041354f1c061
Summary: This change fixes rendering issues with arcs having an inner radius. The root cause was a bug that lost the negative sign for counter-clockwise angles. The previous code also incorrectly set the start angle to the end angle.
Differential Revision: D5298320
fbshipit-source-id: 4d11edfed5bdab0cf68313d22f94ef0e3711a1a8
Summary:
(prior to the scroll metrics being set up, or prior to the view being scrolled to the right location).
I'm using a StackNavigator to push a FlatList secondary screen, and it was causing extraneous rendering (item X ->item 0 -> item X)
I've logged inside the render functions of my `renderItem` function, and verified that it no longer attempts to render item 0 anymore. And I've verified from the `VirtualizedList.state` no longer renders a `{first: 0, last: 0}`, but persistently stays at `{first: X, last: X}` from start until things stabilize.
Closes https://github.com/facebook/react-native/pull/14562
Reviewed By: bvaughn
Differential Revision: D5283771
Pulled By: sahrens
fbshipit-source-id: 0f70ac0b89922449bd20bfa69edbc8939eafdf1f
Summary:
react@16 (a peerDependency) did away with the PropTypes export in favor of the prop-types module.
This updates all of the remaining references to `React.PropTypes`.
Closes https://github.com/facebook/react-native/pull/14641
Differential Revision: D5287167
Pulled By: javache
fbshipit-source-id: a917e29aa0e5470260568995dfe97f5528ec265e