Commit Graph

4686 Commits

Author SHA1 Message Date
AntoineDoubovetzky 54af5b151e Remove wrapper around ListEmptyComponent (#24339)
Summary:
This pull request fixes #24257.

The wrapper around ListEmptyComponent doesn't allow to use flex on the ListEmptyComponent.
The wrapper was removed in this [commit](db061ea8c7), and then put back in this [commit](e94d3444dc) but I think the relevant part was removing the condition on `itemCount !== 0` to apply the inversionStyle on the ScrollView and everything is still working without the wrapper.

[GENERAL] [FIXED] - Remove wrapper around ListEmptyComponent
Pull Request resolved: https://github.com/facebook/react-native/pull/24339

Differential Revision: D14822221

Pulled By: cpojer

fbshipit-source-id: 623e1ab3f228e9b75b92cdcd568683232a403c1a
2019-04-17 21:26:51 +02:00
Seph Soliman effb028ad5 Fix #23755 ("RCTImagePickerManager requires main queue setup" warning) (#24314)
Summary:
Fix #23755 - Which is to remove the warning:
```
Module RCTImagePickerManager requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
```

General Fixed - Warning "RCTImagePickerManager requires main queue setup
Pull Request resolved: https://github.com/facebook/react-native/pull/24314

Differential Revision: D14788772

Pulled By: cpojer

fbshipit-source-id: e2017136008367d36468debb258afa698b5402bc
2019-04-17 21:20:15 +02:00
Mike Grabowski d60a2fbb01 [0.59.4] Bump version numbers 2019-04-08 23:51:19 +02:00
Craig_Martin e3ac3293d9 Add scrollToOverflowEnabled prop to ScrollView (#24296)
Summary:
ScrollView's scrollTo behavior on iOS was recently changed to limit the offset to the content size plus any content inset (see #23427). This departure from the old behavior created UI issues for anyone that is using the over-scroll ability for the purpose of positioning elements at specific coordinates on the screen. Examples include using this behavior to position TextInputs above the virtual keyboard programmatically when focused or moving drop down elements positioned near the bottom of the content toward the top of the screen when selected to show a larger absolutely positioned item list. Default behavior does not change and this is an "opt-in" type of prop to re-enable the old behavior.

[iOS] [Added] - Added scrollToOverflowEnabled prop to ScrollView
Pull Request resolved: https://github.com/facebook/react-native/pull/24296

Differential Revision: D14762619

Pulled By: cpojer

fbshipit-source-id: d2a552b5cb321d52e8ea4116327bf9ec647a3aae
2019-04-08 23:22:33 +02:00
PIYUSH GUPTA 05723ed08a fixed touchable longpress (#24238)
Summary:
This diff fixes a bug in TouchableNativeFeedback where a long press is not registered.

cause of the bug is _touchableHandleResponderMove_ being invoked **regardless** of a moving gesture ( even when movedDistance is 0) in some devices ( including OnePlus5t ), which was eventually clearing out  the long-press timeout.

fix is to prevent _touchableHandleResponderMove_ from Implementing if the state of touchable is RESPONDER_INACTIVE_PRESS_IN.

[General] [Fixed] - Touchable onLongPress fix.
Pull Request resolved: https://github.com/facebook/react-native/pull/24238

Reviewed By: cpojer

Differential Revision: D14712986

Pulled By: rickhanlonii

fbshipit-source-id: e85a66a7e8b61e0a33146b2472e2e055726a0e93
2019-04-08 23:16:42 +02:00
Ilja Daderko 836a8e0e4d Fix universal links not working in iOS 12 / Xcode 10 (#22764)
Summary:
fix #22716

Changelog:
----------
[iOS][Fixed] - Fix universal links in iOS 12 / Xcode 10
Pull Request resolved: https://github.com/facebook/react-native/pull/22764

Differential Revision: D14576559

Pulled By: cpojer

fbshipit-source-id: 4ef727e1d9aa7646359b63468285fec1f8f1651b
2019-04-08 23:15:49 +02:00
Lorenzo Sciandra 3b91a7ec23 [0.59.3] Bump version numbers 2019-04-01 12:43:47 +01:00
michalchudziak e94d3444dc Fix behaviour of Header, Footer and Empty List components in VirtualizedList when it's inverted (#24167)
Summary:
Fixes https://github.com/facebook/react-native/issues/23453
Fixes https://github.com/facebook/react-native/issues/21196

Basically, changes made in https://github.com/facebook/react-native/pull/21496 currently breaks behavior of `<VirtualizedList />`  and any components that are based on it (`<SectionList />, <FlatList />`). This PR solves both issues listed above.

Visual confirmation of the resolved issue:

**Vertical, not inverted, not empty**
![image](https://user-images.githubusercontent.com/7837457/55076839-b005d700-5096-11e9-91de-090934cb0129.png)

**Vertical, not inverted, empty**
![image](https://user-images.githubusercontent.com/7837457/55076971-fb1fea00-5096-11e9-8d73-5a2d86275da8.png)

**Vertical, inverted, not empty**
![image](https://user-images.githubusercontent.com/7837457/55077042-23a7e400-5097-11e9-911f-9dad4d48a578.png)

**Vertical, inverted, empty**
![image](https://user-images.githubusercontent.com/7837457/55079957-87351000-509d-11e9-8f1c-b7134f1f43f9.png)

**Horizontal, not inverted, not empty**
![image](https://user-images.githubusercontent.com/7837457/55077118-44703980-5097-11e9-94e9-e33d4af436ee.png)

**Horizontal, not inverted, empty**
![image](https://user-images.githubusercontent.com/7837457/55077150-52be5580-5097-11e9-9d43-7cb4e983167e.png)

**Horizontal, inverted, not empty**
![image](https://user-images.githubusercontent.com/7837457/55077183-623d9e80-5097-11e9-9e8a-1b2468c7b3a9.png)

**Horizontal, inverted, empty**
![image](https://user-images.githubusercontent.com/7837457/55080033-af247380-509d-11e9-90ae-1ff656d46dd1.png)

[General] [Fixed] - Fixed VirtualizedList, SectionList and FlatList behavior on rendering list headers with inverted prop and zero items
Pull Request resolved: https://github.com/facebook/react-native/pull/24167

Differential Revision: D14642345

Pulled By: cpojer

fbshipit-source-id: b530bbbd57f60e53a976ac5db272ea4b2d2b3e99
2019-03-29 15:20:20 +00:00
zhongwuzw 1a35bc5562 Fix TextInput maxLength when insert characters at begin (#23472)
Summary:
Fixes #21639 , seems we tried to fix this before, please see related `PR` like [D10392176](36507e4a3c), #18627, but they don't solve it totally.

[iOS] [Fixed] - Fix TextInput maxLength when insert characters at begin
Pull Request resolved: https://github.com/facebook/react-native/pull/23472

Reviewed By: mmmulani

Differential Revision: D14366406

Pulled By: ejanzer

fbshipit-source-id: fc983810703997b48824f84f2f9198984afba9cd
2019-03-29 15:16:14 +00:00
Bartol Karuza d7e7b3ef50 Fix #24053 prevent division by zero error in VirtualizedList debug overlay (#24058)
Summary:
This PR fixes the case where the content a VirtualizedList loads with a contentLength of 0,  causing a crash in the `renderDebugOverlay` function. The result of that crash is a red screen when turning on debug on FlatList and other VirtualizedList components as described in #24053.

[LIST] [FIX] - Fix VirtualizedList debug mode crash
Pull Request resolved: https://github.com/facebook/react-native/pull/24058

Differential Revision: D14538317

Pulled By: cpojer

fbshipit-source-id: 7b17bf51c388561c517bab1f775a31200abdc5a9
2019-03-29 15:14:45 +00:00
Mike Grabowski 9bb5c32de9 [0.59.2] Bump version numbers 2019-03-25 22:22:14 +01:00
Emily Janzer 4260907b90 Pass through track color values for true/false to native component
Summary:
There's a bug in the OSS Switch component where the track color value is reset to the default value when the switch is toggled. It looks like the Java class resets the track color value in `setOn` (which fires in a press event): https://fburl.com/vmugfzja but these values aren't actually initialized from JS - in Switch.js we only pass through the current track color: https://fburl.com/vytekd0o.

The React component already has an API for defining both true/false track colors. However, we should also make sure not to reset these values for people using the old API of `tintColor`/`onTintColor`, so I'm changing it to only reset the value when both of those props are null.

Reviewed By: mdvacca

Differential Revision: D14035007

fbshipit-source-id: 12d968076bd47d54deedbfc15b12ff3cd77e2fd0
2019-03-22 18:27:21 +01:00
Danilo Bürger 699fad7d06 Fixed regression in SectionList caused by #21577 not being able to scroll to top on android (#24034)
Summary:
```
let index = params.itemIndex + 1;
```
to
```
let index = Platform.OS === 'ios' ? params.itemIndex : params.itemIndex - 1;
```
to fix an issue on iOS. Note however, how the sign for non iOS changed from `+` to `-` causing a crash on Android when trying to scroll to index 0 as that will be evaluated to -1 instead of 1 and thus be out of bounds.

[Android] [Fixed] - Fixed regression in SectionList caused by #21577 not being able to scroll to top on android
Pull Request resolved: https://github.com/facebook/react-native/pull/24034

Differential Revision: D14520796

Pulled By: cpojer

fbshipit-source-id: bb49619f49752fd3f343ef3b7bf1b86ac48af7f8
2019-03-22 18:22:26 +01:00
Peter Argany a38dc732bb Revert of [D13948951]Apply the fix for CJK languages on single-line test fields.
Summary:
This PR (https://github.com/facebook/react-native/pull/22546) broke single line text inputs. After inputting some text and tapping away, the text input reverts back to default text.

Revert solved the issue.

Reviewed By: cpojer

Differential Revision: D14185897

fbshipit-source-id: cc7f0f2ebfb0494062afbc628c4fe27ad27fb1c6
2019-03-22 18:21:19 +01:00
Mike Grabowski 60cf18fad4 [0.59.1] Bump version numbers 2019-03-14 12:12:02 +01:00
zhongwuzw 000119dea0 Fix build error warning of Text module (#23586)
Summary:
Throw error warning when build Text module, we can add tvOS available check to remove error.

[iOS] [Fixed] - Fix build error warning of Text module
Pull Request resolved: https://github.com/facebook/react-native/pull/23586

Differential Revision: D14181198

Pulled By: cpojer

fbshipit-source-id: 6a62c831ba119ddcbc6effa0b24f22bd4588b982
2019-03-13 17:52:46 +01:00
Mike Grabowski 7c73f2bb5a [0.59.0] Bump version numbers 2019-03-12 13:42:02 +01:00
Vishwesh Jainkuniya f6ca4d0a96 Add prop to configure `importantForAutofill`. (#22763)
Summary:
In API 26, autofill framework was introduced in Android.
Read more about Autofill at https://developer.android.com/guide/topics/text/autofill.

Now, if in case for some text input if developer wants to disable
autofill then he can take help from this `importantForAutoFill` prop
and pass `no` to it.

Also important of auto fill can be configured with this prop, like:
* `auto`: Let the Android System use its heuristics to determine if the view is important for autofill.
* `no`: This view isn't important for autofill.
* `noExcludeDescendants`: This view and its children aren't important for autofill.
* `yes`: This view is important for autofill.
* `yesExcludeDescendants`: This view is important for autofill, but its children aren't important for autofill.

Default value if `auto`.

Read more at: https://developer.android.com/guide/topics/text/autofill-optimize

Changelog:
----------
[Android] [Added] - Add prop to configure `importantForAutofill` in `TextInput`.
Pull Request resolved: https://github.com/facebook/react-native/pull/22763

Differential Revision: D14121242

Pulled By: cpojer

fbshipit-source-id: aa4360480dd19f6dde66f0409d26a41a6a318c94
2019-03-12 06:43:00 +01:00
Mike Grabowski 9cb4d3f2c1 [0.59.0-rc.3] Bump version numbers 2019-02-27 22:21:55 +01:00
Héctor Ramos 52cdb7cf26 React sync for revisions f24a0da...8e25ed2
Summary:
This sync includes the following changes:

- **[8e25ed20b](https://github.com/facebook/react/commit/8e25ed20b )**: Unify noop and test renderer assertion APIs (#14952) //<Andrew Clark>//
- **[870214f37](https://github.com/facebook/react/commit/870214f37 )**: Deprecate ref.setNativeProps in favor of ReactNative.setNativeProps (#14912) //<Eli White>//
- **[3989c0950](https://github.com/facebook/react/commit/3989c0950 )**: eslint-plugin-react-hooks@1.3.0 //<Dan Abramov>//
- **[1bbfbc98d](https://github.com/facebook/react/commit/1bbfbc98d )**: [ESLint] Add more cases to exhaustive-deps rule (#14930) //<Dan Abramov>//
- **[412f88296](https://github.com/facebook/react/commit/412f88296 )**: fix(eslint-plugin-react-hooks): node engine updated to version 7 because of object.entries(#14951) //<Farhad Yasir>//
- **[ba708fa79](https://github.com/facebook/react/commit/ba708fa79 )**: Remove ReactNoop.flushDeferredPri and flushUnitsOfWork (#14934) //<Andrew Clark>//
- **[920b0bbb3](https://github.com/facebook/react/commit/920b0bbb3 )**: [scheduler] Pass didTimeout argument to callbacks (#14931) //<Andrew Clark>//
- **[f99fca3cb](https://github.com/facebook/react/commit/f99fca3cb )**: Fix sample ESLint configuration (#14926) //<Matt Thomson>//
- **[22bb94764](https://github.com/facebook/react/commit/22bb94764 )**: Release eslint-plugin-react-hooks@1.2.0 //<Dan Abramov>//
- **[a77bbf1a1](https://github.com/facebook/react/commit/a77bbf1a1 )**: [ESLint] Warn against assignments from inside Hooks (#14916) //<Dan Abramov>//
- **[219ce8a9c](https://github.com/facebook/react/commit/219ce8a9c )**: Fix tracing fixture (#14917) //<Dan Abramov>//
- **[8c1966590](https://github.com/facebook/react/commit/8c1966590 )**: Release 16.8.3 //<Dan Abramov>//
- **[7de4d2391](https://github.com/facebook/react/commit/7de4d2391 )**: Fix UMD builds by re-exporting the scheduler priorities (#14914) //<Dan Abramov>//
- **[d0318fb3f](https://github.com/facebook/react/commit/d0318fb3f )**: Updating copyright headers, dropping the year (#14893) //<Nathan Hunzaker>//
- **[f978d5fde](https://github.com/facebook/react/commit/f978d5fde )**: Fix warning message for new setNativeProps method. on -> with (#14909) //<Eli White>//
- **[b0f45c0fc](https://github.com/facebook/react/commit/b0f45c0fc )**: Adding ReactNative.setNativeProps that takes a ref (#14907) //<Eli White>//
- **[4f4aa69f1](https://github.com/facebook/react/commit/4f4aa69f1 )**: Adding setNativeProps tests for NativeMethodsMixin (#14901) //<Eli White>//
- **[b96b61dc4](https://github.com/facebook/react/commit/b96b61dc4 )**: Use the canonical nativeTag for Fabric's setNativeProps (#14900) //<Eli White>//
- **[dab2fdbbb](https://github.com/facebook/react/commit/dab2fdbbb )**: Add eslint-plugin-react-hooks/exhaustive-deps rule to check stale closure dependencies (#14636) //<Dan Abramov>//
- **[1493abd7e](https://github.com/facebook/react/commit/1493abd7e )**: Deleted empty App.css (#14149) //<Josh R>//
- **[13645d224](https://github.com/facebook/react/commit/13645d224 )**: Deal with fallback content in Partial Hydration (#14884) //<Sebastian Markbåge>//
- **[c506ded3b](https://github.com/facebook/react/commit/c506ded3b )**: Don't discard render phase state updates with the eager reducer optimization (#14852) //<Dan Abramov>//
- **[0e67969cb](https://github.com/facebook/react/commit/0e67969cb )**: Prompt to include UMD build artifact links in GitHub release (#14864) //<Brian Vaughn>//
- **[fad0842fd](https://github.com/facebook/react/commit/fad0842fd )**: Release scripts documentation (#14863) //<Brian Vaughn>//
- **[ab7a67b1d](https://github.com/facebook/react/commit/ab7a67b1d )**: Fix react-dom/server context leaks when render stream destroyed early (#14706) //<overlookmotel>//
- **[3e5556043](https://github.com/facebook/react/commit/3e5556043 )**: Release 16.8.2 //<Dan Abramov>//
- **[dfabb77a9](https://github.com/facebook/react/commit/dfabb77a9 )**: Include another change in 16.8.2 //<Dan Abramov>//
- **[c555c008b](https://github.com/facebook/react/commit/c555c008b )**: Include component stack in 'act(...)' warning (#14855) //<Sunil Pai>//
- **[ff188d666](https://github.com/facebook/react/commit/ff188d666 )**: Add React 16.8.2 changelog (#14851) //<Dan Abramov>//
- **[c4d8ef643](https://github.com/facebook/react/commit/c4d8ef643 )**: Fix typo in code comment (#14836) //<Deniz Susman>//
- **[08e955435](https://github.com/facebook/react/commit/08e955435 )**: Statically enable suspense/partial hydration flag in www (#14842) //<Sebastian Markbåge>//
- **[0e4135e8c](https://github.com/facebook/react/commit/0e4135e8c )**: Revert "[ShallowRenderer] Queue/rerender on dispatched action after render component with hooks (#14802)" (#14839) //<Dan Abramov>//
- **[6d4038f0a](https://github.com/facebook/react/commit/6d4038f0a )**: [ShallowRenderer] Queue/rerender on dispatched action after render component with hooks (#14802) //<Rodrigo Ribeiro>//
- **[fa6205d52](https://github.com/facebook/react/commit/fa6205d52 )**: Special case crossOrigin for SVG image elements (#14832) //<Brandon Dail>//
- **[c6bee765b](https://github.com/facebook/react/commit/c6bee765b )**: Remove false positive warning and add TODOs about `current` being non-null (#14821) //<DanAbramov>//
- **[3ae94e188](https://github.com/facebook/react/commit/3ae94e188 )**: Fix ignored sync work in passive effects (#14799) //<Dan Abramov>//
- **[f3a14951a](https://github.com/facebook/react/commit/f3a14951a )**: Partial Hydration (#14717) //<Sebastian Markbåge>//

Changelog:

[GENERAL] [Changed] React sync for revisions f24a0da...22bb947

Reviewed By: gaearon

Differential Revision: D14160361

fbshipit-source-id: fffdc922f3ee5dfeeee656a8f213a6d3c03e8481
2019-02-27 21:24:27 +01:00
Eric Lewis c1392c2ff3 Toggle secureTextEntry cursor spacing (#23524)
Summary:
This is a fix for #5859, based on the feedback in #18587. Instead of using `didSetProps` it uses a setter. I will also note that setting to `nil` no longer works (crashes) so setting it to a blank string then back to the original works fine.

[iOS] [Fixed] - Toggling secureTextEntry correctly places cursor.
Pull Request resolved: https://github.com/facebook/react-native/pull/23524

Differential Revision: D14143028

Pulled By: cpojer

fbshipit-source-id: 5f3203d56b1329eb7359465f8ab50eb4f4fa5507
2019-02-27 21:22:31 +01:00
Levi Buzolic dff3f609f4 Map TextInput textContentType strings to Objective-C constants (#22611)
Summary:
This is an updated version of #22579 which uses compile conditionals to prevent `use of undeclared identifier` errors when compiling on older versions of Xcode.

--------

Currently the only `textContentType` values that work are: `username`, `password`, `location`, `name` and `nickname`. This is due to the strings provided by React Native not matching up with the underlying string constants used in iOS (with the exception of the aforementioned types). Issue #22578 has more detail examples/explanation.
Pull Request resolved: https://github.com/facebook/react-native/pull/22611

Differential Revision: D13460949

Pulled By: cpojer

fbshipit-source-id: e6d1108422b850ebc3aea05693ed05118b77b5de
2019-02-27 21:14:20 +01:00
Mike Grabowski 40603bc9c4 [0.59.0-rc.2] Bump version numbers 2019-02-18 18:04:25 +01:00
Cassio Zen 179d490607 Add autoComplete prop (#21575)
Summary:
TL;DR: Setting `autoComplete` will allow the system to suggest autofill options for the `<TextInput>` component.

Android Oreo introduced the AutoFill Framework, for secure communication between an app and autofill services (e.g. Password managers). When using `<TextInput>` on Android Oreo+, the system already tries to autofill (based on heuristics), but there is no way to set configuring options or disable.

The quick solution would be to just add the same Android attributes (`autofillHints` & `importantForAutofill`) in React Native TextInput, but that doesn't bond well with the cross-platform nature of the library.

Introduces an `autoComplete` prop based on HTML's `autocomplete` attribute, mapping to Android `autofillHints` & `importantForAutofill` and serving as a proper placeholder for autofill/autocomplete in other platforms:

Also gives you the ability to disable autofill by setting autocomplete="off".
Pull Request resolved: https://github.com/facebook/react-native/pull/21575

Differential Revision: D14102949

Pulled By: hramos

fbshipit-source-id: 7601aeaca0332a1f3ce8da8020dba037b700853a
2019-02-18 17:30:38 +01:00
Mike Grabowski 1768655971 [0.59.0-rc.1] Bump version numbers 2019-02-15 16:38:54 +01:00
Mike Grabowski 560a484fc6 Revert "[0.59.0-rc.1] Bump version numbers"
This reverts commit 199de26f42.
2019-02-15 15:36:00 +01:00
Mike Grabowski 199de26f42 [0.59.0-rc.1] Bump version numbers 2019-02-14 10:12:20 +01:00
Héctor Ramos 5a314690f2 [0.59.0-rc.0] Bump version numbers 2019-02-13 12:14:47 -08:00
Héctor Ramos 2bc055a227 Revert "[0.59.0-rc.0] Bump version numbers"
This reverts commit af6de4e8c8.
2019-02-13 12:13:49 -08:00
Héctor Ramos af6de4e8c8 [0.59.0-rc.0] Bump version numbers 2019-02-13 12:03:09 -08:00
Héctor Ramos cef5ad6964 Revert "[0.59.0-rc.0] Bump version numbers"
This reverts commit 517c165dae.
2019-02-13 11:52:49 -08:00
Mike Grabowski 517c165dae [0.59.0-rc.0] Bump version numbers 2019-02-13 20:15:31 +01:00
Mike Grabowski 8b75677fdb Revert "[0.59.0-rc.0] Bump version numbers"
This reverts commit d47aa28ef7.
2019-02-13 20:15:00 +01:00
Mike Grabowski d47aa28ef7 [0.59.0-rc.0] Bump version numbers 2019-02-13 18:04:43 +01:00
Mike Grabowski a962cb659f Revert "[0.59.0-rc.0] Bump version numbers"
This reverts commit d059e74704.
2019-02-13 17:10:19 +01:00
Mike Grabowski d059e74704 [0.59.0-rc.0] Bump version numbers 2019-02-13 16:47:58 +01:00
Mike Grabowski 9f96606d32 Revert "[0.59.0-rc.0] Bump version numbers"
This reverts commit 69e5c2ddc1.
2019-02-13 16:47:27 +01:00
Mike Grabowski 69e5c2ddc1 [0.59.0-rc.0] Bump version numbers 2019-02-13 16:37:12 +01:00
Wellinton Monge e2bd7db732 Merge AlertIOS with Alert (#23318)
Summary:
Itwas merged AlertIOS into Alert and removed type parameter from Alert.alert line 60 at Alert.js

[AlertIOS] [Change and Replace] - Merge AlertIOS into Alert.
Pull Request resolved: https://github.com/facebook/react-native/pull/23318

Reviewed By: mjesun

Differential Revision: D14031421

Pulled By: cpojer

fbshipit-source-id: 98db173adeb65aa90d309f8a583993bc0cddb6e1
2019-02-12 07:38:42 -08:00
Mike Nedosekin 4ac65f5413 Add deprecation warning for MaskedViewIOS (#23398)
Summary:
Add a deprecation warning for the [MaskedViewIOS](https://facebook.github.io/react-native/docs/maskedviewios) module as part of #23313.
[General] [Deprecated] - Deprecated [MaskedViewIOS](https://facebook.github.io/react-native/docs/maskedviewios) as it has now been moved to [react-native-community/masked-view](https://github.com/react-native-community/react-native-masked-view)
Pull Request resolved: https://github.com/facebook/react-native/pull/23398

Differential Revision: D14045290

Pulled By: cpojer

fbshipit-source-id: e97230f6861cf35ee0b49376d0a5c9c47d4e99f8
2019-02-12 07:14:02 -08:00
ferrannp 77300ca91c Add deprecation warning for ViewPagerAndroid (#23395)
Summary:
Add a deprecation warning for the [ViewPagerAndroid](https://facebook.github.io/react-native/docs/viewpagerandroid) module as part of #23313.

[General] [Deprecated] - Deprecated [ViewPagerAndroid](https://facebook.github.io/react-native/docs/viewpagerandroid) as it has now been moved to [react-native-community/viewpager](https://github.com/react-native-community/react-native-viewpager)
Pull Request resolved: https://github.com/facebook/react-native/pull/23395

Differential Revision: D14043025

Pulled By: cpojer

fbshipit-source-id: 2f7988fe69dbeff0f3add9babcb15d7eb974863e
2019-02-12 05:26:11 -08:00
Evan Bacon daa79b0f97 Add Platform module for web target (#23387)
Summary:
Added a Platform file for module for instances where internal modules need Platform.
ex: 78be6efda9/Libraries/Utilities/Dimensions.js (L14)

* Added `Libraries/Utilities/Platform.web.js`
[CATEGORY] [TYPE] - Message
Pull Request resolved: https://github.com/facebook/react-native/pull/23387

Differential Revision: D14041834

Pulled By: cpojer

fbshipit-source-id: 9be7ad647d6a644956efa622b936fcecee7c1a1f
2019-02-12 03:32:29 -08:00
Spencer Ahrens 864a30185d Add more init perf markers
Summary:
Adding some more systrace markers to track load application and the initial bits of MarketplaceHomeApp.

There are a couple big segments worth pointing out with timing from a local `__DEV__: false` run:

* JSBundleRequireTime_end -> BundlePreInitializeCore_start: 360ms
* MobileConfigModuleInit: 210ms
* renderApplication_React_render_start -> MarketplaceHomeAppConstructorSuper_start: 180ms
* MarketplaceHomeAppGetQueryParamsForCachedTopPicks: 100ms

I'm not sure what we can do about any of these except for MarketplaceHomeAppGetQueryParamsForCachedTopPicks where we could break the query params out into a separate file so we don't have to load this 11-thousand-line behemoth just so we can get this snippet:

diffusion/FBS/browse/master/xplat/js/RKJSModules/Apps/Wilde/Marketplace/apps/__generated__/MarketplaceHomeAppQuery.graphql.js$11831-11837

But maybe we have to load it anyway and the query just needs to be optimized (or maybe Relay can optimize the format here).

Reviewed By: yungsters

Differential Revision: D13969695

fbshipit-source-id: 4f39efa6cb591b814687bfe51b02ad92048f1c21
2019-02-11 16:50:40 -08:00
Héctor Ramos 2af13b4477 React sync for revisions aa94237...f24a0da
Summary:
This sync includes the following changes:
- **[f24a0da6e](https://github.com/facebook/react/commit/f24a0da6e )**: Fix useImperativeHandle to have no deps by default (#14801) //<Dan Abramov>//
- **[1fecba923](https://github.com/facebook/react/commit/1fecba923 )**: Fix crash unmounting an empty Portal (#14820) //<Dan Abramov>//
- **[c11015ff4](https://github.com/facebook/react/commit/c11015ff4 )**: fix spelling mistakes (#14805) //<zhuoli99>//
- **[3e295edd5](https://github.com/facebook/react/commit/3e295edd5 )**: Typo fix in comment (#14787) //<Deniz Susman>//
- **[1d48b4a68](https://github.com/facebook/react/commit/1d48b4a68 )**: Fix hydration with createRoot warning (#14808) //<Sebastian Markbåge>//

Release Notes:
[GENERAL] [Changed] - React sync for revisions aa94237...f24a0da

Reviewed By: cpojer

Differential Revision: D14030552

fbshipit-source-id: f8df9d8e532b2afef59dbbc10715bd52fd22b355
2019-02-11 15:26:44 -08:00
zhongwuzw 9ff43abe65 Prevent crash when scrollEnabled used in singleline textinput (#23361)
Summary:
Fixes #22949 , #21339. Currently, multiline textInput uses `UITextView` but singleline textInput uses `UITextField`, so singleline textinput may crash when use `scrollEnabled` property.

[iOS] [Fixed] - Prevent crash when scrollEnabled used in singleline textinput
Pull Request resolved: https://github.com/facebook/react-native/pull/23361

Differential Revision: D14030586

Pulled By: cpojer

fbshipit-source-id: a8ae1b4e168469e65745c4d5e9329df8b6faa2aa
2019-02-11 14:52:59 -08:00
Matt Oakes d9c0dfe353 Add a deprecation warning when importing NetInfo (#23383)
Summary:
Add a deprecation warning for the `NetInfo` module as part of #23313.

[General] [Deprecated] - Deprecated NetInfo as it has now been moved to react-native-community/netinfo
Pull Request resolved: https://github.com/facebook/react-native/pull/23383

Differential Revision: D14024702

Pulled By: cpojer

fbshipit-source-id: 353a9fb86feba2ca7f948c618c642e40fcdbfada
2019-02-11 13:45:47 -08:00
michalchudziak bf888a7582 Add deprecation warning while importing Slider component (#23385)
Summary:
Introducing the deprecation warning for those who are importing `Slider` component (https://github.com/facebook/react-native/issues/23313)

[General] [Deprecated] - Deprecated Slider as it has now been moved to `react-native-community/slider`
Pull Request resolved: https://github.com/facebook/react-native/pull/23385

Differential Revision: D14029819

Pulled By: cpojer

fbshipit-source-id: 7ad257124756c6bee57c3fbb1a056c09e8cc29a1
2019-02-11 13:40:52 -08:00
Krzysztof Borowy ffe37487b2 Deprecation warning for AsyncStorage (#23384)
Summary:
Added a deprecation warning for the `Async Storage`,  module as part of #23313.

[General] [Deprecated] - Async Storage [was moved to community repo](https://github.com/react-native-community/react-native-async-storage)
Pull Request resolved: https://github.com/facebook/react-native/pull/23384

Differential Revision: D14025255

Pulled By: cpojer

fbshipit-source-id: 5cabd76c650126ed77dfb8b714e05980c4d0b6da
2019-02-11 13:35:01 -08:00
gengjiawen 392e89676f add prettier check in ci (#23382)
Summary:
enforce code format
Pull Request resolved: https://github.com/facebook/react-native/pull/23382

Differential Revision: D14024609

Pulled By: cpojer

fbshipit-source-id: 21176cf8f009987e5a281bbead414374632eabee
2019-02-11 09:06:43 -08:00
Evan Bacon 62599fa8ff Add deprecation notice to ImageStore (#23330)
Summary:
- Related: #23313
- ImageStore is **iOS only**. AFAIK there is no reason this functionality isn't available on Android.
- base64 is very inefficient with the React Native bridge
- Ideally the `FileSystem` solutions will integrate Turbo Modules to circumvent bridge issues by passing direct references to files.

* [General][added] - A deprecation notice with info about third-party solutions for getting a base64-encoded string.
* [General][fixed] - Missing warnings for unimplemented platform methods.
Pull Request resolved: https://github.com/facebook/react-native/pull/23330

Differential Revision: D14022159

Pulled By: cpojer

fbshipit-source-id: 2a026ebf47cb315e9a0cfe6e3697a1799c5cbe2c
2019-02-11 01:24:03 -08:00