Commit Graph

1196 Commits

Author SHA1 Message Date
Christoph Nakazawa cfef04e760 Remove fbjs/lib/emptyFunction from react-native
Summary: This removes `emptyFunction` usage from react-native.

Reviewed By: yungsters

Differential Revision: D13138187

fbshipit-source-id: eaa327884aac2cabb99024077e3407cb99c946d2
2018-11-26 06:28:25 -08:00
Christoph Nakazawa 2de01cb54d Inline `extractSingleTouch` from fbjs
Summary: There is only a single use of this function across RN, and one more use in a test file. I inlined this function in both places to reduce the dependency on fbjs.

Reviewed By: yungsters

Differential Revision: D13138137

fbshipit-source-id: 32660c965a975d17e236bdd13ff0b2a8d64751ee
2018-11-26 06:28:25 -08:00
Le Xu c3dea894bd Back out "[react-native][PR] [flow-strict] Flow strict StatusBar"
Summary:
Original commit changeset: 27f69c6df3a8

This reverts D13103971

Differential Revision: D13185679

fbshipit-source-id: 0de9da31bd75786c7978e2c3860486ac37420342
2018-11-23 12:15:28 -08:00
mottox2 3649a503cf Flow TouchableNativeFeedback.android.js (#22176)
Summary:
Related to #22100

Turn Flow strict mode on for Libraries/Components/Touchable/TouchableNativeFeedback.android.js.
Pull Request resolved: https://github.com/facebook/react-native/pull/22176

Reviewed By: TheSavior

Differential Revision: D13033239

Pulled By: RSNara

fbshipit-source-id: 57e89ce16040e6238e01e0437327db943a5f2581
2018-11-21 14:45:15 -08:00
Yu Watanabe 6fa997dd63 Flow strict StatusBar (#22282)
Summary:
Related to #22100

`Libraries/Components/StatusBar/StatusBar.js`
Enhance StatusBar with mergePropsStack and _defaultProps.

- [x] npm run prettier
- [x] npm run flow
- [x] npm run flow-check-ios
- [x] npm run flow-check-android
- [x] npm run lint
- [x] npm run test
- [x] ./scripts/run-android-local-unit-tests.sh

[GENERAL][ENHANCEMENT][StatusBar.js] - apply flow strict-local
Pull Request resolved: https://github.com/facebook/react-native/pull/22282

Reviewed By: TheSavior

Differential Revision: D13103971

Pulled By: RSNara

fbshipit-source-id: 27f69c6df3a8a7792fcd595c0ff362943ccab8ca
2018-11-21 14:42:09 -08:00
Tnarita0000 c127000a7d Flow strict-local in TimePickerAndroid.android.js (#22188)
Summary:
Related to #22100 . I had this issue before(#22154 & #22172).

Turn Flow strict mode on for Libraries/Components/TimePickerAndroid/TimePickerAndroid.android.js.

- [x] npm run prettier
- [x] npm run flow
- [x] npm run flow-check-ios
- [x] npm run flow-check-android
- [x] npm run lint
- [x] npm run test
- [x] ./scripts/run-android-local-unit-tests.sh

[GENERAL][ENHANCEMENT][TimePickerAndroid.android.js] - apply flow strict-local
Pull Request resolved: https://github.com/facebook/react-native/pull/22188

Reviewed By: TheSavior

Differential Revision: D12972356

Pulled By: RSNara

fbshipit-source-id: 838604a791dfdc86bacf8b49f6c399920a3f57bc
2018-11-21 14:42:09 -08:00
Yosuke Saito fb4825a2c6 Flow strict ScrollResponder (#22181)
Summary:
Related to #22100

Enhance Flow types for Libraries/Components/ScrollResponder.js
Pull Request resolved: https://github.com/facebook/react-native/pull/22181

Reviewed By: TheSavior

Differential Revision: D13032699

Pulled By: RSNara

fbshipit-source-id: ca0ce178a96008a71016d033ee1154ad807d6599
2018-11-21 14:42:09 -08:00
Thomas BARRAS a97d104b44 Flow strict TouchableHighlight (#22173)
Summary:
Related to #22100

Enhance Flow types for TouchableOpacity specifying underlay functions and TvParallaxPropertiesType.
I had to export and enhance TvParallaxPropertiesType from TVViewPropTypes file. This does not break this other PR also using this exported type. #22146

There is still some work to do in order to turn flow to strict mode.

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [TouchableHighlight.js] - Flow types
[GENERAL] [ENHANCEMENT] [TVViewPropTypes.js] - Export and enhance type
Pull Request resolved: https://github.com/facebook/react-native/pull/22173

Differential Revision: D13033441

Pulled By: RSNara

fbshipit-source-id: 26a38970923dc7e6c02c03da5d08483a3f1fbd36
2018-11-21 14:36:33 -08:00
Ramanpreet Nara da0b139b56 Improve Flow types
Summary:
Some of the flow types were incomplete. So, I referenced the code in  `~/fbsource/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/views/textinput/` and in `~/fbsource/xplat/js/react-native-github/Libraries/Text/TextInput/` to make the flow types more specific.

I also fixed internal breakages. To avoid having to sprinkle `$FlowFixMe`s everywhere, I had to refactor some types, and some code.

Reviewed By: TheSavior

Differential Revision: D13121871

fbshipit-source-id: 9796aafc861544baf52d7ade823ab1be2d3f12d1
2018-11-21 14:33:48 -08:00
Thomas BARRAS 35a65cd704 Flow strict TextInput (#22250)
Summary:
Related to #22100

Enhance TextInput with callback event types.
This is a first draft and I will need more help on this one. Flow checks are successful now but I am not sure types are accurate though.
Moreover I find my separation approach kind of dirty for callback event types.

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [TextInput.js] - Flow types
[GENERAL] [ENHANCEMENT] [TextInputExample.android.js] - Fixing Flow types
[GENERAL] [ENHANCEMENT] [TextInputExample.ios.js] - Fixing Flow types
[GENERAL] [ENHANCEMENT] [XHRExampleFetch.js] - Fixing Flow types
Pull Request resolved: https://github.com/facebook/react-native/pull/22250

Reviewed By: TheSavior

Differential Revision: D13104820

Pulled By: RSNara

fbshipit-source-id: 3fbb98d0ec2b62be676f71ae1053933d9c78485e
2018-11-21 14:33:48 -08:00
Thomas BARRAS 45c51835d6 Flow strict TouchableBounce (#22197)
Summary:
Related to #22100

Enhance TouchableBounce with press event types, callback and hitslop types.

There is still some work to do in order to turn flow to strict mode. (requireNativeComponent and render function)

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [TouchableBounce.js] - Flow types
Pull Request resolved: https://github.com/facebook/react-native/pull/22197

Reviewed By: TheSavior

Differential Revision: D13032452

Pulled By: RSNara

fbshipit-source-id: b21140722ce924698aa15323602e2e3fc663dbb6
2018-11-21 14:24:55 -08:00
gazoudoudou 27cfba2882 Remove useless additionnal blur call (#22156)
Summary:
I noticed that the _onBlur method was not exactly similar to the _onFocus one in the TextInput component.

After digging, I found that the blurTextInput method in the TextInputState.js file was call twice in a raw instead of once when the textinput component should blur.

By removing this line, I fix this unecessary multiple call.
Pull Request resolved: https://github.com/facebook/react-native/pull/22156

Reviewed By: TheSavior

Differential Revision: D13105396

Pulled By: RSNara

fbshipit-source-id: 8e83461d8b288d8ee4047bc4a33c4480e193c349
2018-11-19 18:53:56 -08:00
empyrical bea3bb6956 DrawerLayoutAndroid: Convert to ES6 class (#21980)
Summary:
This pull requests converts `DrawerLayoutAndroid` from a `createReactClass`-based component to an ES6 class component, removing its use of `NativeMethodsMixin` and `prop-types` in the process.

Unfortunately this couldn't be moved over to a full `forwardRef` to the native component, because it has the methods `openDrawer` and `closeDrawer` as part of its API, and they can't be called directly on the native component. A `createRef`-based ref to the native component can be accessed from the `nativeRef` property of a `DrawerLayoutAndroid` instance if a native ref is needed.

The Flow types for callbacks have also been filled out.
Pull Request resolved: https://github.com/facebook/react-native/pull/21980

Reviewed By: TheSavior

Differential Revision: D12901951

Pulled By: RSNara

fbshipit-source-id: d35fa5f11b1059f49b466b52abeec902db1d22f7
2018-11-17 03:24:28 -08:00
Spencer Ahrens 6f34bc4016 Back out "reapply TextInput es6 conversion with fixes, attemps to fix"
Summary:
Back it out again. This time really not sure why this is breaking, but it seems to be production only. The error seems to be "RCTSinglelineTextInputView" was not found in the UIManager" but the relavent logic is not changed in this diff, just moved around, so unclear why it would trigger a failure.

Reverting to be safe. When we re-apply the diff, we'll need to test a full OTA to prod to verify the fix.

Reviewed By: blairvanderhoof

Differential Revision: D13108463

fbshipit-source-id: 5f877a0c1a08dc114ce45921d6d92bf619575977
2018-11-16 14:50:23 -08:00
Jonathan Lee 383ea9923a Add bounce method to TouchableBounce
Summary: Adds a `bounce` method that just bounces the element without invoking any callbacks.

Differential Revision: D13085800

fbshipit-source-id: 310b273b260c924fbde32bfad1de7226d068bd57
2018-11-16 12:03:29 -08:00
Panagiotis Vekris 8fb228f313 Flow v0.86.0 in xplat/js
Summary:
allow-large-files
bypass-lint
ignore-conflict-markers
ignore-signed-source
ignore-nocommit

drop-conflicts

Reviewed By: yungsters

Differential Revision: D13081129

fbshipit-source-id: fbb0ccaf3c0a2f224a56f6f6ac6c26811ebba583
2018-11-16 10:43:16 -08:00
Spencer Ahrens 9ea1295179 reapply TextInput es6 conversion with fixes, attemps to fix
Summary: D10515754 reapplied by backing out D12989604 and then fixed by manually forwarding the instance methods to the host function instead of using `forwardRef`. This also removes the need for the $flowFixMe.

Reviewed By: TheSavior

Differential Revision: D13048482

fbshipit-source-id: ff2447aff123e0960eddaef645f7dc976a426e14
2018-11-15 20:51:52 -08:00
Spencer Ahrens a00940693e New TextInput-test that would have prevented S168585
Summary: Adds a basic test that would have prevented S168585. We should expand coverage of this and other components as well.

Reviewed By: TheSavior

Differential Revision: D13038064

fbshipit-source-id: 14cf4742efd53d7bca2a3f8d1c5c34ebc6227674
2018-11-15 20:51:52 -08:00
Stephy Ma 984eef8f9e Revert D12994045: Flow v0.86.0 in xplat/js [3/n]
Differential Revision:
D12994045

Original commit changeset: 04552bf081ba

fbshipit-source-id: 062b367b88a966a6efc895c99e9911f0ec0fe8ff
2018-11-14 23:04:04 -08:00
Panagiotis Vekris 43ad3a64e6 Flow v0.86.0 in xplat/js [3/n]
Summary:
allow-large-files
bypass-lint
ignore-conflict-markers
ignore-signed-source
ignore-nocommit

drop-conflicts

Reviewed By: avikchaudhuri

Differential Revision: D12994045

fbshipit-source-id: 04552bf081ba742de58e80fba08f8280cb86b1c3
2018-11-14 22:13:27 -08:00
Eli White f386f831d2 Back out TextInput es6 conversion
Summary:
This was failing due to issues with refs, which we were able to fix and then finally due to some jest tests that were failing due to things being null that shouldn't be which I couldn't easily figure out. Reverting the stack until we can actually solve it, hopefully with additional tests.

This was created by running:

```
$ hg backout c2fe2c46e538
fetching tree '' b9bbfc1925c6daf85ba3227d12f177aca9c0c054, based on 4257c76aefa84aaa17279e65aa7ca1174f4401e7, found via 02368b670953
connected to hg015.frc2.facebook.com
60 trees fetched over 2.91s
fetching tree '' c3c304df13399f0f1a29a668242da454fc1d8a97, based on b9bbfc1925c6daf85ba3227d12f177aca9c0c054, found via c2fe2c46e538
7 trees fetched over 0.03s
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
commit 4270328:50a65c5c2e27 backs out commit 4266783:c2fe2c46e538
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over 0.57s
[twsvcscm@sandcastle3265.ftw1 /data/sandcastle/boxes/instance-ide/xplat/js (50a65c5)]$ hg backout 02368b670953
fetching tree '' a46c8ca065f5b92cf375d7ed899fc5ca268ba4da, based on b9bbfc1925c6daf85ba3227d12f177aca9c0c054, found via bade4285eafb
connected to hg024.frc2.facebook.com
27 trees fetched over 3.21s
fetching tree '' 361548a090e81d18bab6f4fc16036c518cb4d7c1, based on a46c8ca065f5b92cf375d7ed899fc5ca268ba4da, found via bade4285eafb
41 trees fetched over 0.10s
merging react-native-github/Libraries/Components/TextInput/TextInput.js
8 files updated, 1 files merged, 0 files removed, 0 files unresolved
commit 4270329:dbaca0daf0ac backs out commit 4266782:02368b670953
14 files fetched over 7 fetches - (14 misses, 0.00% hit ratio) over 1.72s
[twsvcscm@sandcastle3265.ftw1 /data/sandcastle/boxes/instance-ide/xplat/js (dbaca0d)]$ hg backout bade4285eafb
connected to hg030.frc2.facebook.com
fetching tree '' 1b4a17164fdbfcad40139e46da4a9bfa8aa8def3, based on 361548a090e81d18bab6f4fc16036c518cb4d7c1, found via 5cfb25344385
7 trees fetched over 0.06s
merging react-native-github/Libraries/Components/TextInput/TextInput.js
20 files updated, 1 files merged, 0 files removed, 0 files unresolved
commit 4270330:2951740e5b32 backs out commit 4266781:bade4285eafb
33 files fetched over 14 fetches - (33 misses, 0.00% hit ratio) over 4.50s
[twsvcscm@sandcastle3265.ftw1 /data/sandcastle/boxes/instance-ide/xplat/js (2951740)]$ hg backout 5cfb25344385
connected to hg035.frc2.facebook.com
merging react-native-github/Libraries/Components/TextInput/TextInput.js
0 files updated, 1 files merged, 2 files removed, 0 files unresolved
commit 4270331:fffb4629a397 backs out commit 4266780:5cfb25344385
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over 4.03s
```

Reviewed By: yungsters

Differential Revision: D12989604

fbshipit-source-id: 703a7c9c1f5bdd710077e515bdff06fdb34502ec
2018-11-08 17:59:10 -08:00
Eli White e6a8dca6f7 TextInput add back propTypes
Reviewed By: yungsters

Differential Revision: D12969854

fbshipit-source-id: c2fe2c46e538f8b5e3ea46257aef70d00bf14364
2018-11-07 18:44:40 -08:00
Eli White 7e818aed9a Fixing TextInput related jest tests
Reviewed By: yungsters

Differential Revision: D10519823

fbshipit-source-id: 02368b670953a0275fa6495b0c73ef84403598cb
2018-11-07 18:44:40 -08:00
Eli White ad7d8f89ef Fix internal types on top of TextInput refactor
Summary:
Types were moved out of TextInput into TextInputTypes for better re-use. Fixing the internal callsites.

This isn't much of a worry externally because these types aren't exposed as part of the public API

Reviewed By: RSNara

Differential Revision: D10517066

fbshipit-source-id: bade4285eafb3d7ab5ab1e4b0730c22d45925509
2018-11-07 18:44:40 -08:00
empyrical 70e9e2665b TextInput: Remove PropTypes, NativeMethodsMixin; Convert to ES6 class (#21885)
Summary:
This pull requests converts `TextInput` to an ES6 class, and in the process removes its usage of `prop-types` and `NativeMethodsMixin`.

The code (and some relevant types) for the native components have been moved to `TextInputNativeComponent.js`.

The rest of the flow proptypes have been moved to `TextInputTypes.js`.
Pull Request resolved: https://github.com/facebook/react-native/pull/21885

Reviewed By: RSNara

Differential Revision: D10515754

Pulled By: TheSavior

fbshipit-source-id: 5cfb25344385904b37a49582008c2a4b46db809d
2018-11-07 18:44:40 -08:00
Ignacio Olaciregui 41eb2da33b Fix inline styles warning in Libraries (#22161)
Summary:
Fixes `react-native/no-inline-styles` eslint warnings in the `Libraries` module.
Pull Request resolved: https://github.com/facebook/react-native/pull/22161

Differential Revision: D12946899

Pulled By: TheSavior

fbshipit-source-id: c97ffa50dd90529dabf30a3d2cb09476acc568cb
2018-11-06 14:32:43 -08:00
Thomas BARRAS 69213eea95 Flow strict TouchableOpacity (#22146)
Summary:
Related to #22100

Enhance Flow types for TouchableOpacity specifying Touchable event types and TvParallaxPropertiesType.
I had to export TvParallaxPropertiesType from TVViewPropTypes file.
There are still 1 any left using requireNativeComponent and a dependency to `Touchable` that need to be addressed to turn Flow to strict mode.

I guess `Touchable` is a lot more work since there's no flow annotation and it's still good old Mixin.

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [TouchableOpacity.js] - Flow types
[GENERAL] [ENHANCEMENT] [TVViewPropTypes.js] - Export type
Pull Request resolved: https://github.com/facebook/react-native/pull/22146

Reviewed By: TheSavior

Differential Revision: D12927044

Pulled By: RSNara

fbshipit-source-id: c63d805699dd58e2fbc4fd1df4ee0c9f87e2336a
2018-11-06 14:07:05 -08:00
Thomas BARRAS c03fc4087f Flow strict Slider (#22127)
Summary:
Related to #22100

Turn on Flow strict mode for Slider.
Enhanced event type and props callbacks type defs for Slider.

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [Slider.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22127

Differential Revision: D12946817

Pulled By: TheSavior

fbshipit-source-id: 631391f70c04fddf0bfa6fec92f5cb769a555547
2018-11-06 13:55:03 -08:00
nd-02110114 636e146c4a Flow strict in ViewPagerAndroid.android.js (#22134)
Summary:
Related to #22100

Turn Flow strict mode on for Libraries/Components/ViewPager/ViewPagerAndroid.android.js

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android

[GENERAL] [ENHANCEMENT] [Libraries/Components/ViewPager/ViewPagerAndroid.android.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22134

Differential Revision: D12930719

Pulled By: TheSavior

fbshipit-source-id: 9519f31b7af27f0497e42fd51f18c19be3692823
2018-11-05 15:29:17 -08:00
flowkraD f9050e0908 Flow strict DrawerLayout (#22152)
Summary:
Issue in focus: #22100

The only occurrence of `Object` was replaced with the appropriate flow type
A Lint error was encountered in `deepFreezeAndThrowOnMutationInDev-test.js` when running `npm run lint` and was fixed by running `yarn prettier`
Pull Request resolved: https://github.com/facebook/react-native/pull/22152

Differential Revision: D12930872

Pulled By: RSNara

fbshipit-source-id: f9706ed2e49d9ccedfa331594c886d2d3b615db5
2018-11-05 15:05:25 -08:00
Thomas BARRAS 6476151717 Flow strict StaticContainer (#22121)
Summary:
Related to #22100

Turn on Flow strict mode for StaticContainer.react
This component needed proper Props type definition. I went through the only component (`TabBarItemIOS.ios`) using this to try to know the most appropriate props.

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [StaticContainer.react.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22121

Differential Revision: D12929646

Pulled By: TheSavior

fbshipit-source-id: 8826aa7bc83c854efdd71cdb4fba3d7ca98f2fce
2018-11-05 14:49:57 -08:00
Thomas BARRAS 84c5416617 Flow type RefreshControl (#22119)
Summary:
Related to #22100

Enhance Flow types for RefreshControl specifying `onRefresh` props type.
There are still 2 `any` left using `requireNativeComponent` that need to be addressed to turn Flow to strict mode.

I went through `RCTRefreshControl` and `AndroidSwipeRefreshLayout` classes to understand where this method came from.

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [RefreshControl.js] - Flow onRefresh type
Pull Request resolved: https://github.com/facebook/react-native/pull/22119

Differential Revision: D12919764

Pulled By: TheSavior

fbshipit-source-id: 9ba675be8dbce77d77972acb904fc13c68524831
2018-11-05 13:54:41 -08:00
nd-02110114 0ea95e70a3 remove createReactClass from SegmentedControlIOS.ios.js (#21888)
Summary:
Related to #21581 .
Removed createReactClass from the SegmentedControlIOS.ios.js

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android
[GENERAL] [ENHANCEMENT] [Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js] - remove createReactClass dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21888

Reviewed By: TheSavior

Differential Revision: D12827447

Pulled By: RSNara

fbshipit-source-id: 74a91bcba131d9a34a136c6127459a40424a0738
2018-11-05 11:25:14 -08:00
nd-02110114 147c38a7f2 remove createReactClass from ToolbarAndroid/ToolbarAndroid.android.js (#21893)
Summary:
Related to #21581 .
Removed createReactClass from the Libraries/Components/ToolbarAndroid/ToolbarAndroid.android.js

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android
[GENERAL] [ENHANCEMENT] [Libraries/Components/ToolbarAndroid/ToolbarAndroid.android.js] - remove createReactClass dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21893

Reviewed By: TheSavior

Differential Revision: D12826971

Pulled By: RSNara

fbshipit-source-id: 3d3fb88a3c9faf3ef89e386ca0d41d939f5d14dd
2018-11-05 11:05:36 -08:00
nd-02110114 fbc5a4f5e6 Turn Flow strict mode on for KeyBoard (#22114)
Summary:
Related to #22100

Turn Flow strict mode on for KeyBoard

- [x] npm run prettier
- [ ] npm run flow-check-ios
- [ ] npm run flow-check-android

This error was happend #22101 #22048

[GENERAL] [ENHANCEMENT] [Components/Keyboard/Keyboard.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22114

Differential Revision: D12920947

Pulled By: TheSavior

fbshipit-source-id: 8d72019efd4d30032ce4784764e5deb9c60e7b01
2018-11-04 23:05:54 -08:00
nd-02110114 3c0211b61a Turn Flow strict mode on for DatePickerIOS (#22105)
Summary:
Related to #22100

Turn Flow strict mode on for DatePickerIOS.

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android

This error was happend #22101 #22048

[GENERAL] [ENHANCEMENT] [Components/DatePicker/DatePickerIOS.ios.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22105

Differential Revision: D12920939

Pulled By: TheSavior

fbshipit-source-id: aae5ca04d656abb1cf34168e12e44dd50f0a603c
2018-11-04 23:01:02 -08:00
Ignacio Olaciregui 6ebee18d13 Remove unused variables (#22097)
Summary:
Fix unused variable ESLint warnings.
Pull Request resolved: https://github.com/facebook/react-native/pull/22097

Differential Revision: D12919249

Pulled By: TheSavior

fbshipit-source-id: f680fa7277c58cf685e70dfb911753a30fe01c1d
2018-11-04 10:41:46 -08:00
Thomas BARRAS 499c195eba Flow strict ScrollViewMock (#22103)
Summary:
Related to #22100

Turn Flow strict mode on for ScrollViewMock.
This file used to declare jest var as `any` but jest module is already typed in root flow folder.

Note: I had to use a quick fix for polyfillPromise. See here #22101

- All flow tests succeed.

[GENERAL] [ENHANCEMENT] [ScrollViewMock.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22103

Differential Revision: D12918380

Pulled By: TheSavior

fbshipit-source-id: cd3aba47b1a43e76a7da09e15cc2d9cfcdf7f56d
2018-11-03 22:14:51 -07:00
Thomas BARRAS 81e5d64bfe Remove createReactClass from ProgressBarAndroidExample (#21874)
Summary:
Related to #21581

This PR was already opened here https://github.com/facebook/react-native/pull/21600 but seems to be inactive.

Remove createReactClass from ProgressBarAndroidExample.

- `yarn run flow` && `yarn run flow-check-android` succeed.
- RNTester app ProgressBarAndroidExample on Android.

[GENERAL] [ENHANCEMENT] [ProgressBarAndroidExample.android.js] - rm createReactClass
Pull Request resolved: https://github.com/facebook/react-native/pull/21874

Reviewed By: TheSavior

Differential Revision: D12827689

Pulled By: RSNara

fbshipit-source-id: 46c70ea67dddf5d928fe936a28ef4a0a929d127f
2018-11-02 12:14:29 -07:00
empyrical 28de61e9f0 CheckBox: Convert NativeMethodsMixin to forwardedRef, convert to class (#21585)
Summary:
This PR converts the use of `NativeMethodsMixin` in `CheckBox.android.js`, and converts it to an ES6-style class.
Pull Request resolved: https://github.com/facebook/react-native/pull/21585

Reviewed By: TheSavior

Differential Revision: D12827768

Pulled By: RSNara

fbshipit-source-id: c113c221335e61e015a20bbb6bcff5f9837f9022
2018-11-02 10:32:01 -07:00
Sam Goldman adc8a33fcf Deploy Flow v0.85 to xplat/js
Reviewed By: fishythefish

Differential Revision: D12898653

fbshipit-source-id: 2ed11ce569600fe4c12528939a350dd827c9a29a
2018-11-02 00:28:28 -07:00
Ignacio Olaciregui ae8ec39397 Fix linting issues (#22062)
Summary:
Fixes lots of ESLint warnings. Many of them where in PR #20877 by janicduplessis which requested to split the linting fixes from configuration and package changes.

I solved only the issues that I was most certain about but I would love to get hands on all of them with a little bit of input.
Pull Request resolved: https://github.com/facebook/react-native/pull/22062

Differential Revision: D12889447

Pulled By: TheSavior

fbshipit-source-id: 35f7a08104a5b859c860afdde4af2b32c0685c50
2018-11-01 14:29:16 -07:00
nd-02110114 a06c0da828 Remove var in Libraries/Component (#22020)
Summary:
I removed `var` in Libraries/Component.

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android

[GENERAL] [ENHANCEMENT] [Libraries/Component] - remove `var`
Pull Request resolved: https://github.com/facebook/react-native/pull/22020

Differential Revision: D12843058

Pulled By: TheSavior

fbshipit-source-id: 90723f3905191cbd29cb18474c700ac65f2503cd
2018-10-30 12:41:04 -07:00
Rajiv Shah 7a914fcef4 Fix View/Text displayName (#21950)
Summary:
Adds the displayName prop to `View` and `Text` components. Because these now use `React.forwardRef`, they were showing as `Component` instead of their actual names.

Thanks to ljharb for helping to pinpoint the source of the issue!

Fixes #21937
Pull Request resolved: https://github.com/facebook/react-native/pull/21950

Differential Revision: D12827060

Pulled By: TheSavior

fbshipit-source-id: d812cae14d53ad821ab5873e737db63ad1a989e3
2018-10-29 12:42:10 -07:00
Avik Chaudhuri 11552a7a7a @allow-large-files flow 0.84 xplat deploy
Reviewed By: samwgoldman

Differential Revision: D10851695

fbshipit-source-id: 951c628844bbbc7331d4e75f62485db88e5ba7c4
2018-10-25 18:16:30 -07:00
Matt Hargett 174644846d Add deprecation warnings for a few IOS components
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/21901

Differential Revision: D10502816

Pulled By: TheSavior

fbshipit-source-id: 1890aa35251cff0ac2c15760ecd5aabeb7652558
2018-10-22 23:17:13 -07:00
nd-02110114 2014ce49ed remove createReactClass from ProgressViewIOS.ios.js (#21887)
Summary:
Related to #21581 .
Removed createReactClass from the Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android
[GENERAL] [ENHANCEMENT] [Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js] - remove createReactClass dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21887

Differential Revision: D10491704

Pulled By: RSNara

fbshipit-source-id: a38f87b9c151aaac8885edd22ce852ee2f2cf746
2018-10-22 10:34:35 -07:00
Andy Huang 8a3a0ad2d0 Fix pull to refresh refresh component clipping on Android
Summary: Currently the pull to refresh icon on browse feed is super cut off on Android. Expose the progressViewOffset prop from FBPullToRefresh to support offsetting the PTR component to make the component more visible.

Reviewed By: yungsters

Differential Revision: D10274679

fbshipit-source-id: 1735c4d2d98523ccc3d1ec3733465028ae33df7b
2018-10-15 12:41:00 -07:00
empyrical 93e6ae1c0a ProgressViewIOS: Remove PropTypes and NativeMethodsMixin, convert to functional component (#21588)
Summary:
This PR converts `ProgressViewIOS` from a `createReactClass` component to a functional component, and removes the remaining proptypes. Its use of `NativeMethodsMixin` has been ported to a `forwardRef` to the native component.
Pull Request resolved: https://github.com/facebook/react-native/pull/21588

Reviewed By: hramos

Differential Revision: D10338888

Pulled By: RSNara

fbshipit-source-id: c49807e97a0e2cf774971d9aa5a8426f15a3e48d
2018-10-12 13:49:39 -07:00
Eli White afa6d9ba7b Remove Subscribable.Mixin from React Native core
Summary: There are no longer any callsites to this in React Native so we can remove it from the repo!

Reviewed By: RSNara

Differential Revision: D10316313

fbshipit-source-id: bd63c823c56bb1914e4249d972e0ce503aa189f8
2018-10-10 17:33:14 -07:00