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
Summary: RCTDevSettings incorrectly assigned "bad" executor-override class to the executor instead of checking if the class exists before assigning it. It should really check if the class exists, and fallback to defaults otherwise.
Reviewed By: mmmulani, yungsters
Differential Revision: D4655926
fbshipit-source-id: 48c8fe28f22aaa8430752411ce5e6e858dbd4b32
Summary:
Wrapping them in ScrollViewStickyHeader broken the onLayout and would always give y = 0
because it is now relative to the wrapper.
This uses some not-so-great react magic, but fixes the bugs with no aparent side-effects.
Note we also need to kill the StaticRenderer wrapper that ListView introduces. I think this was
probably a premature optimization anyway since there are usually not many headers and they are
usually pretty cheap to render. If people care, they can use `shouldComponentUpdate` with the
rendered components.
Reviewed By: yungsters
Differential Revision: D4654622
fbshipit-source-id: 1ea557ef64327d1f4df53b22fedd678da1549288
Summary:
We're seeing ` inputRange must be monotonically increasing -1,0,0,-33,-32 ` which happens when we
have zero height headers, wherever those come from...maybe rendering null?
The math was also off and didn't handle variable height headers correctly, and it was confusing
because it was `setNextHeaderY` with the header y _minus it's height_, which only works
if the prev height was also the same height.
Reviewed By: furdei
Differential Revision: D4649404
fbshipit-source-id: c2c2d438fa0d0b979c2cbdfa5752eaf86c14768b
Summary:
If we set ```display:none``` all children are set with layout sizes/values of 0. We need do mark all those children as dirty to force a relayout if we toggle the display on a higher parent node. This fixes#443
Closes https://github.com/facebook/yoga/pull/448
Reviewed By: astreet
Differential Revision: D4642273
Pulled By: emilsjolander
fbshipit-source-id: dfdb920e2049952bd6c7f48cfa53b1448e1f3e8f
Summary:
This sets the new ```YGExperimentalFeatureMinFlexFix``` explicitly to false in the config.
It also a changes a stretch reason to reflect that it is the strech in a multiline.
Closes https://github.com/facebook/yoga/pull/447
Reviewed By: astreet
Differential Revision: D4642275
Pulled By: emilsjolander
fbshipit-source-id: 26777db7008ff6ee86da72ca9ea19e979b916cc9
Summary:
Use ```float``` for calculation, as we would calculate with ```double``` and cast to float afterwards otherwise. So this removes the warning.
Closes https://github.com/facebook/yoga/pull/450
Reviewed By: astreet
Differential Revision: D4642267
Pulled By: emilsjolander
fbshipit-source-id: 184ef24474f2b8a42654a71a8e98839296648b2b
Summary:
Removing unused code. We used to have this dependency for the RecyclerViewBackedScrollView, which has been removed.
**Test plan (required)**
Tests pass on Circle CI.
Closes https://github.com/facebook/react-native/pull/12636
Differential Revision: D4646561
Pulled By: ericnakagawa
fbshipit-source-id: 285de78debec306078eb9ad34a2339f95bc42a9c
Summary:
Small fix. Adds a proptype for the injectJavaScript function, added in da9a712a9e.
Closes https://github.com/facebook/react-native/pull/12665
Differential Revision: D4645803
Pulled By: hramos
fbshipit-source-id: 863e5bf82b853914ac08f9f5b2c141d35882afc7
Summary:
This re-implements sticky headers in JS to make it work on Android.
The only change that was needed was to expose a way to attach a an animated value to an event manually since we can't use the Animated wrapper and `Animated.event` to do it for us because this is implemented directly in the `ScrollView` component. Simply exposed `attachNativeEvent` that takes a ref, event name and event object mapping. This is what is used by `Animated.event`.
TODO:
- Need to check why momentum scrolling isn't triggering scroll events properly on Android.
- Remove native iOS implementation
- cleanup / fix flow
**Test plan**
Test the example list in UIExplorer, test the ListViewPaging example.
Closes https://github.com/facebook/react-native/pull/11315
Differential Revision: D4450278
Pulled By: sahrens
fbshipit-source-id: fec8da2cffce9807d74f8e518ebdefeb6a708667
Summary: NavigationExperimental is deprecated, so we should avoid documenting it with examples
Reviewed By: lacker, hramos
Differential Revision: D4634484
fbshipit-source-id: 6c8b114d2a7b49c75ec548025384fa6ed75cb2d2
Summary: Starting in RN 0.43, lets start recommending people to move off of NavExperimental, now that a better navigation option is available, and hybrid options on the horizon.
Reviewed By: hramos
Differential Revision: D4634268
fbshipit-source-id: 2f37cc62f9729ae123d85f609a88f84516a5ae92
Summary:
This adds blurRadius support for <Image>, similar to iOS.
The heavy-lifting was done by lambdapioneer in the stack of diffs ending with
D3924013, we're just patching this in.
Two notes: we might need to apply two postprocessors going forward, will tackle
that in a separate diff, so we can ship this asap.
However, we need a new version of fresco to be released in order
to ship this.
Reviewed By: lexs
Differential Revision: D3936438
fbshipit-source-id: 353bf1f1120ebd5f4f8266c5a20188b41478a741
Summary:
Set the initial opacity based on the style opacity instead of defaulting to 1. Without this change, if the opacity on the view is set to 0.5 (for example), the component will render with 1 opacity and then after a press and release it will set to 0.5. This fixes it to set to the correct value on mount.
**Test plan (required)**
Example code:
```
<TouchableOpacity
activeOpacity={1}
style={STYLES.Button}>
{...}
</TouchableOpacity>
```
```
const STYLES = StyleSheet.create({
Button: {
opacity: 0.5,
},
});
```
Before (notice starts out dark and then after click and release becomes light):
![before](https://cloud.githubusercontent.com/assets/19673711/23444255/c120cbb0-fde8-11e6-8c03-ef4f0f25736b.gif)
After (starts out light and is the same light color after a click and release):
![after](https://cloud.githubusercontent.com/assets/19673711/23444254/c106a6e0-fde8-11e6-8181-def45b7bb84f.gif)
Closes https://github.com/facebook/react-native/pull/12628
Differential Revision: D4641509
fbshipit-source-id: 3b6cf653fe837df704007f585c655d4450d14497