Summary:
In the `NetworkingModule.java`, `header.getString(1)` was
called, so the value must be String type.
FIX#10198
Closes https://github.com/facebook/react-native/pull/10222
Differential Revision: D4080319
Pulled By: lacker
fbshipit-source-id: 85234a2bbf90e5b9e0e65ceadbfabb330b2d1322
Summary:
Fixes#7996.
Test included.
Not sure this is the best way to go, just a simple solution since the TouchableNativeFeedback is trying to clone the component with a Native component, then seems like it should wrap it with Animated.Component if the incoming child was.
Closes https://github.com/facebook/react-native/pull/10081
Differential Revision: D4073603
fbshipit-source-id: 7827198a3e4697c14e37762cdca93f46a5a1d716
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:
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:
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:
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:
With nested NavigatorIOS components:
```
<NavigatorIOS initialRoute={{
component: ComponentWithAnotherNavigatorIOSInSubtree
title: 'xyz'
}}>
```
Navigating (via push etc.) in ComponentWithAnotherNavigatorIOSInSubtree's `navigator` caused an invariant error, making apps with this structure unusable. The reason was that the `navigationComplete` nativeEvent was being propagated to the outer Navigator due to React's automatic event bubbling, making the outer NavigatorIOS incorrectly think it was holding navigation stack state inconsistent with its native UINavigationController.
Concretely, if the outer navigation stack is empty except for its initial state and something is pushed onto the inner stack, the outer NavigatorIOS suddenly complains that it has 2 items on its stack rather than 1. In reality, the outer Navigator still only has 1 item on its stack but the inner Navigator's event (containing information about the inner Navigator) incorrectly bubbles up and reaches the outer Navigator too.
Closes https://github.com/facebook/react-native/pull/9828
Differential Revision: D4030167
Pulled By: ericvicenti
fbshipit-source-id: d04de3d5b70b4862a78610c92701ebdab2b047dd
Summary:
- Consolidate common code in iOS and tvOS test scripts
- Start the packager before starting tests, to improve reliability
- Increase timeout value in RCTTestRunner.m
Closes https://github.com/facebook/react-native/pull/10378
Differential Revision: D4028364
Pulled By: bestander
fbshipit-source-id: 24c2124a1c62643a02f0668b60a67b971e08d1a3
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/10413
Differential Revision: D4028108
fbshipit-source-id: 99a864dfda578d640f582b296583591415ba26cd
Summary:
JS API very similar to web workers and node's child process.
Work has been done by somebody else for the Android implementation over at #7020, so we'd need to have these in sync before anything gets merged.
I've made a prop `messagingEnabled` to be more explicit about creating globals—it might be sufficient to just check for an onMessage handler though.
![screen shot 2016-09-06 at 10 28 23](https://cloud.githubusercontent.com/assets/7275322/18268669/b1a12348-741c-11e6-91a1-ad39d5a8bc03.png)
Closes https://github.com/facebook/react-native/pull/9762
Differential Revision: D4008260
fbshipit-source-id: 84b1afafbc0ab1edc3dfbf1a8fb870218e171a4c
Summary: Fixes remaining references to `ReactElement` that did not already have `React` in scope.
Reviewed By: bestander, vjeux
Differential Revision: D4022022
fbshipit-source-id: 4aeacee0cdbb2c825feba10282208316d064c578
Summary:
after adding new parameter options in alert method, parameter type is the 5th.
Closes https://github.com/facebook/react-native/pull/10370
Differential Revision: D4021511
Pulled By: javache
fbshipit-source-id: 09476162b879d2081f0c0ac95260e673327871b8
Summary:
on iOS, if you pull photo from one of user's custom album, the app crashes on the assertion `RCTAssert(resolvedPromise == NO, @"Resolved the promise before we finished processing the results.");` . assertion that was assumed to never been reached.
According to iOS doc, the enumerateGroupsWithTypes `usingBlock` block is called with `group=nil` when the iteration is over, but in current react-native implementation, it is stopping in other circumstance (because the `else` case) which is probably a mistake.
You have probably never seen the bug because you didn't tried to use getPhotos with something else than the pre-defined groups, but it should be possible to do so *(and it seems to work fine as soon as I included my fix. Later I should provide a PR that includes a way to list user groups :) but at least I need this to gets in, otherwise it crashes)*.
For instance, User have a Photo Folder (or "album", whatever you call it) called "Instagram", when I call `CameraRoll.getPhotos({ groupName: "Instagram",
Closes https://github.com/facebook/react-native/pull/10272
Differential Revision: D4009342
Pulled By: javache
fbshipit-source-id: a73ca828133b4f0d880c229f9b675538854020de
Summary:
Grabbing the port from Bundle URL allows concurrent Remote JS Debugging using the same machine with running multiple instances of packager on different ports.
This improves the developer experience when developing and debugging cross-platform components.
Closes https://github.com/facebook/react-native/pull/10007
Differential Revision: D4008630
Pulled By: javache
fbshipit-source-id: fcf8495e564fd9ac7baf26a87ed3904898132aa0
Summary:
Warning: bind(): You are binding a component method to the component.
React does this for you automatically in a high-performance way, so you can safely remove this call. See TouchableOpacity
Closes https://github.com/facebook/react-native/pull/10349
Differential Revision: D4008552
Pulled By: javache
fbshipit-source-id: d98fe9a0d694dee74ea872e51b02fbd75a133e43
Summary:
Replace `<br />` with `{'\n'}` in order to provide an example of working line breaks in React Native.
Closes https://github.com/facebook/react-native/pull/10323
Differential Revision: D3995544
Pulled By: JoelMarcey
fbshipit-source-id: 8404db8f23eeb606a5a5ed98ca1b7f9b20917e46
Summary:
> What existing problem does the pull request solve?
Purely a documentation/example error. Was misled/wasted time debugging because of this issue.
Description:
`dx`/`dy` are zero in onPanResponderGrant, not `x0`/`y0`. `x0`/`y0` will be the coordinates relative to the granted element, which are rarely zero.
Closes https://github.com/facebook/react-native/pull/9984
Differential Revision: D4001603
Pulled By: hramos
fbshipit-source-id: 32580795f62394585ccfb8f9a2ae65b0b72add69