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
Summary:
When running the Movies Example, the application displays an error message: "Cannot read property 'total' of undefined".
<img width="374" alt="capture d ecran 2017-03-01 a 21 26 50" src="https://cloud.githubusercontent.com/assets/3247607/23479864/2871c52a-fec6-11e6-9266-8a5fe44adfe4.png">
This is due to the fact that the API call raised an error, and the catch block is followed by a then block, which means that the code in the second then bloc will be executed.
The fix is to move the catch at the last position, to prevent any further execution in case of network error.
Closes https://github.com/facebook/react-native/pull/12641
Differential Revision: D4657739
Pulled By: ericvicenti
fbshipit-source-id: bdc58d2b89a7d2a53de716773e7bc8a735fa2e45
Summary:
Motivation:
Few days ago gaearon [filed an issue](https://github.com/facebook/react-native/issues/12406) that examples in the react-native repo doesn't work after the [recent changes in local-cli](bce6ece5f6). This PR fixes reported bug.
**Test plan (required)**
- No UI changes
- [x] Run UIExplorer from XCode (no package.json in the folder) and check if packager/application runs correctly
cc davidaurelio satya164 grabbou
Closes https://github.com/facebook/react-native/pull/12435
Differential Revision: D4657370
Pulled By: ericvicenti
fbshipit-source-id: 72ee4b96cae37c7ed2794ed4490ce7b4fbbd66c3
Summary:
Remove the native iOS sticky headers implementation that has been replaced by the js Animated one. Also remove a line in JS that made sure we passed null to native so it did not use the native implementation.
**Test plan**
Made sure there were no more mentions of sticky / header in native ScrollView related code.
Tested that sticky headers still work :o
Closes https://github.com/facebook/react-native/pull/12696
Differential Revision: D4657391
Pulled By: ericvicenti
fbshipit-source-id: 16324a45ca4ce5cd143293c61394a0fa7ad0c4a1
Summary:
Add missing step needed to run your project on a device
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
**Test plan (required)**
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
Make sure tests pass on both Travis and Circle CI.
**Code formatting**
Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob
Closes https://github.com/facebook/react-native/pull/12718
Differential Revision: D4657289
Pulled By: ericvicenti
fbshipit-source-id: f73736027d3872c63046c8a46307e9b486b4d444
Summary:
Fixes a bug that happens when trying to use ScrollView with sticky headers and native `Animated.event` with `onScroll`. Made a few changes to the ListViewPaging UIExplorer example to repro https://gist.github.com/janicduplessis/17e2fcd99c6ea49ced2954d881011b09.
What happens is we need to be able to add multiple events to the same prop + viewTag pair. To do that I simple changed the data structure to `Map<prop+viewTag, List<AnimatedEventDriver>>` and try to optimize for the case where there is only one item in the list since it will be the case 99% of the time.
**Test plan**
Tested by reproducing the bug with the above gist and made sure it was fixed after applying this diff.
Closes https://github.com/facebook/react-native/pull/12697
Differential Revision: D4656347
Pulled By: sahrens
fbshipit-source-id: b5c36ba796f478e56028c7a95bc0f86bc54cb2ce