Summary:
The `BUCK` build files' indentation are 4 spaces large. This PR adds a small modification to `.editorconfig` to reflect that. Especially important for them, because an improperly indented line would be a syntax error.
Pull Request resolved: https://github.com/facebook/react-native/pull/21554
Differential Revision: D10247954
Pulled By: TheSavior
fbshipit-source-id: 98596a563e9f8c36060cd8aa702757eff230c4c3
Summary:
With the new xcode command line tools (10.1 beta2), running `xcrun simctl list --json devices` seems to gives us a slightly different format than what we were expecting. More specifically, the `availability` key is changed to `isAvailable` and returns `'YES'` if the simulator is available:
Before:
```js
devices: {
'iOS 9.2': [
{
state: 'Shutdown',
availability: '(unavailable, runtime profile not found)',
name: 'iPhone 4s',
udid: 'B9B5E161-416B-43C4-A78F-729CB96CC8C6',
},
{
state: 'Shutdown',
availability: '(unavailable, runtime profile not found)',
name: 'iPhone 5',
udid: '1CCBBF8B-5773-4EA6-BD6F-C308C87A1ADB',
},
...
]
}
```
After:
```js
devices: {
'iOS 12.1': [
{
state: 'Shutdown',
isAvailable: 'YES',
name: 'iPhone 6s',
udid: 'D0F29BE7-CC3C-4976-888D-C739B4F50508',
},
{
state: 'Shutdown',
isAvailable: 'YES',
name: 'iPhone 6',
udid: 'BA0D93BD-07E6-4182-9B0A-F60A2474139C',
},
...
]
}
```
Without this fix, `npm run ios` is not able to launch the simulator correctly and returns the following error:
```
Could not find iPhone 6 simulator
Error: Could not find iPhone 6 simulator
at resolve (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:148:13)
at new Promise (<anonymous>)
at runOnSimulator (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
at Object.runIOS [as func] (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
at Promise.resolve.then (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:117:22)
```
Pull Request resolved: https://github.com/facebook/react-native/pull/21557
Differential Revision: D10248115
Pulled By: TheSavior
fbshipit-source-id: 37197bbf828e4a6e254270d46411a6716a91afe3
Summary:
Calling `uninstall` synchnously was a bad idea. Unfortunatelly, even if it illuminate possible race condition during uninstallation, sometimes it deadlock.
It's not clear for now how to solve both problems without introducting another layer of indirection between UIManager and JSI.
Reviewed By: mdvacca
Differential Revision: D10081500
fbshipit-source-id: 90d8120603929a8219a3e606d8b3527e297b13ce
Summary: That's why we need the previous three diffs. Synchonous executor deadlocks if the beat is missing.
Reviewed By: sahrens
Differential Revision: D10081501
fbshipit-source-id: 9986d0a1844e642048b6f37a1fcb5f623a267663
Summary: In some cases we have to have a way to notify a EventBeat consumer that the beat cannot be (and will not be) delivered, so we introducing special API for that.
Reviewed By: mdvacca
Differential Revision: D10081503
fbshipit-source-id: 4c5a392d32572f426e3744bdba797efcd29b8cb4
Summary: Adding a test for the newly added InterpolatorType.fromString()
Reviewed By: axe-fb
Differential Revision: D10203814
fbshipit-source-id: f3c70db1a5754c79b1bdd881d266bec110934494
Summary:
Related to #21485.
Removed TimerMixin from the SwipeableRow component since it is currently not used.
Added a test case for `SwipeableRow` animation in the `SwipeableListViewSimpleExample`, by adding the `bounceFirstRowOnMount` prop, to check for any runtime issues with the setTimeout method.
- [x] `npm run prettier`
- [x] `npm run flow-check-ios`
- [x] `npm run flow-check-android`
- [x] runtime tests using `SwipeableFlatListExample` on Android and iOS
- [x] runtime tests using `SwipeableListViewSimpleExample` on Android and iOS
**RNTester steps**
- [x] Run RNTester.
- [x] Navigate to `SwipeableFlatListExample` and check if the `_animateBounceBack` animation executes when the `shouldBounceOnMount` props is passed.
- [x] Swipe the row and check if the events ran correctly
- [x] Navigate to `SwipeableListViewSimpleExample` and check if the `_animateBounceBack` animation executes when the `shouldBounceOnMount` props is passed.
- [x] Swipe the row and check if the events ran correctly
[GENERAL] [ENHANCEMENT] [Libraries/Experimental/SwipeableRow/SwipeableRow.js] - remove TimerMixin dependency
[GENERAL] [ENHANCEMENT] [RNTester/js/SwipeableListViewSimpleExample.js] - Add bounceFirstRowOnMount to guarantee the SwipeableRow correct behavior.
Pull Request resolved: https://github.com/facebook/react-native/pull/21499
Reviewed By: TheSavior
Differential Revision: D10218361
Pulled By: RSNara
fbshipit-source-id: c8e6d5ced4c1237e48bb4c43592016684b2c6360
Summary: Also add an optional timestamp param to PerformanceLogger.markPoint() so you can backdate a point
Reviewed By: alexeylang
Differential Revision: D10149337
fbshipit-source-id: 6cc5f95b34b3293589e7cb41b99cee17bf128163
Summary:
If a folly::dynamic contains a double when a Java method is
declared to take an int, getInt() will be called, and a C++ exception
will be thrown. This change uses similar logic to
NativeReadableMap.getInt() to convert a folly::dynamic double to a
jint. This will still throw an exception if the JS value cannot be
represented as a jint without loss.
Reviewed By: fromcelticpark
Differential Revision: D10209492
fbshipit-source-id: fd96416200c6b283ce5c8f8fa4c227ceb8f43054
Summary:
This test is disabled internally and flaky in open source causing CI to fail. Skipping it for now.
Related to: https://github.com/facebook/react-native/issues/21517
Reviewed By: RSNara
Differential Revision: D10223498
fbshipit-source-id: 37a3798c0abb7de829bc5b59e02f23d8943da882
Summary:
Related to #21485.
Removed `TimerMixin` from the `TouchableWithoutFeedback` component since it is currently not used.
Added tests cases for `TouchableWithoutFeedback` to check for any runtime issues.
Pull Request resolved: https://github.com/facebook/react-native/pull/21493
Differential Revision: D10219098
Pulled By: RSNara
fbshipit-source-id: d9517b2bd5b72b0450fa864f3556673ae3181552
Summary:
Related to #21485
- Remove TimerMixin from ListView
- All flow tests succeed.
- RNTester: <ListView> iOS (this change should only affect iOS because calculateChildFrames is iOS only)
Show perf monitor, show ListView* screen, start scrolling. UI frame Rate is used at the beginning. When scrolling there is no drop in FPS rate.
TODO: I think a load test would be more relevant:
- Update props multiple times and scroll
[GENERAL] [ENHANCEMENT] [ListView.js] - rm TimerMixin
Pull Request resolved: https://github.com/facebook/react-native/pull/21488
Differential Revision: D10219088
Pulled By: RSNara
fbshipit-source-id: 946e4fc1319324c5bf4947a2060b18bebb6fc493
Summary:
Up until now the `enableBabelRuntime` option in the `metro-react-native-preset` package was hardcoded in the transformer: our internal transformer set it to `false` and the opensource one was `true`.
This diff now exposes this param out to the config of Metro (now that it's quite easy to expose things) so anybody can set it to false or true.
This allows our end to end tests to set it to false to not have to deal with requires to `babel/runtime`.
Reviewed By: davidaurelio
Differential Revision: D10123776
fbshipit-source-id: 97e744eeb567c8e86ab3c613ac71970d226ed2ca
Summary:
Related to #21485.
Removed TimerMixin from the `RNTester/js/ProgressViewIOSExample.js` screen since it is currently not used.
- [x] `npm run prettier`
- [x] `npm run flow-check-ios`
- [x] `npm run flow-check-android`
- [x] runtime tests using `ProgressViewIOSExample` on Android and iOS
**RNTester steps**
- [x] Run RNTester.
- [x] Navigate to `ProgressViewIOSExample` and check if the animations are executed correctly and without lag.
[GENERAL] [ENHANCEMENT] [RNTester/js/ProgressViewIOSExample.js] - remove TimerMixin dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21500
Reviewed By: TheSavior
Differential Revision: D10218366
Pulled By: RSNara
fbshipit-source-id: b44a0bbb50f6b0e85f406904131804eace941335
Summary:
All code styles are terribly ugly. We have the only choise - choise something and embrace it.
This particular code style was borrowed from a neibour Fabric-friendly project because it follows established Facebook guides and respects client-side traditions.
Reviewed By: mdvacca
Differential Revision: D10218598
fbshipit-source-id: 8c4cf6713c07768566dadef479191661c79988f0
Summary:
Related to #21485.
Removed TimerMixin from the `RNTester/js/ProgressBarAndroidExample.android.js` since it is currently not used.
- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android
In progress 🙇
[GENERAL] [ENHANCEMENT] [RNTester/js/ProgressBarAndroidExample.android.js] - remove TimerMixin dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21501
Reviewed By: TheSavior
Differential Revision: D10218375
Pulled By: RSNara
fbshipit-source-id: c4c12f65855452bc2485f034a0560afd204512f4
Summary: The legacy implementation doesn't provide additional functionality and has a negative impact on performance and user experience. The legacyImplementation prop is deprecated and will be removed in a future release.
Reviewed By: yungsters
Differential Revision: D10212762
fbshipit-source-id: 9b3416434ba392827b538c984c7ab4bcbe156e60
Summary:
This PR splits and renames all references of ViewAccessibility to DeprecatedViewAccessibility
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21422
Reviewed By: yungsters
Differential Revision: D10132659
Pulled By: RSNara
fbshipit-source-id: 68c371230c69ed37c3e44bf8a36043adb04afc78
Summary:
This PR gets master back on sync with fixes made to 0.57-stable.
Pull Request resolved: https://github.com/facebook/react-native/pull/21495
Differential Revision: D10209745
Pulled By: hramos
fbshipit-source-id: bc4d859adade820eac30e947514b6c6c2a27083f
Summary: Incremental appears to be causing flow errors on Github master causing CI to fail.
Reviewed By: RSNara
Differential Revision: D10205146
fbshipit-source-id: b86c2d099a2041ab1429b9aacb78ff1b382dca41
Summary: We need a new version of Metro with D10119384 to make the new Embeds work well
Reviewed By: davidaurelio
Differential Revision: D10119385
fbshipit-source-id: db7fc71c75c450720af41add466fc88ac38f3066
Summary: Simplifying our OSS enums (remove private variables and methods) so that redex can more easily optimize them for us.
Reviewed By: achen1, Feng23
Differential Revision: D9812796
fbshipit-source-id: 11a8272db41ff04399d1cdf366e28ddf1b07b7be
Summary: D10138128 had some shamefully wrong boolean logic to determine whether we should customize the accessibility delegate. Previously, we did it if BOTH the accessibility label AND role were present. We should actually do it if EITHER are present.
Reviewed By: mdvacca
Differential Revision: D10182135
fbshipit-source-id: 209a8ab43f5869762843fe878cfd59a7b9b5ab1a
Summary:
Since `ChoreographerCompat.getInstance()` is a singleton, we cache its instance.
This will be important in a subsequent diff where we ensure that `ChoreographerCompat.getInstance()` is only called on the UI thread
Reviewed By: achen1
Differential Revision: D9169298
fbshipit-source-id: 2067a50770dd41f5b1a12b62b6a9f8fea83d91e8
Summary:
Reducing the places where we directly access `ChoreographerCompat.getInstance()`.
Since this is a singleton anyway, there was no need to pass this as an argument. In subsequent diffs, we will also ensure that `ChoreographerCompat.getInstance()` runs on the UI thread, so that the `Choreographer` it gets is based on the `Looper` of the main thread.
Reviewed By: achen1
Differential Revision: D10136624
fbshipit-source-id: ad18f7b61eb8b05094aff310f2eb90eb225427dc
Summary: Creating this Handler in the constructor implies that the constructor needs to run on the UI Thread. Since DevSupportManager is also initialized with ReactInstanceManager,
Reviewed By: mdvacca
Differential Revision: D10094981
fbshipit-source-id: b724b05ddbd6af68da1111a1a004491835f7a35a
Summary: This diff unifies the 'handling' of the top prefix in the EventEmitter.cpp class
Reviewed By: shergin
Differential Revision: D10149497
fbshipit-source-id: d0ddbbbeefe3790b414b101da47582161354c971
Summary: This diff renames com.facebook.fbreact.fabric.UIManager to FabricUIManager, this is done in order to avoid confusion with com.facebook.react.bridge.UIManager
Reviewed By: shergin
Differential Revision: D10128635
fbshipit-source-id: 0cb874ec1ba698077d750214f1d25004065c2f59
Summary: This diff removes unused method on the FabricBinding class, these methods were being used as part of the Fabric Android implementation, but they are not necessary anymore.
Reviewed By: shergin
Differential Revision: D10128636
fbshipit-source-id: 5afef4c2e9f4955af008200c5bdd2b6acc7ef333
Summary: This diff introduces the concept of EventBeatManager, this is a class that acts as a proxy between the list of EventBeats registered in C++ and the Android side.
Reviewed By: shergin
Differential Revision: D10127857
fbshipit-source-id: a1956ca42d4c470fbc11cc9f30336a182fe7910c
Summary:
Second attempt at landing D9930713. Notes about the previous issue is mentioned as an inline comment below.
===========
We are currently iterating through each view manager to get its class name to pass to JS. JS uses this list to define lazy property accesses for each view manager to grab the constants synchronously. This results in each view manager's class loading immediately -- causing a small perf hit.
Let's avoid this view managers list entirely. JS is able to access each view manager directly by calling getConstantsForViewManager(name)
Reviewed By: axe-fb
Differential Revision: D10118711
fbshipit-source-id: 78de8f34db364a64f5ce6af70e3d8691353b0d4d
Summary:
@public
We're seeing a crasher where `self` on line 54 isn't an `RCTNetInfo`. The timing looks related to D9798488, so my theory is that this class is being deallocated before it resolves, and thus causes a crash.
Reviewed By: PeteTheHeat
Differential Revision: D10127341
fbshipit-source-id: 94eaba7def6b118092adcf6b4cce841ccc7d0b59
Summary: The current buffer size isn't enough even to capture a short TTI trace.
Reviewed By: mhorowitz
Differential Revision: D10112538
fbshipit-source-id: 266fa6ffa916049245b21d7725a364d75589c776
Summary:
Android Gradle Plugin 3.2 uses a new intermediates/merged_assets directory instead of intermediates/assets. This workaround copies the javascript bundle to both directories for compatibility purposes.
Fixes#21132Fixes#18357
Pull Request resolved: https://github.com/facebook/react-native/pull/21409
Differential Revision: D10141860
Pulled By: hramos
fbshipit-source-id: 0fb20fcec67ec2bfd7a8d9052599bbc70464b466