Summary:
The Android ImageEditingManager is inefficient and slow when cropping images. It loads the full resolution image into memory and then crops it. This leads to slow performance and occasional OutOfMemory Exceptions.
[BitmapRegionDecoder](https://developer.android.com/reference/android/graphics/BitmapRegionDecoder.html) can be used to crop without needing to load the full resolution image into memory. Using it is much more efficient and much faster.
Relevant issue: https://github.com/facebook/react-native/issues/10470
Attempt to crop a very large image (2000x2000) on Android. With this change, the crop should happen almost instantly. On the master branch, it should take 2-3 seconds (and might run out of memory).
Please let me know if there's anything else I can provide.
Closes https://github.com/facebook/react-native/pull/15439
Differential Revision: D5628223
Pulled By: shergin
fbshipit-source-id: bf314e76134cd015380968ec4533225e724c4b26
Summary:
Added the ability to define a specific applicationId (in case it's different to the package name)
<details>
Thanks for submitting a PR! Please read these instructions carefully:
- [x] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
Please read the [Contribution Guidelines](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md) to learn more about contributing to React Native.
</details>
We have a specific requirement that our package name differs from the applicationId but not in a way that allows us to add it as a suffix to our package name. I wanted to add the option to specify a specific applicationId.
`react-native run-android --appId <Specific Application Id>`
Closes https://github.com/facebook/react-native/pull/14524
Differential Revision: D5910259
Pulled By: shergin
fbshipit-source-id: 768fbc910f6b520dd18936f6bceeee136fca7025
Summary: Now it does not clipped on iPhone X.
Reviewed By: yungsters
Differential Revision: D5907527
fbshipit-source-id: 10d05e4ac5d16a9e257efa78795bff9f14f4c0bb
Summary:
Instead of preventing events from working when not on the UI Thread we can just dispatch to it instead.
**Test plan**
Tested manually that animated events still work in RNTester
Closes https://github.com/facebook/react-native/pull/15953
Differential Revision: D5909816
Pulled By: shergin
fbshipit-source-id: 48d02b6aa9f2bc3bcb638e8852fccaac3f205276
Summary:
As of v1.4.0, a new devtools hook is used that is hosted within `relay-devtools` instead of `relay-runtime`. That allows debugging of production relay apps, and reduces byte size of Relay.
As a result, relay-debugger-react-native-runtime and RelayDebugger can be removed.
Reviewed By: kassens
Differential Revision: D5904296
fbshipit-source-id: 2b215f5a25ecb2922b00cdf86f7d31415d8d1328
Summary: NaN values can not be compared directly, so we have to use `isnan` function.
Reviewed By: mmmulani
Differential Revision: D5859761
fbshipit-source-id: bf99a1ae574cd820265bef0c2bd255b194c5dc3c
Summary: As per the comment, <Modal> uses entering/leaving the view hierarchy as a cue to show/hide the modal. By re-adding it, we are causing a bunch of confusion.
Reviewed By: shergin
Differential Revision: D5893607
fbshipit-source-id: ecd05799751a9bba843998ae93f24fe35edca8b4
Summary:
Now it does not clipped on iPhone X.
{F74889000}
Reviewed By: mmmulani
Differential Revision: D5894101
fbshipit-source-id: 5dc91583aa38bb14607421e5afc2ae796e35cce0
Summary:
<SafeAreaView> renders nested content and automatically applies paddings reflect the portion of the view
that is not covered by navigation bars, tab bars, toolbars, and other ancestor views.
Moreover, and most importantly, Safe Area's paddings feflect physical limitation of the screen,
such as rounded corners or camera notches (aka sensor housing area on iPhone X).
Reviewed By: mmmulani
Differential Revision: D5886411
fbshipit-source-id: 7ecc7aa34de8f5527c4e59b0fb4efba3aaea28c8
Summary:
In some cases we need a way to specify some environmental data to shadow view
to improve layout (or do something similar), so `localData` serves these needs.
For example, any stateful embedded native views may benefit from this.
Have in mind that this data is not supposed to interfere with the state of
the shadow view.
Reviewed By: mmmulani
Differential Revision: D5884711
fbshipit-source-id: f0bf66e4608894ec4479b8aca262afcfba6b9f4b
Summary:
This problem tries to solve issue #14244
Implemented a fetch request to a TLSv1 server. It now successfully resolves TLS handshake.
Tested same fetch to TLSv1.2 server and still successfully resolves TLS handshake.
Closes https://github.com/facebook/react-native/pull/14245
Differential Revision: D5898689
Pulled By: shergin
fbshipit-source-id: 8766ebe6909443367651ab868aa5ff62747cd906
Summary:
Previously, the example MyListItem never referenced the selected prop, leaving ambiguity about the intention of the demo.
By adding a concrete implementation with coloring based on the selected prop, we can see that this is a demo of a multi-select list for batch actions instead of, say, a click-to-navigate nested list.
Here is a working Snack demo for future reference:
https://snack.expo.io/BkRMRTGB-
References #14872
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14957
Differential Revision: D5892186
Pulled By: sahrens
fbshipit-source-id: c7b46b5f6eae8f36bd4bda7cbbd354cc22108b42
Summary:
1. Fix bug: Android project do not delete font files when run `react-native unlink`.
2. Add feature, link images to iOS project when run `react-native link`.
Closes https://github.com/facebook/react-native/pull/14801
Differential Revision: D5890051
Pulled By: hramos
fbshipit-source-id: 28223d181ac5ed51d70df29a56eb56b2cce9aecb
Summary:
- Enable logging so `console.log` shows up in Xcode console (and CI?)
- Allow loading from bundler for rapid JS iteration.
- Add option to enable JS debugging, although it's a little ghetto.
Reviewed By: mmmulani
Differential Revision: D5869085
fbshipit-source-id: 9c4831859f1491f7f75786f730d8549d69623888
Summary: Adds an onDismiss so that navigation events can be chained to the dismissing of a modal.
Reviewed By: sahrens
Differential Revision: D5852953
fbshipit-source-id: a86e36fdd5b0b206c2dd9fa248e2a88da22efa31
Summary:
Following the migration guide. Let's see what happens here.
Closes https://github.com/facebook/react-native/pull/14955
Differential Revision: D5877682
Pulled By: hramos
fbshipit-source-id: 2a40560120b5d8d28bc6c52cc5e5916fd1bba336
Summary: Apple changed what messages get logged when a web socket connection fails. Lets hide them to make life better for engineers.
Reviewed By: javache
Differential Revision: D5879306
fbshipit-source-id: cde06405b4af251159269218bf922916a79ac840
Summary:
As a new user it took me a while to figure out you can import these examples directly. The import statement completes the example for new users like me who have no idea these components can be imported. It is a very important piece of information and it is hard to find otherwise.
I think this should be added to all the other component examples as well.
Documentation only.
Closes https://github.com/facebook/react-native/pull/15501
Differential Revision: D5882436
Pulled By: hramos
fbshipit-source-id: 2da0fe4c7c41e2fdb6b13a945460e17e16442d62
Summary:
This change improves the documentation for `ActionSheetIOS.js`. It's a bit skimpy as is.
Closes https://github.com/facebook/react-native/pull/16030
Differential Revision: D5882446
Pulled By: hramos
fbshipit-source-id: b59ce299a9142ebf015ed674c59e1e435deb759a
Summary:
HeadlessJsTaskConfig parameters can be unclear, so I added one more parameter that was left set by default and the respective comments.
Closes https://github.com/facebook/react-native/pull/16054
Differential Revision: D5881373
Pulled By: hramos
fbshipit-source-id: 3d271f73921417d82e3a2c7a1aaabe92aef7ec69