Commit Graph

3351 Commits

Author SHA1 Message Date
Aleksei Androsov 6555f9bee8 Fix photo orientation from ImagePickerIOS
Summary:
Original PR: https://github.com/facebook/react-native/pull/12249

ImagePickerIOS saves photos to ImageStoreManager without meta information. So photo has wrong orientation.

**Test plan**
1. Take the 2 photos (in landspape and portrait orientation) with this code:
```
ImagePickerIOS.openCameraDialog(
  {},
  (uri) => CameraRoll.saveToCameraRoll(uri),
  () => {}
);
```
2. Ensure that photos in Photos app have right orientation.
Closes https://github.com/facebook/react-native/pull/15060

Differential Revision: D5487595

Pulled By: shergin

fbshipit-source-id: ce1a47f4d5ba33e03070f318f3d6a8dd0df5ab88
2017-07-24 21:51:51 -07:00
Spencer Ahrens eec58237ce gets Relay/Classic/Compat building
Reviewed By: fkgozali

Differential Revision: D5482765

fbshipit-source-id: 0a7c2b8d99256352f09b6510ec8ca1631425e232
2017-07-24 21:39:00 -07:00
Adam Comella fc38fe1736 DEPRECATION: Make NetInfo API cross platform and expose whether connection is 2g/3g/4g
Summary:
This change intends to fix 2 issues with the NetInfo API:
  - The NetInfo API is currently platform-specific. It returns completely different values on iOS and Android.
  - The NetInfo API currently doesn't expose a way to determine whether the connection is 2g, 3g, or 4g.

The NetInfo API currently just exposes a string-based enum representing the connectivity type. The string values are different between iOS and Andorid. Because of this design, it's not obvious how to achieve the goals of this change without making a breaking change. Consequently, this change deprecates the old NetInfo APIs and introduces new ones. Specifically, these are the API changes:
  - The `fetch` method is deprecated in favor of `getConnection`
  - The `change` event is deprecated in favor of the `connectionchange` event.
  - `getConnection`/`connectionchange` use a new set of enum values compared to `fetch`/`change`. See the documentation for the new values.
    - On iOS, `cell` is now known as `cellular`. It's worth pointing out this one in particular because the old and new names are so similar. The rest of the iOS values have remained the same.
    - Some of the Android enum values have been removed without a replacement (e.g. `DUMMY`, `MOBILE_DUN`, `MOBILE_HIPRI`, `MOBILE_MMS`, `MOBILE_SUPL`, `VPN`). If desirable, we could find a way to expose these in the new API. For example, we could have a `platformValue` key that exposes the platform's enum values directly (like the old `fetch` API did).

`getConnection` and `connectionchange` each expose an object which has 2 keys conveying a `ConnectionType` (e.g. wifi, cellular) and an `EffectiveConnectionType` (e.g. 2g, 3g). These enums and their values are taken directly from the W3C's Network Information API spec (https://wicg.github.io/netinfo/). Copying the W3C's API will make it easy to expose a `navigation.connection` polyfill, if we want, in the future. Additionally, because the new APIs expose an object instead of a string, it's easier to extend the APIs in the future by adding keys to the object without causing a breaking change.

Note that the W3C's spec doesn't have an "unknown" value for `EffectiveConnectionType`. I chose to introduce this non-standard value because it's possible for the current implementation to not have an `effectiveConnectionType` and I figured it was worth representing this possibility explicitly with "unknown" instead of implicitly with `null`.

**Test Plan (required)**

