Summary:
Updates the remaining references to Exponent to Expo, similar in spirit to b698b4ad62. Left the filename of the blog post alone so that permalinks keep working.
Closes https://github.com/facebook/react-native/pull/12776
Differential Revision: D4676911
Pulled By: hramos
fbshipit-source-id: 5b8b8413f95c984df4157e4e1634dd35a78afa29
Summary:
Clearly state that the `getSize()` does not work for static image resources because it is assumed the developer knows their static image resource size (the reason I got from a comment on a github issue by a react native contributor).
This missing documentation cost me about 30 minutes to figure out why it didn't work for my static image resource and so I decided to update the documentation 💃
Closes https://github.com/facebook/react-native/pull/11645
Differential Revision: D4533463
Pulled By: lacker
fbshipit-source-id: 70e175ea30a5540c8a9f2a0c040585c711d82ac3
Summary:
I don't remember exactly where we talked about this but LayoutAnimation on Android is pretty stable now so there's no reason to keep it behind an experimental flag anymore. The only part that is not really stable is delete animations, so what I did is remove the default delete animation that we provide in presets.
**Test plan**
Tested that layout animations work properly without any config.
Closes https://github.com/facebook/react-native/pull/12141
Differential Revision: D4494386
Pulled By: mkonicek
fbshipit-source-id: 5dd025584e35f9bff25dc299cc9ca5c5bf5f17a3
Summary:
PR for option to set mixed content mode in Webview(Android) for issue #8460
Closes https://github.com/facebook/react-native/pull/12314
Differential Revision: D4663084
Pulled By: lacker
fbshipit-source-id: 0e40ea463739166311ddcb7887ff6d0289369637
Summary:
Corresponding Android PR: #12276
Respect the withCredentials XMLHttpRequest flag for sending cookies with requests. This can reduce payload sizes where large cookies are set for domains.
This should fix#5347.
This is a breaking change because it alters the default behavior of XHR. Prior to this change, XHR would send cookies by default. After this change, by default, XHR does not send cookies which is consistent with the default behavior of XHR on web for cross-site requests. Developers can restore the previous behavior by passing `true` for XHR's `withCredentials` argument.
**Test plan (required)**
Verified in a test app that XHR works properly when specifying `withCredentials` as `true`, `false`, and `undefined`. Also, my team uses this change in our app.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12275
Differential Revision: D4673644
Pulled By: mkonicek
fbshipit-source-id: 2fd8f536d02fb39d872eb849584c5c4f7e7698c5
Summary:
A related Android PR is #11008.
Font scale was exposed through:
- The `getContentSizeMultiplier` method
- The `didUpdateContentSizeMultiplier` event
These are now deprecated. The reason is that there was already an API that exposed font scale. However, it was Android only. We now expose font scale through that API on iOS as well. Specifically:
- Font scale is now available as `PixelRatio.getFontScale()`.
- The `change` event on the `Dimensions` object now fires when font scale changes.
This change also adds support for `Dimensions.get('screen')` on iOS. Previously, only `Dimensions.get('window')` was available on iOS. The motivation is that, [according to this comment](https://github.com/facebook/react-native/pull/11008#issuecomment-275123609), we'd like to deprecate `window` dimensions in favor of `screen` dimensions in the future.
**Test plan (required)**
Verified that `PixelRatio.getFontScale()` and the `change` event work properly in a test app.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12268
Differential Revision: D4673642
Pulled By: mkonicek
fbshipit-source-id: 2602204da6998a96216e06f5321f28f6603e4972
Summary:
04d870b added support for onabort in XHRs. The other on* events are declared on XMLHttpRequest and XMLHttpRequestEventTarget. This adds onabort there as well.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12277
Differential Revision: D4673648
Pulled By: mkonicek
fbshipit-source-id: 0c5255da77537103c5ad91d9b2826d064140708d
Summary:
Fixes#11592
This bug was seen on a Galaxy S4 running Android 4.4.2. On this device, Android's `Layout.getDesiredWidth` method doesn't correctly measure text that contains unicode emoticons. It appears to think the emoticons take up 0 space.
Setting ANTI_ALIAS_FLAG in the TextPaint's constructor instead of setting it later with setFlags works around the Android bug.
**Test plan (required)**
My team uses this fix in our app.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12690
Differential Revision: D4673649
Pulled By: mkonicek
fbshipit-source-id: 535f371281927bfff5d8b42966496bc8daf30045
Summary:
MapView has been deprecated in open source for a while: http://facebook.github.io/react-native/docs/mapview.html
We still want to use it internally. Moving it away from the GitHub folder.
Reviewed By: mmmulani
Differential Revision: D4646199
fbshipit-source-id: f469971e448dbca12afe141b43fa8a2518c7d467
Summary:
For some reason the parser doesn't support that syntax. It fails with:
```
Cannot parse file ../Libraries/Animated/src/AnimatedImplementation.js Error: parseSource returned falsy
at parseAPIInferred (/home/ubuntu/react-native/website/server/extractDocs.js:343:13)
```
Reviewed By: sahrens
Differential Revision: D4669961
fbshipit-source-id: 3536c94b8f385f5810c47544c4a72c8c785bf0e5
Summary: This adds an alternative logging method that can be called from native side. `logIfNoLoggingHook()` will pass the message to console only if there's Chrome debugger attached. This new method sends the message to console regardless to notify the developers better.
Reviewed By: yungsters
Differential Revision: D4669663
fbshipit-source-id: 3940816dadd08d450f066b7223f6d26a38a70921
Summary:
Some of the operations, like `oneOf` and `arrayOf`, were doing joins on arrays of potential
tags, like `<span>` or `<a>`, which would stringify them to `[object Object]`.
This introduces a new `spanJoinMapper` which suppresses the trailing separator like `join` but wraps
elements in `<span>` rather than `concat`ing into a string.
Latest master is pretty broken:
{F66059444}
Nested `color` and some other props were broken even before https://github.com/facebook/react-native/commit/a7a3922b89d821b9a34d26bdcc7676e747a2716
{F66059446}
All fixed in this diff:
{F66059445}
Reviewed By: mkonicek
Differential Revision: D4670441
fbshipit-source-id: ddc10f13b3bdc6a1e799fa06a4e206f8dbd08769
Summary:
This prevents someone from only putting `RCT_EXPORT_METHOD(...)` around some of the arguments to a method and generally causing confusion. Yes, before this diff it would still compile correctly if you did something like:
```
RCT_EXPORT_METHOD(lol:(NSNumber *)lol)
blah:(id)blah
{
NSLog(@"%@ %@", lol, blah);
}
```
Reviewed By: fkgozali
Differential Revision: D4660019
fbshipit-source-id: 1829a47e5c8d5e8ce93edca2ac7efd7e2bfdf840
Summary:
Enable back navigation on Apple TV (with the remote's menu button) in code making use of BackAndroid. The module is renamed to BackHandler. BackAndroid is still exported to ReactNative for now, until external projects switch to using the new name for the module. The navigation in https://github.com/react-community/react-navigation makes use of this module.
**Test plan**: Manual testing with an example app (https://github.com/dlowder-salesforce/react-nav-example).
Closes https://github.com/facebook/react-native/pull/12571
Differential Revision: D4665152
Pulled By: ericvicenti
fbshipit-source-id: 925400ce216379267e014457be6f5eedbe4453ec
Summary: It's ok for them to be empty, so we should check!
Reviewed By: yungsters
Differential Revision: D4664411
fbshipit-source-id: c66e98458708eee59757fa665b3a05972f1c1b70
Summary: Initializing natives modules on the UI thread blocks the JS thread if the UI thread is busy.
Reviewed By: yungsters
Differential Revision: D4611211
fbshipit-source-id: cd4fb9cb5e52a478b6692b784cfd9e3bf34c0d34
Summary:
Explain a bit more how these are used.
Closes https://github.com/facebook/react-native/pull/12753
Differential Revision: D4663972
Pulled By: hramos
fbshipit-source-id: acbda6593e3f2a01776d2208f6ef3bc69bca0eef
Summary:
fs-extra's first stable release is out since 1 of November.
I think its time to upgrade to 1.0.0. We've been running 1.0.0 locally and is having no problems with it.
**Test plan (required)**
Walked through the commits from 0.30 to 1.0.0 and no breaking changes has been made to the repository. https://github.com/jprichardson/node-fs-extra/compare/1.0.0...1.x
Closes https://github.com/facebook/react-native/pull/11542
Reviewed By: zertosh
Differential Revision: D4444576
Pulled By: hramos
fbshipit-source-id: 520311af8dc0911c026c08bdb74bec6572e7e17f
Summary:
At times, ReactPackage needs to get information from the ReactInstanceManager, e.g. to get the DevSupportManager for debugging purpose. This allows passing down the instance manager to create the native modules, in addition to just ReactApplicationContext. It is then up to the Package to use it or not.
To use this, you must make your package class extends ReactInstancePackage, instead of just implementing ReactPackage interface.
Reviewed By: mmmulani
Differential Revision: D4641997
fbshipit-source-id: 497c4408a7d2b773c49f08bff7c1bf8f9d372edb
Summary:
**Motivation**: Having full tests for both iOS and tvOS is hard on Travis, and it's probably ok to not run full tests on tvOS. However, we should make sure that tvOS at least builds and doesn't have missing files.
Also fixed a warning import.
Closes https://github.com/facebook/react-native/pull/12642
Differential Revision: D4661571
Pulled By: mkonicek
fbshipit-source-id: 45932113951c01e35d6e8ce91af2522cb135efe8
Summary:
Updating the info about Myntra
We've also gotten our Android apps on React Native now. I also gave a talk on our journey and have updated the infoLink for the same.
I currently work for Myntra.
Closes https://github.com/facebook/react-native/pull/12736
Differential Revision: D4659904
Pulled By: hramos
fbshipit-source-id: c2a93d34e56979c05106d378695dbc5345bf9a2c
Summary:
The issue is on ARM builds for Windows UWP. For the C# P/Invoke API wrapper, any native method that returns the YogaValue struct throws the AccessViolationException. The issue is not with structs in general, as returning the YogaSize / YGSize struct works fine. The issue seems to be limited to structs that have an enum member.
I tried a number of things to resolve the issue without changing the underlying native API for Windows. I read the ARM documentation and saw reference to variable enum sizes based on the number of enum members, so I tried to use a number of different UnmanagedType values in a [MarsalAs()] attribute on the enum member of the C# struct declaration.
What ultimately worked was to return a pointer to the location of the struct, and use the System.Runtime.InteropServices.PtrToStructure API to read the struct data from that pointer. I added a few new macros that will return the struct address on Windows only, other builds are not affected.
Note, I have not tested the impact of this ch
Closes https://github.com/facebook/yoga/pull/459
Reviewed By: emilsjolander
Differential Revision: D4652278
Pulled By: splhack
fbshipit-source-id: bf7ada4da1781e3f813b3ba331974b7bded476d9
Summary:
Doing some cleanup here, mostly removing entries that lack an engineering blog post focused on React Native.
- Removes links to F8 2016 app. New entry coming soon!
- Add [Tesla](https://twitter.com/timdorr/status/830423561592532993)!
- Update some article titles, and link to newer content
Closes https://github.com/facebook/react-native/pull/12693
Differential Revision: D4654541
Pulled By: hramos
fbshipit-source-id: 3b22309ecc344fb5de2bcab36a64b69dd55c2f78
Summary: TabBarIOS has a dummy module on Android, but it doesn't export TabBarIOSItem so if you try to use TabBarIOS.Item you'll get a redbox.
Reviewed By: frantic
Differential Revision: D4653962
fbshipit-source-id: 36ca2527d8eac2d28d35c3ac69ced5bf50b2e682
Summary:
Doing some cleanup in preparation for CRNA.
Recommend `FlatList` and React Navigation for perf.
Tag docs that may only apply to apps ejected from CRNA. Currently has no effect.
Closes https://github.com/facebook/react-native/pull/12692
Differential Revision: D4654077
Pulled By: hramos
fbshipit-source-id: 1245d80d66e37d9dca9e9daf23e8b93c65cd1bf7
Summary:
With the latest version of React Native I noted my setup with React Native Storybook stopped working because it stopped searching all the right project roots. I found that it had to do with the change here bce6ece5f6
**Test plan (required)**
Run the CLI with a project root other then the root directory and ensure that it displays both the specified project root and the actual root directory.
Closes https://github.com/facebook/react-native/pull/12659
Differential Revision: D4658137
Pulled By: ericvicenti
fbshipit-source-id: 97d3784348f92394df111f189c6b00dd0165b75e
Summary:
Runs the `./ios-install-third-party.sh` script as part of the build process to avoid having to do it manually when building the cxx bridge with xcode. Also added the third-party dir to gitignore.
**Test plan**
Tested that just building works when the third-party dir is missing.
Closes https://github.com/facebook/react-native/pull/12694
Differential Revision: D4658165
Pulled By: ericvicenti
fbshipit-source-id: 9b51b88eb26637b19266bf85deafa41e3a77a645
Summary:
We're currently taking ownership of react-router-native and have shipped several beta releases that do not wrap the NavigationExperimental API. In order to avoid confusion, I'd appreciate it if we could avoid mentioning react-router-native here. Thanks :)
Closes https://github.com/facebook/react-native/pull/12691
Differential Revision: D4654551
Pulled By: hramos
fbshipit-source-id: d1f393cefc87f087d4e9c19b7cbee861f0a2d29a