Summary:
This regression was caused by 199c918 - property values are initialized to true rather than a string that matches the property name now.
Pull Request resolved: https://github.com/facebook/react-native/pull/22262
Differential Revision: D13048839
Pulled By: hramos
fbshipit-source-id: 09471334c37f3930aae7e35066943f33f8e617e5
Summary: Testing is a __DEV__ time only, so let's optimize for prod bundles.
Reviewed By: ejanzer
Differential Revision: D13050583
fbshipit-source-id: a96e35e4d5f3bd09c235c11d4ece3e4d07882de7
Summary:
@public
We're seeing a crash on line 191 when we do `CFRelease(self->_firstTimeReachability);`. My thinking is that there's a race condition between the deallocation coming from calling `getCurrentConnectivity` twice in a row and the callback coming back.
Reviewed By: PeteTheHeat
Differential Revision: D12982772
fbshipit-source-id: d3d882a074b67a5e547e7f480f561fcaf8d79ec4
Summary:
GraphNotFoundError: When the user moves the app to the background on Android, restarts the Metro server and reopens the app, since the client hasn't requested either a delta or a bundle, the graph cache of the server is empty and thus we can't compute an update for the client (what if changes happened when the metro server was down?).
RevisionNotFoundError: I didn't manage to reproduce that one. It could happen if two clients live side-by-side, requesting the exact same bundle. In the future, if we want to handle that case, we'll need to manage a list of clients listening to a single graph so that we don't try to update the same graph multiple times for a single file change.
Disconnection: Same as GraphNotFoundError, but happens when the user moves the app to the background on iOS.
Reviewed By: mjesun
Differential Revision: D12960939
fbshipit-source-id: 5ac1dc7fd12bad5e0ee8dfa5a21c112773454ee5
Summary: It seems like `nativePerformanceNow` might not be getting installed in time to be used by InitializeCore on Android. Using PerformanceLogger.currentTimestamp instead, which uses nativeQPLTimestamp (which is what we should be using anyway)
Reviewed By: alexeylang
Differential Revision: D12875187
fbshipit-source-id: 6eda5d2ed7948ba48c63f76b40b2014511c32494
Summary:
It does not supported on Android and nobody uses it.
I could find only one use cases: Very old versin of `SectionList` library (4 years ago).
Reviewed By: sahrens
Differential Revision: D12972361
fbshipit-source-id: a5dfef5e877e996adec2d4941417b4a2e727cfb7
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
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
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
Summary: Some console methods (like `groupCollapsed` or `clear`) are not supported by console.js polyfill and are not passed to the original console objects.
Reviewed By: sahrens
Differential Revision: D12900996
fbshipit-source-id: 1b2f487028e418ae934f631996eaaf63abdced82
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
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
Summary:
Replaces the keywords var with let or const in Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js
- [x] Check npm run flow
- [x] Check npm run flow-check-ios
- [x] Check npm run flow-check-android
[GENERAL] [ENHANCEMENT] [Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js] - remove var
Pull Request resolved: https://github.com/facebook/react-native/pull/22126
Differential Revision: D12929758
Pulled By: TheSavior
fbshipit-source-id: bee9dfb463d197458cb218f39274af5a4d16ce1f
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
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
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
Summary: This change expands the limits to support a greater variety of scenarios.
Reviewed By: PeteTheHeat
Differential Revision: D12911841
fbshipit-source-id: a7c8eb6fece49dfe47b3ada98f55a02b43396ce8
Summary:
This PR increases the speed at which cached images are loaded and displayed on the screen. Images are currently cached in memory using RCTImageCache, but each time they are loaded, a round trip through RCTNetworking happens before RCTImageCache is even checked. This is likely so that RCTNetworking can handle the caching behavior required by the HTTP headers. However, this means that at the very least, images are read from disk each time they're loaded.
This PR makes RCTImageLoader check RCTImageCache _before_ sending a request to RCTNetworking. RCTImageCache stores a bit of information about the response headers so that it can respect Cache-Control fields without needing a roundtrip through RCTNetworking.
Here are a couple of graphs showing improved loading times before this change (blue) and after (red) with SDWebImage (yellow) as a baseline comparison. The increase is most evident when loading especially large (hi-res photo size) images, or loading multiple images at a time.
https://imgur.com/a/cnL47Z0
More performance gains can potentially be had by increasing the size limit of RCTImageCache: 1a6666a116/Libraries/Image/RCTImageCache.m (L39) but this comes at the tradeoff of being more likely to run into OOM crashes.
Pull Request resolved: https://github.com/facebook/react-native/pull/20356
Reviewed By: PeteTheHeat
Differential Revision: D12909121
Pulled By: alsun2001
fbshipit-source-id: 7f5e21928c53d7aa53f293b7f1b4ec5c99b5f0c2
Summary:
Replaces the keywords var with const in Libraries/merge.js
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!
- [x] Check npm run flow
- [x] Check npm run flow-check-ios
- [x] Check npm run flow-check-android
[GENERAL] [ENHANCEMENT] [Libraries/core] - remove var
Pull Request resolved: https://github.com/facebook/react-native/pull/22108
Differential Revision: D12919282
Pulled By: TheSavior
fbshipit-source-id: e3c8569c47c95ad3d1a061917c90185c2694c78f
Summary:
Flow is broken for a bunch of people and has been for the last few days. For some reason this isn't causing any builds to fail which we will need to look into. For now, this stops the bleeding.
I *think* this is because of case sensitivity differenes between Mac and where all of our CI machines run.
```
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ Libraries/Core/polyfillPromise.js:21:33
Importing from an untyped module makes it any and is not safe! Did you mean to add // flow to the top of Promise?
(untyped-import)
18│ * If you don't need these polyfills, don't use InitializeCore; just directly
19│ * require the modules you need from InitializeCore for setup.
20│ */
21│ polyfillGlobal('Promise', () => require('Promise'));
22│
```
Pull Request resolved: https://github.com/facebook/react-native/pull/22048
Reviewed By: shergin
Differential Revision: D12918418
Pulled By: TheSavior
fbshipit-source-id: 9d9db1b3686eab906244180325c12ffcce92be8c
Summary:
There are some critical bugs that require further investigation in the most recent upgrade to React 16.6 (and ReactNativeRenderer changes).
This revision reverts the sync until these issues have been resolved.
Reviewed By: mdvacca
Differential Revision: D12918541
fbshipit-source-id: 5c1ada185851ba599f3c86387158a2b41f3dcf3e
Summary:
Replaces the keywords var with const in Libraries/emitter/EventValidator.js
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
_Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_
- [x] Check npm run flow
- [x] Check npm run flow-check-ios
- [x] Check npm run flow-check-android
[GENERAL] [ENHANCEMENT] [Libraries/emitter] - remove `var`
Pull Request resolved: https://github.com/facebook/react-native/pull/22087
Differential Revision: D12918444
Pulled By: TheSavior
fbshipit-source-id: 630ccb283fd6c3118a22124a656038eac4a88599
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
Summary:
Changing the the this.props.visible if to be ` if (!!this.props.visible === false)` . So passing undefined, or other values wont set the modal to be visible. Granting that anything that is not true, will set the modal to null on the render.
I make this this PR, because on the company that im working, we used a lot of RN. At the moment, we arent using anything like flow or TS. But to grant that the modals will only show if they are set visible to true i have changed the if made.
_Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_
Pull Request resolved: https://github.com/facebook/react-native/pull/22072
Differential Revision: D12918086
Pulled By: TheSavior
fbshipit-source-id: 8f9c63ac6fd56d83949bb8428ad7c5b7bf805c49
Summary:
Fixes the only ESLint error pending to resolve. It was a duplicate `get` declaration.
Pull Request resolved: https://github.com/facebook/react-native/pull/22098
Differential Revision: D12918078
Pulled By: TheSavior
fbshipit-source-id: c738d6880241dbc1f1ddc06c2d4e52443c00768a
Summary:
A minor change to the comment in the Image.android.js file.
Pull Request resolved: https://github.com/facebook/react-native/pull/22092
Differential Revision: D12918066
Pulled By: TheSavior
fbshipit-source-id: f27c63241c9dde780c037edcbcdf4cc10d55d33e
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
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
Summary: Improves the types for Easing and bezier to make them script.
Differential Revision: D10346234
fbshipit-source-id: e941110c62f7dcd17b0d022497cf29e0935db5a3