Summary: This changes ReactImageView to pull the transform matrix for rounding from the scale type itself instead of a utility method that forwards to the same thing.
Reviewed By: lambdapioneer
Differential Revision: D4326549
fbshipit-source-id: 82e59e3c20f83beb1d454743e6dbbce8666de8a3
Summary:
The goal of this pull request is to make it easier for contributors to run Android tests locally, specifically the unit tests and integration tests. I added a bunch of checks to the local testing scripts that will warn you if your environment is misconfigured, and tell you how to fix it. I also updated the testing docs, so that the regular "Testing" page should be a decent resource to point people to when you are telling them "hey this pull request needs a test." Just Android, though, I haven't gotten to the iOS parts yet.
I also disabled a couple tests that seemed quite flaky while running on a local machine, and don't seem to be providing much value. In particular, the `TestId` test just hangs on my emulator a lot and has been flaky on CI in the past, so I removed about half of its test cases to make the sample app smaller. The testMetions test appears to be dependent on screen size so I commented it out.
Closes https://github.com/facebook/react-native/pull/11442
Differential Revision: D4323569
Pulled By: bestander
fbshipit-source-id: 9c869f3915d5c7cee438615f37986b07ab251f8c
Summary:
Gestures now work with native animations so we can enable it, it is also not needed anymore to check if the native module exists since we print a warning in the Animated module now.
**Test plan**
Tested that animations and gesture work properly in the UIExplorer example. Also been using native animations with NavigationExperimental (ex-nav) in an app for a while.
Closes https://github.com/facebook/react-native/pull/11234
Differential Revision: D4321763
Pulled By: ericvicenti
fbshipit-source-id: 255bed5bfed3b93bdc10939b5a03d4d8b00ceade
Summary:
I was comparing `<TouchableOpacity>` to `UIButton` in iOS and it just doesn't feel native. The initial delay was fixed by https://github.com/facebook/react-native/pull/10866 but still there is a lag between button release and animation.
I'm also not sure what `_hideTimeout` was used for. When logging `touchableHandle*` events looks like `touchableHandleActivePressIn` is called first, then `touchableHandleActivePressOut` and then `touchableHandlePress`. Which means the fade in animation from `touchableHandleActivePressOut` was interrupted by `touchableHandlePress`.
Reviewed By: vjeux
Differential Revision: D4309789
fbshipit-source-id: b6d4df544952e11c2ade97d860531cbb2fada36b
Summary: This adds the machinery necessary to create a bundling function, and adds different reusable parts around generating code and maps for bundles. Used for the new integration with Buck
Reviewed By: cpojer
Differential Revision: D4299272
fbshipit-source-id: 59ebe39a454ebf56c2159717c2881088d6d3308a
Summary: This was buggy and didn't print the folder we need to cd into.
Reviewed By: mkonicek
Differential Revision:
D4313396
Ninja: OSS only
fbshipit-source-id: 0e15baf818065b63e939def60a1366e2251aac7d
Summary:
Follow up to fix some issues with 59407f3660. Headers needed to be in the `project` section instead of `private` in xcode so they don't get included in the archive.
cc javache
Closes https://github.com/facebook/react-native/pull/11395
Differential Revision: D4313048
Pulled By: javache
fbshipit-source-id: 805dbbe9f149acfe780be76e99c949c450272358
Summary:
need to remove function declaration in a lexically nested statement
because babel uses 'use strict' by default now
Closes https://github.com/facebook/react-native/pull/11390
Differential Revision: D4308275
fbshipit-source-id: 0d073361d25b23fb67f001225feb72532af38683
Summary:
Seeing as [Windows is a supported platform](72157cf991/packager/defaults.js (L22)) until platforms can better manager their own CLI and packager needs.
Linking 3rd party libraries should be supported first, because then I'd like to do a follow up PR with grabbou to identify how we can effectively move RNPM functionality out of react-native core and eventually housed in each external platform's repo. The goal would be working with cpojer and hopefully andrewimm to help keep external platform needs in their respective repos, for rnpm/packager _et al._ Seeing as this is a major discussion point, I've made this PR first. Making small steps towards this goal, seems to be the approved methodology from all.
Additionally, I have a merged PR that makes an excellent place for documenting the CLI when it advances, as preparatio
Closes https://github.com/facebook/react-native/pull/11282
Differential Revision: D4311391
fbshipit-source-id: be9a836344be4aed6c4732b0ce4947c2a16b6dad
Summary: We now show the npm progress bar.
Reviewed By: mkonicek
Differential Revision:
D4307964
Ninja: OSS only, nit
fbshipit-source-id: 7338ab08abe8cf6354f9a9c6d36c51b0cffc69ee
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?
To fixes#11330 and fixes#11334
Regarding to this command (using in `react-native-git-upgrade` - [cliEntry.js#L261](https://github.com/facebook/react-native/blob/master/react-native-git-upgrade/cliEntry.js#L261))
```bash
npm view react-native@latest peerDependencies.react version --json
```
The result from this command are not consistent across a different npm versions.
We better get a whole `package.json` file by calling (remove field and subfield option)
```
npm view react-native@latest --json
```
**Test plan (required)**
**Setup**
- Publish `react-native-git-upgrade` to `sinopia`
- `npm install -g react-native-git-upgrade`
- Test against multiple npm versions (`2.15.8` or `3.7.5` or `3.10.10` or ` 4.0.3`)
- `react-native init AwesomeApp --version 0.38.0 && cd AwesomeApp`
- `react-native-git-upgrade` and `react-native-git-upgrade 0.39.0` should be working properly
---
Closes https://github.com/facebook/react-native/pull/11348
Differential Revision: D4305894
Pulled By: mkonicek
fbshipit-source-id: 36ea7846926b424f4dd63c77b47db5cb69285027
Summary:
The yarn global add needs to have global before add, it will otherwise just install in in the local project together with the global package.
https://yarnpkg.com/en/docs/cli/global
Closes https://github.com/facebook/react-native/pull/11364
Differential Revision: D4299909
Pulled By: ericnakagawa
fbshipit-source-id: 7b3a7817d2b1105003b9d48d16cf64756bfa51d5
Summary: No need to have two files; merge it into one and give it an appropriate name.
Reviewed By: javache
Differential Revision: D4296716
fbshipit-source-id: 904d13c23bb8d403b8efcb60f9a4aa5df5b08972
Summary: This singleton was unnecessary and can be implemented with a single `static` in `RCTDevMenu`. In another diff, I will rename `RCTWebSocketManager.{h,m}` to reflect the only class that remains.
Reviewed By: javache
Differential Revision: D4296551
fbshipit-source-id: 653971dfb31de5b0a161b531eed82a067f536ce3
Summary: Avoid using properties where unnecessary; stick to only one way to modify the delegate.
Reviewed By: javache
Differential Revision: D4296351
fbshipit-source-id: 94d0e3c90904ed584f691a3f28a15a7ac450c3e1
Summary:
Right now, the ScrollView's keyboard hiding behavior is either all or nothing: Hide the keyboard on any tap, or do nothing ever. This PR introduces a third mode to keyboardShouldPersistTaps which is much closer to what I consider should be the default.
In the new behavior, the tap responding is done in the bubbling phase (instead of the capture phase like =true). As a result, a child can handle the tap. If no child does, then the ScrollView will receive the tap and will hide the keyboard. As a result, changing TextInput focus works as a user expects, with a single tap and without keyboard hiding. But taping on Text or on the empty part of the ScrollView hides the keyboard and removes the focus.
You can view the behavior in a monkey patched ScrollView demo on rnplay:
https://rnplay.org/apps/E90UYwhttps://rnplay.org/apps/UGzhKA
In order to have a uniform props set, i added 3 values to the keyboardShouldPersistTaps:
'never' and 'always' are the same as false and true.
'handled' is the new behavior.
I don't
Closes https://github.com/facebook/react-native/pull/10628
Differential Revision: D4294945
Pulled By: ericvicenti
fbshipit-source-id: 1a753014156cac1a23fabfa8e1faa9a768868ef2
Summary:
This should be there for consistency.
Closes https://github.com/facebook/react-native/pull/11357
Differential Revision: D4294530
Pulled By: kentaromiura
fbshipit-source-id: 6219a7c69a65dde21d96bc032fc9a327386a85ca
Summary: Introduces an API to register a weakly-held listener for the reload (Cmd+R) command. This allows external infrastructure to hook into the reload command before the `RCTBridge` object is even created.
Reviewed By: javache
Differential Revision: D4286980
fbshipit-source-id: 51012fb8cbeb433dc880d9d98d847b07fdbb4c4f
Summary:
`RCTWebSocketExecutor` saves every WebSocket callback when sending message to chrome, but does not clear them in a debug session until the JS bridge is reloaded, and there may be thousands of blocks saved in the callback table. This PR removes them after they are called.
Closes https://github.com/facebook/react-native/pull/11341
Differential Revision: D4295710
Pulled By: javache
fbshipit-source-id: 29a02d1aba320115bbb97aee8981e34b89303c91
Summary:
This is a simple one line change. When a red box is launching the editor, if `launchEditor.js` is aware of your editor it can also add a line number to open the file at. So if the stacktrace shows an error on like 56 in `ako.js` then it'll try`wstorm /Users/somelady/src/project/ako.js:56` instead of `wstorm /Users/somelady/src/project/ako.js`.
This adds PyCharm's command line launcher, which is named `charm`. There is existing logic to handle other JetBrains editors, so I just did a simple one line addition.
**Test plan (required)**
* Install PyCharm (if needed)
* Set environment variable `REACT_EDITOR` to `charm`
* Open PyCharm
* Add/replace the current `charm` command via `Tools -> Create Command-line launcher...` in PyCharm.
* Run a React Native project with an error in the source code.
* In the generated red box, click on one of the entries in the stack trace
* File should open in PyCharm at the correct line number.
Closes https://github.com/facebook/react-native/pull/11275
Differential Revision: D4295724
Pulled By: javache
fbshipit-source-id: 29dec525f76c2f0a3ee203cac67408eecc8ac6b6
Summary:
Small pull request
**motivation**
The doc 'Building React Native from source' is not up to date now.
While i try to build from the source my self, the gradle-download-task(2.0.0) will always fail to download boost zip with a failure of 403.
After i upgrade the gradle-download-task to 3.1.2, the download works well.
**Test plan (required)**
I tested to build the source myself, it works.
This is non-code update, it is document update, hope to help other people who get the same download failure.
**Code formatting**
Non-code update PR.
Closes https://github.com/facebook/react-native/pull/11298
Differential Revision: D4288387
fbshipit-source-id: 5e6feef1ea80f7e3feddcc7e4abf2b5cea82f08f
Summary:
Xcode really sucks, per some discussion on e1577df1fd and https://developer.apple.com/library/content/technotes/tn2215/_index.html, if you use the headers phase, and mark headers in your static library as public, they will actually end up in the final package that's built and you can't submit to the app store! This changes our xcode setup to use a copy files phase instead.
I've also changed the header include path to be $(BUILT_PRODUCTS_DIR)/include, which is added to the include path by Xcode by default, so 3rd party libraries should not be impacted by these changes anymore.
Reviewed By: mkonicek
Differential Revision: D4291607
fbshipit-source-id: 969b9ebcbeb8161f85427f8c429e198d9d0fae30