Verified that the methods (`fetch` and `getConnection`) and the events (`change` and `connectionchange`) return the correct data on iOS and Android when connected to a wifi network and a 4G cellular network. Verified that switching networks causes the event to fire with the correct information. Verified that the old APIs (`fetch' and 'change') emit a deprecation warning when used. My team is using a similar patch in our app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/14618

Differential Revision: D5459593

Pulled By: shergin

fbshipit-source-id: f1e6c5d572bb3e2669fbd4ba7d0fbb106525280e
2017-07-24 15:50:53 -07:00
Eric Rozell 59105f6b1e Adds hook for platform-specific View props
Summary:
Platforms that plug in to react-native may require additional props that are specific to those platforms. For example, already in react-native there are props that are specific to Android (`accessibilityComponentType`, `needsOffscreenAlphaCompositing`, etc.), props that are specific to iOS (`accessibilityTraits`, `shouldRasterizeIOS`, etc.) and props that are specific to tvOS (`isTVSelectable`, `tvParallaxProperties`, etc.).

I need to add properties to `react-native-windows`, and I'd prefer not to override the entire `ViewPropTypes` file as it is a risk that things in react-native-windows fall out of sync with react-native.

Fixes #15173

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15175

Differential Revision: D5481444

Pulled By: hramos

fbshipit-source-id: 3da08716d03ccdf317ec447536eea3699dd7a760
2017-07-24 12:26:58 -07:00
Jason Gaare f7043699b0 Use Apple's significant-change API (for iOS 11 UX)
Summary:
In the yet-to-be-released iOS 11, Apple has changed the way they notify the user of location services. (You can watch their session from WWDC about all the changes [here](https://developer.apple.com/videos/play/wwdc2017/713/).)

The current implementation of `RCTLocationObserver` uses the standard location services from Apple. When the user has granted `Always` location permission and the application uses the background location service, the user is presented with the *_Blue Bar of Shame_* (for more information check out [this blog post](https://blog.set.gl/ios-11-location-permissions-and-avoiding-the-blue-bar-of-shame-1cee6cd93bbe)):

![image](https://user-images.githubusercontent.com/15896334/28285133-281e425c-6af9-11e7-9177-61b879ab593c.png)

* Added `useSignificantChanges` boolean to the options passed.

* Added `_usingSignificantChanges` boolean based on user options. If `true`, then the CLLocationManager will use functions `startMonitoringSignificantLocationChanges`/ `stopMonitoringSignificantLocationChanges` rather than the standard location services.
* Changed method signature of `beginLocationUpdatesWithDesiredAccuracy` to include `useSignificantChanges` flag
* Added check for new `NSLocationAlwaysAndWhenInUseUsageDescription`

All unit tests passed.

Tested in simulator and on device, toggling `useSignificantChanges` option when calling `watchPosition`. Results were as expected. **When `TRUE`, the _Blue Bar of Shame_ was not present.**

Changes do not affect Android and location services still work as expected on Android.

* Change is for iOS only
* Using a different API will have different accuracy results. Adding `useSignificantChanges` as an option was by design so apps that want to have most accurate and most frequent update can still use standard location services.
Closes https://github.com/facebook/react-native/pull/15062

Differential Revision: D5443331

Pulled By: javache

fbshipit-source-id: 0cf5b6cd831c5a7c8c25a5ddc2e410a9aa989bf4
2017-07-24 11:23:10 -07:00
Taylor Kline 64899c08f3 Identify keyboardDismissMode platform-specific options
Summary:
Similar to `TextInput`'s `returnKeyType`, comments allow to see at a glance which options are cross-platform and which are not.

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14780

Differential Revision: D5480895

Pulled By: hramos

fbshipit-source-id: c38337def920678d29c8322e52b54f57e80cb95b
2017-07-24 11:23:10 -07:00
Isaac Odhiambo 3683ff8d95 Update DrawerLayoutAndroid.android.js
Summary:
Currently in the documentation is not clear on how to use the `openDrawer` and `closeDrawer` methods. There is no mention of the requirement to use refs in order to access the Drawer. This should make it clear on how to do the above.
Closes https://github.com/facebook/react-native/pull/13961

Differential Revision: D5479993

Pulled By: hramos

fbshipit-source-id: 4d29f695fbaf097d47f75b345b9998f61156f467
2017-07-24 08:16:25 -07:00
Alex Dvornikov 9342f25d5f Inline requires in JSTimers
Reviewed By: javache

Differential Revision: D5466322

fbshipit-source-id: 0bcc71e19cdb48d95b5e35ae2f720d46baf9bb50
2017-07-24 07:20:34 -07:00
Alex Dvornikov 5da7629b44 Clean up property defines in InitializeCore
Reviewed By: javache

Differential Revision: D5472176

fbshipit-source-id: feb81bd9ee04eb7e54d51524c367b10b385b33ae
2017-07-24 07:20:34 -07:00
Alex Dvornikov 0736f5d190 Make Set and Map initialization lazy
Reviewed By: javache

Differential Revision: D5461810

fbshipit-source-id: 6f22528bac4dd6e073e98a093e02d84114d0706a
2017-07-24 07:20:33 -07:00
Pieter De Baets cb12080179 Replace exported method registration with statically allocated struct
Reviewed By: fromcelticpark

Differential Revision: D5389383

fbshipit-source-id: 9eb29b254b616574966b43ad24aa880d44589652
2017-07-24 07:01:53 -07:00
Pieter De Baets db3df3400a Breaking - make RCTDeviceEventEmitter warnings fatal
Reviewed By: davidaurelio

Differential Revision: D5469832

fbshipit-source-id: 1eb4ad3a2b3e1fa10d75e42d1d2f7baa291cb6f4
2017-07-24 03:47:59 -07:00
Tomas Reimers 3eae3df5d1 Add docs for onMomentumScrollBegin
Summary:
<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15158

Differential Revision: D5479401

Pulled By: shergin

fbshipit-source-id: d4864e1630a36deb1a227c1b6242255ac1f788e6
2017-07-24 01:17:30 -07:00
Tomas Reimers aa9a19ab8d Remove onScrollAnimationEnd
Summary:
<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15156

Differential Revision: D5479265

Pulled By: shergin

fbshipit-source-id: a2dfa3a4357e126838a17dac4797d1d845cd56ae
2017-07-24 00:32:17 -07:00
Tomas Reimers b8118d1b79 Add documentation for onMomentumScrollEnd
Summary:
<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15144

Differential Revision: D5478574

Pulled By: shergin

fbshipit-source-id: 33c49f0efdfb3a518e1ee254b1dc01ec22f09269
2017-07-23 14:07:44 -07:00
Garrett McCullough 8117fa16c9 Improve the documentation for ListView and ListViewDataSource
Summary:
What existing problem does the pull request solve?
My motivation was to improve the documentation for ListView and ListViewDataSource because I always have trouble remembering how they work and the documentation was lacking an example for `cloneWithRowsAndSections`

My PR does the following:
* add a note about how headers and footers are rendered on a horizontal ListView
* fix a typo in an example
* clarify that the sectionIdentities should match the keys or array indexes of the data source
* add an example of cloneWithRowsAndSections
* add notes on the return values of `getRowCount` and `getRowAndSectionCount`

n/a; documentation only

![screenshot of ListViewDataSource changes](https://cloud.githubusercontent.com/assets/580060/25768881/d339544a-31c1-11e7-88a1-5e60bc008500.png)
Closes https://github.com/facebook/react-native/pull/13811

Differential Revision: D5473192

Pulled By: hramos

fbshipit-source-id: f31fc6edfdeb8dff75d39bbcceda06fd839df934
2017-07-21 14:31:17 -07:00
Spencer Ahrens 365aea3415 Libraries/Shared --> Libraries/www-shared, EventEmitter --> vendor/emitter
Reviewed By: fkgozali

Differential Revision: D5455575

fbshipit-source-id: 0eb4da4b1d8688b704f2f751143610e6ed836ce7
2017-07-21 09:40:15 -07:00
Pieter De Baets eb0d99c812 Conditionally export JSTimers (retry)
Reviewed By: davidaurelio

Differential Revision: D5469811

fbshipit-source-id: db7d783d7104123f4402c147d9553f8d393bbf83
2017-07-21 08:16:11 -07:00
Krzysztof Magiera b8fafb46c1 Stop native driver animations when value is set.
Summary:
This diff changes the behaviour of natively driven animations in case the node that they are being run for has its value changed using `setValue` or as a result of an incoming event.

The reason for changing that is to match the JS implementation of `setValue` which behaves as described above (see relevant code here: 7cdd4d48c8/Libraries/Animated/src/AnimatedImplementation.js (L743))

**Test Plan:**
Use this sample app: https://snack.expo.io/B1V7RX9r-
Change: `USE_NATIVE_DRIVER` const between `true` and `false`.
See the animation stops regardless of the state of `USE_NATIVE_DRIVER` unlike before when it would stop only when `USE_NATIVE_DRIVER` was set to `false`
Closes https://github.com/facebook/react-native/pull/15054

Differential Revision: D5463750

Pulled By: hramos

fbshipit-source-id: e164c5299588ba8cac2937260c9ba9f6053b04e5
2017-07-20 14:20:30 -07:00
Pieter De Baets ed3c018ee4 Remove legacy JSC profiler
Reviewed By: bnham

Differential Revision: D5433406

fbshipit-source-id: 8cbea8b9b46a0d9f29c57a5bcf605e6bb61ed8a7
2017-07-20 04:21:16 -07:00
Chirag Jain bf752014a9 use propTypes directly
Summary:
Just noticed this commit creates a new variable for propTypes instead of using it directly. c2c97ae4b1

Should be straighforward.
Closes https://github.com/facebook/react-native/pull/15113

Differential Revision: D5460980

Pulled By: javache

fbshipit-source-id: 7446be8af22557d4bd4eddb711272b914ca48112
2017-07-20 03:19:45 -07:00
Shir Levkowitz ced1513b62 Pass actual loaded image size to load (iOS).
Summary:
Motivation: The JavaScript image component's onLoad callback optionally
accepts dimensions width and height, allowing the parent of the image to
obtain the native size (without an extra bridge call). It was found that
the dimensions passed into this callback on iOS are frequently (0,0),
not the true native dimensions. This change ensures that the image's
dimensions are passed to the callback. (Examination of the initializer
for RCTImageSource, + (RCTImageSource *)RCTImageSource:(id)json,
indicates that not all code paths produce a size other than CGSizeZero.)
Closes https://github.com/facebook/react-native/pull/15116

Differential Revision: D5460979

Pulled By: javache

fbshipit-source-id: 2dca03c3aae974ef70e981039aa6a804b8e128c8
2017-07-20 03:05:11 -07:00
Valentin Shergin 42d6323fe0 TextInput: Actual `reactAccessibilityElement` implementation
Summary: Because of some rebase issue `reactAccessibilityElement` was implemented with old invalid name, which breaks some accessibility features.

Reviewed By: mmmulani

Differential Revision: D5458283

fbshipit-source-id: 1e66a2f54c1f1a85118c9432b68895679a10059c
2017-07-19 17:21:02 -07:00
Brian Vaughn c2c97ae4b1 Ran PropTypes -> prop-types codemod
Reviewed By: gaearon

Differential Revision: D5453511

fbshipit-source-id: 6abe3dfa6d8cf70cc49ce2b6a7d3e94679398c5e
2017-07-19 15:02:05 -07:00
Arnold Noronha 2639e7f123 Revert D5446953: [react-native] Conditionally export JSTimers
Differential Revision: D5446953

fbshipit-source-id: 8275e1b71b8fac9b120c8ddff486f9cd88b7939d
2017-07-19 13:06:02 -07:00
Miguel Jimenez Esun 737abe3b76 Revert D5388655: BREAKING: Add regenerator-runtime on demand, based on the files
Differential Revision: D5388655

fbshipit-source-id: 2f92d6ae69f4772195aeca7493f53209388b3ad0
2017-07-19 12:08:38 -07:00
Miguel Jimenez Esun 3103258ca0 BREAKING: Add regenerator-runtime on demand, based on the files
Summary:
Adding a Babel plugin that will analyze the file looking for any potential candidate to use `regenerator-runtime`, and if so, will inject dynamically the module. The module is injected per file, so we avoid polluting the global environment. The plugin is also able to inject the `require` call beforehand, so that the inliner can pick them and inline them.

The Babel plugin is part of `react-native-babel-preset`, so as long as you are using this preset you are safe. If not, you should include the specific transformer into your list of plugins, as `react-native-babel-preset/transforms/transform-regenerator-runtime-insertion.js`.

Reviewed By: davidaurelio

Differential Revision: D5388655

fbshipit-source-id: dc403f3d5e2d807529eb8569a85c45fec36a6a3e
2017-07-19 11:04:33 -07:00
Pieter De Baets a68f6fab0f Conditionally export JSTimers
Reviewed By: fkgozali

Differential Revision: D5446953

fbshipit-source-id: c08bd873024d591f5186a3a6767f319de3b6b6d8
2017-07-19 05:45:08 -07:00
Ranjan Shrestha 1afee0bc0e Native Animated - Override __makeNative in AnimatedInterpolation
Summary:
Fixes the error `Trying to update interpolation node that has not been
attached to the parent` in android which occurs when using multiple
Animated.Values along with interpolation and an animation is run before
another one that uses interpolation. On ios, no error is thrown in such
case but the animation also doesn't work as expected.

You can check the snack code here which works properly without
useNativeDriver: true. But fails on android and skips the first stage
of animation on ios.
  https://snack.expo.io/HyD3zdjSZ

**Test Plan**
The animations worked properly after the __makeNative override made
the parent node native as well.

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15077

Differential Revision: D5449066

Pulled By: shergin

fbshipit-source-id: 2f0b6ea712a0ab12c1c545514a3686a9a6aeebed
2017-07-18 18:02:22 -07:00
JSON Deppen af48b4855b Remove typo
Summary:
<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15089

Differential Revision: D5448987

Pulled By: shergin

fbshipit-source-id: eb240517dc94475744f1bda2652f8aff994c0bcd
2017-07-18 17:46:33 -07:00
Valentin Shergin 603cc48ceb TextInput: Refined contentSize calculation
Summary: This fixes pretty bad issue when contentSize is calculated based on an intrinsic horizontal (width) limitation, not on a real/current horizontal (width) one.

Reviewed By: mmmulani

Differential Revision: D5422114

fbshipit-source-id: 0eb582aeb59d29530990d4faabf2f41baa79c058
2017-07-18 14:46:22 -07:00
Valentin Shergin 7da5ef372c TextInput: Simplified `selectTextOnFocus` logic
Summary: Previous implementation was not quite correct (because it was framed by hacky event handling) and caused some issues with new ScrollView improvements (autoscroll to focused TextInput).

Reviewed By: javache

Differential Revision: D5414439

fbshipit-source-id: 72d1f23170340c453b939dca8b72422822acc1d7
2017-07-18 14:46:22 -07:00
Valentin Shergin f89e132719 TextInput: textInputShouldEndEditing and textInputDidEndEditing were moved to base class
Reviewed By: mmmulani

Differential Revision: D5395925

fbshipit-source-id: 0c67beccd74d981ab2a89f9cb31990301793b408
2017-07-18 14:46:22 -07:00
Valentin Shergin a50c9c8e22 TextInput: `selection` property was unified
Summary:
This diff unifies `selection` prop between single line and multi line text inputs.
Besides that, this diff improves the selection event handling, makes it more robust and predictable.
(See inline comments.)

Reviewed By: mmmulani

Differential Revision: D5317652

fbshipit-source-id: db5b0d2c0b80268e479ba866980e14b444079386
2017-07-18 14:46:22 -07:00
Valentin Shergin 4ff3e101ac TextInput: Hacks related to missed `textInputDidChange` were moved to adapter
Summary:
iOS has tendency to skip `textInputDidChange` event (irregulary, across all dispatch ways: target-action, delegate, notification center)
when text input looses focus. Usually it happens when autocorrection applies some changes automatically on loosing focus, but I think these are bunch of different cases.
So, the workaround is pretty simple: if there was no `textInputDidChange` event between `shouldChangeText` and `didEndEditing`, we create it manually.

Previously these workaround complicate our business logic, now they was decoupled in separate adapter.

Reviewed By: mmmulani

Differential Revision: D5317651

fbshipit-source-id: 138143213e8752fe9682229c51685aef614c00dd
2017-07-18 14:46:22 -07:00
Valentin Shergin d69e60bb7a TextInput: Unified support of `clearTextOnFocus` prop
Summary: The implementation of `clearTextOnFocus` was unified and moved to baseclass.

Reviewed By: javache

Differential Revision: D5299489

fbshipit-source-id: ff166f9bb0673ff8766f20b677f56810f64d7b2d
2017-07-18 14:46:22 -07:00
Valentin Shergin cb96f1d5d2 TextInput: Unified support of `clearsOnBeginEditing` prop
Summary: The implementation of `clearsOnBeginEditing` was unified and moved to superclass.

Reviewed By: javache

Differential Revision: D5299396

fbshipit-source-id: 98c5494a782cbe4df5b2d6021828eb7b2012f6dc
2017-07-18 14:46:22 -07:00
Valentin Shergin 8f93ce680d TextInput: Unified support of `blurOnSubmit` prop
Summary:
Now the business logic of `blurOnSubmit` is pretty simple and lives inside `RCTTextInput`,
whereas UIKit hacks/workarounds lives inside `RCTBackedTextInputDelegateAdapter`.

Reviewed By: javache

Differential Revision: D5299397

fbshipit-source-id: 6a9d4194324ff9446c74fdb32ad5357e849e471d
2017-07-18 14:46:22 -07:00
Valentin Shergin da9a183e81 TextInput `setSelection` method was moved to base class
Summary: This method was identical between two subclasses, so it was moved to baseclass.

Reviewed By: javache

Differential Revision: D5297401

fbshipit-source-id: 8f56bef33f9ab0184f69da76177b5e8da10d7514
2017-07-18 14:46:22 -07:00
Valentin Shergin ee9697e515 Introducing `RCTBackedTextInputDelegate`
Summary:
Nothing behavioral changed in this diff; just moving code around.

`RCTBackedTextInputDelegate` is the new protocol which supposed to be common determinator among of UITextFieldDelegate and UITextViewDelegate
(and bunch of events and notifications around UITextInput and UITextView).

We need this reach two goals in the future:
 * Incapsulate UIKit imperfections related hack in dedicated protocol adapter. So, doing this we can fix more UIKit related bugs without touching real RN text handling logic. (Yes, we still have a bunch of bugs, which we cannot fix because it is undoable with the current architecture. This diff does NOT fix anything though.)
 * We can unify logic in RCTTextField and RCTTextView (even more!), moving it to a superclass. If we do so, we can fix another bunch of bugs related to RN imperfections. And have singleline/multiline inputs implementations even more consistent.

Reviewed By: mmmulani

Differential Revision: D5296041

fbshipit-source-id: 318fd850e946a3c34933002a6bde34a0a45a6293
2017-07-18 14:46:22 -07:00
Tomas Reimers c694212be3 FlatList doesn't specify that it accepts ScrollView Props
Summary:
ListView does specify this: https://facebook.github.io/react-native/docs/listview.html#props

The link in ListView is generated by the documentation generator, but because the format of FlatList's props is different, it fails to catch it. Consider finding a way to specify this explicitly to the documentation generator (although this would be a bigger change).

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14891

Differential Revision: D5386036

Pulled By: sahrens

fbshipit-source-id: 0b8a685411507cc4d0b781fd39b792d59614ce52
2017-07-18 11:16:46 -07:00
Panindra 8f36405380 Docs: Update TouchableWithoutFeedback.js
Summary:
Add description for onPressIn and onPressOut.

Here is the snack to illustrate it.
https://snack.expo.io/Byed5cKBW

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15045

Differential Revision: D5434900

Pulled By: hramos

fbshipit-source-id: b235c3649e63b0bd149b0a65e439cd2433b01b8a
2017-07-17 20:31:47 -07:00
Belal Sejouk 9c2ce53b89 Add delay support to Animated.spring
Summary:
Aadding a `delay` option to `Animated.spring` works now 👇:

![spring_delay](https://user-images.githubusercontent.com/18269100/28255417-7650233e-6a6b-11e7-87a3-ed15794b9ed8.gif)
Closes https://github.com/facebook/react-native/pull/15043

Differential Revision: D5436307

Pulled By: hramos

fbshipit-source-id: df0652d20ee5810986b322486f1ec417fe2d0a0a
2017-07-17 20:31:47 -07:00
Miguel Jimenez Esun 7a4eda2f70 Remove default polyfills from metro-bundler
Reviewed By: davidaurelio

Differential Revision: D5423673

fbshipit-source-id: a66655cd72d56eb60a8a79a298ebfbc746b5ad10
2017-07-17 03:20:02 -07:00
levi serebryanski 85247f9986 Remove unused focusedOpacity prop and function
Summary:
The `focusedOpacity` prop is only used inside `_opacityFocused` which is not used anywhere. This pr removes this unused code.
The code was added in https://github.com/facebook/react-native/pull/10427 but it does not appear to be used in the final version of the pr.
Closes https://github.com/facebook/react-native/pull/14984

Differential Revision: D5430611

Pulled By: shergin

fbshipit-source-id: 0bc4fdef04304eae9785caaf76ae1fb12ce6651e
2017-07-14 21:03:53 -07:00
Nivetha Singara Vadivelu 636a21b67e Adding video play duration for camera roll
Reviewed By: zjj010104

Differential Revision: D5427454

fbshipit-source-id: 49b9fb2acf8f5093257780c927720776f3fae286
2017-07-14 17:39:36 -07:00
Dean G cb9b266b8e Update sectionList keyExtractor docs
Summary:
Added language to explain that you still need to add keys for each section even if you use a keyExtractor method.

No code changed; just clarified documentation.
Closes https://github.com/facebook/react-native/pull/15007

Differential Revision: D5425897

Pulled By: hramos

fbshipit-source-id: db44064a28a673feeda5a6765ea45217d3ae51e2
2017-07-14 13:23:21 -07:00
Brian Vaughn 221286be13 React sync for revisions cb32253...5495e49
Reviewed By: acdlite

Differential Revision: D5416055

fbshipit-source-id: c69de0d699f11dec4a71fb6e3f924ade3446bba0
2017-07-13 17:38:57 -07:00
Maarten Schumacher cad2d9b072 Be able to scroll to last item in list
Summary:
The invariant condition doesn't allow scrolling to the last index

Here is a simple reproduction of the problem: https://snack.expo.io/BJ59gzWrZ

Surely, if the last item is rendered, we should be able to scroll to it without an invariant failing?

Tested locally that this change fixes the issue.
Closes https://github.com/facebook/react-native/pull/14934

Differential Revision: D5414535

Pulled By: shergin

fbshipit-source-id: 38dac4c0e2ae5e1e199a67ca0e98e8f7325e77f4
2017-07-13 00:03:51 -07:00
Eli White d9f98191eb Removing @nolint from flow files
Reviewed By: zertosh

Differential Revision: D5407058

fbshipit-source-id: 54e9cbc1a9739bcf104752f3421cc7cba41730cc
2017-07-12 14:09:54 -07:00