Summary:
Related to #22100
Enhance TouchableWithoutFeedback with press and target event types.
There are still work to do to update `UNSAFE_componentWillReceiveProps` and `touchableGetHitSlop` to make Flow not complain about `DeprecatedEdgeInsetsPropType` inexact type.
Pull Request resolved: https://github.com/facebook/react-native/pull/22479
Reviewed By: RSNara
Differential Revision: D13310764
Pulled By: TheSavior
fbshipit-source-id: 9002e542378491fb800c8e81c63f4fbe125b563c
Summary: This is one more step to remove `fbjs` from `react-native-github`. This changes both the internal and external code to use `invariant` from zertosh instead of the copy in fbjs.
Reviewed By: yungsters
Differential Revision: D13195941
fbshipit-source-id: 73564ca1715110e7da9c7ef56dc57374d61377e0
Summary:
Detox was failing because of build errors due to the new xcode10 build system. These errors were fixed by RSNara in b7349f9857 but this callsite was missed.
Pull Request resolved: https://github.com/facebook/react-native/pull/22468
Reviewed By: RSNara
Differential Revision: D13287386
Pulled By: TheSavior
fbshipit-source-id: 8a2df9801c69d851eabe7074ffc12b29c03a636a
Summary:
Adding an “UNSAFE_” prefix to `componentWillMount`.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
- [x] yarn test
- [x] yarn flow
- [x] yarn flow-check-ios
- [x] yarn flow-check-android
[General] [Fixed] - adding an UNSAFE_ prefix
Pull Request resolved: https://github.com/facebook/react-native/pull/22125
Differential Revision: D13237831
Pulled By: mmmulani
fbshipit-source-id: b4ca1e4628f93e89fd5680c40b0e3f7c7db6ad38
Summary: Use array+map like other examples for DRY.
Reviewed By: TheSavior
Differential Revision: D13222132
fbshipit-source-id: 15171e496eaef8794c02e853950f666d77372923
Summary:
Modified the ESLint configuration to only enable the Jest environment for files we consider now tests, which are files with the `-test.js` suffix under `__tests__`. Also enabled some globals for test helpers (any file under `__tests__`).
This will allow us to catch misspelled tests, while allowing test helpers to use most Jest APIs.
Also disabled the Jasmine environment so people stop using Jasmine APIs and we can rollout Circus soon.
Reviewed By: aaronabramov
Differential Revision: D13199591
fbshipit-source-id: 12a32cf5835630b9987452b0c33d3f8085001689
Summary:
[Folly upgrade](a70625abd7) introduced changes that have to be applied to `Install Third Party` script in order to use `New build system` from Xcode 10. Unfortunately, this might happen again if someone changes folly. Also removes non-existent files from folly podspec.
Pull Request resolved: https://github.com/facebook/react-native/pull/22394
Differential Revision: D13192463
Pulled By: hramos
fbshipit-source-id: ea0eeb6e1e7f6d7dfcdb6d1dee28b1a640ee7097
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
Summary:
Constructing `Buffer` using the constructor [[https://nodesource.com/blog/understanding-the-buffer-deprecation-in-node-js-10/ | has been deprecated in Node 10 due to security considerations]].
This is a simple and straightforward conversion.
Reviewed By: mjesun
Differential Revision: D13080655
fbshipit-source-id: 100d8f28c3b255422b26e820aaadcc4f32f41e0d
Summary:
Fixes `react-native/no-inline-styles` warning for several examples. I'm limiting the size of this PR to make it simpler to review.
Pull Request resolved: https://github.com/facebook/react-native/pull/22123
Reviewed By: RSNara
Differential Revision: D12929701
Pulled By: TheSavior
fbshipit-source-id: 7a976f2208b557fcfda46d5b586b30652c550eb2
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:
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
Summary: Adds copyright headers to all files that are missing them.
Reviewed By: hramos
Differential Revision: D12837494
fbshipit-source-id: 6330a18919676dec9ff2c03b7c9329ed9127d930
Summary:
Fixes#20302 (For iOS)
Note:
------
1. Checked the changes did not break CocoaPods integration.
2. The change for glog copying header into exported/ is to prevent build break for folly.
`folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21976
Reviewed By: hramos
Differential Revision: D12818131
Pulled By: fkgozali
fbshipit-source-id: b3c637d09d1b3adde0ea15c82eb56e28f846885b
Summary:
This diff just builds on top of the open source PR:
1. I add a bunch of extra flow typings to the file.
2. I refactor some of the JavaScript code.
Reviewed By: TheSavior
Differential Revision: D10351693
fbshipit-source-id: a6d828518150c11d66a179c5c3fe835cc80a8dfb
Summary:
Marc deleted a few files from react-native-github, so I removed them from the RNTester XCode project. I also included the files he created, and created new targets: `jsiexecutor-tvOS`, `jsiexecutor`, `jsi`, `jsi-tvOS`.
**Note:** The tvOS build of RNTester is broken in this diff because of a few `WKWebView` changes I landed earlier. D9844322 includes the fix.
Reviewed By: axe-fb
Differential Revision: D9875409
fbshipit-source-id: 31a9f241a524de91e78dfff0555aec5d1373d789
Summary:
This diff includes a few changes to the `React.podspec` file:
1. Introduce a `jsi` spec for code inside the `ReactCommon/jsi` folder. This depends on the JavaScriptCore framework.
2. Introduce a `jsiexecutor` spec for the code inside the `ReactCommon/jsiexecutor` folder. These files depend on files in `ReactCommon/cxxreact`, `ReactCommon/jsi`, and Folly.
3. Since RCTCxxBridge.mm now depends on `JSIExecutor`, we need to have the `CxxBridge` spec depend on the `jsiexecutor` spec.
Reviewed By: hramos
Differential Revision: D9820323
fbshipit-source-id: 0c96d027eed30ee47b6ee0d2d86cd6b1ad7a5887
Summary:
With this, we send the correct x position when using center or right aligned text. In order to accomplish this though, we have to pass the text alignment into the Layout object that we create.
Also update RNTester to allow us to try different alignments.
Reviewed By: sahrens
Differential Revision: D10316494
fbshipit-source-id: 11c7d2a59e636528f12211168acb46f16b54a126
Summary:
**Problem:**
When you type an invalid regex into the input field of the RNTester app, it crashes. What's worse is that it remembers the input string so refreshing the view doesn't get rid of the error. Observe:
https://pxl.cl/jdm3
Reviewed By: yungsters
Differential Revision: D10349249
fbshipit-source-id: aab5977bd47271e9a4ff6202c93b47550da778d2
Summary: Looks like we have to explicitly require the BuildConfig package if we want to use it.
Reviewed By: mdvacca
Differential Revision: D10275883
fbshipit-source-id: 4fbce3085e1ac6486a782b2bc0e335b7e48fe8de
Summary:
Related to #21581 .
Removed createReactClass from the RNTester/js/ImageExample.js
The diff of this PR is a little big. If there are any problems, please teach me �
- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android
[GENERAL] [ENHANCEMENT] [RNTester/js/ImageExample.js] - remove createReactClass dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21602
Reviewed By: TheSavior
Differential Revision: D10304857
Pulled By: RSNara
fbshipit-source-id: 339b1220828c6218cad0d09c7a5034a61e623bc6
Summary:
`legacyImplementation` has caused a warning in FlatList for a long time. FlatList supports the use cases of the legacy implementation and should be adopted.
We will be removing the deprecated MetroListView and ListView components to reduce bundle sizes and the complexity of the codebase.
Reviewed By: yungsters
Differential Revision: D10245824
fbshipit-source-id: 60ff0d54974649b57bac9f9f29b769f34ca2701c
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.
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:
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:
Update several files to use the proper copyright header:
```
// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
```
In the case of Xcode project files, I used the shortform version, `Copyright (c) Facebook, Inc. and its affiliates.`
Reviewed By: axe-fb
Differential Revision: D10114529
fbshipit-source-id: a1f2d5a46d04797c1cf281ea9ab80d3a2caa6fb4