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
Summary:
I am starting fresh on a new Mac and took another stab at the instructions.
- Java SDK 7 seems to work just fine.
- Adjusted Custom Android Studio installation instructions to use bare minimum required.
- Updated AVD configuration instructions with necessary changes to run AVD the first time.
- Added note on using real devices.
- Removed notes warning against use of API Level 23, these do not belong on a Getting Started guide.
- Added step to install Xcode Command Line Tools.
- Use `.profile` over `.bashrc` as the latter is shell-specific and is not loaded on login shells (e.g. new Terminal windows). `.profile` will work on bash, however, which is the default macOS shell.
- Added screenshots.
Went through steps for setting up RN for iOS as well as Android on a new Mac. Ended with apps running on the iOS Simulator and a AVD.
Generated website and verified instructions rendered correctly for each of the OS/device permutations.
Closes https://github.com/facebook/react-native/pull/12272
Differential Revision: D4637737
Pulled By: hramos
fbshipit-source-id: 5d322e4d55dbabc70f70471622a2f379ac6230cb
Summary:
The showcase is displayed in the homepage as well as in a standalone showcase page. The source data for these two pages is embedded in each page, resulting in repetition of data across both.
This PR splits out all of the showcase data to its own file, which is then loaded into the Metadata component during website generation.
`cd website && npm start`, then verified index and showcase loaded successfully
`cd website && node server/generate.js`, confirmed script runs successfully
Closes https://github.com/facebook/react-native/pull/12626
Differential Revision: D4632036
Pulled By: hramos
fbshipit-source-id: 2d1ad890e78e457205179e36c3ef04ffec354ad9
Summary:
Docs change to encourage people to use React Navigation over other options.
Explains a bit of history about Navigator and NavigationExperimental.
Remove an intro guide that encourages use of Navigator. Hopefully the existing ReactNav guide fills this void.
Navigator docs are less emphasized but still present.
Reviewed By: mkonicek
Differential Revision: D4634452
fbshipit-source-id: 26763c2f02530009b3dfd20b0590fadcb5ea35ee
Summary:
Move configuration to new ```YGConfig``` and pass them down to CalculateLayout. See #418 .
Adds ```YGConfigNew()``` + ```YGConfigFree```, and changed ```YGSetExperimentalFeatureEnabled``` to use the config.
New function for calculation is ```YGNodeCalculateLayoutWithConfig```.
Closes https://github.com/facebook/yoga/pull/432
Reviewed By: astreet
Differential Revision: D4611359
Pulled By: emilsjolander
fbshipit-source-id: a1332f0e1b21cec02129dd021ee57408449e10b0
Summary:
This diff adds display:none support to React Native. This enables hiding components which still calling their render method and keeping them within the state of your application. This enables preserving state in a component even though the component is not visible. Previously this was often implemented by rendering a component off screen as a work around. See below playground for usage.
```
class Playground extends React.Component {
render() {
return (
<View style={{width: '100%', height: '100%', flexDirection: 'row', backgroundColor: 'white'}}>
<View style={{width: 100, height: 100, display: 'none', backgroundColor: 'red'}}/>
<View style={{width: 100, height: 100, backgroundColor: 'blue'}}/>
</View>
);
}
}
```
Reviewed By: astreet
Differential Revision: D4611771
fbshipit-source-id: 0dbe0494d989df42994ab9ad5125d47f3233cc5a
Summary: I think these are sufficiently baked. Also beef up comments.
Reviewed By: yungsters
Differential Revision: D4632604
fbshipit-source-id: 64ae6b240a05d62e418099f7403e1781f9b4717c
Summary:
Absolute imports on Windows were broken, I'm not 100% sure when this happens but when I tested Exponent on Windows which uses `rn-cli.config.js` with
```js
getTransformOptions() {
return {
reactNativePath: path.resolve('./node_modules/react-native'),
reactPath: path.resolve('./node_modules/react'),
};
}
```
it seemed to use absolute paths for these modules.
I also tested absolute paths in node repl and it does work for absolute paths of different formats. `C:/root/test.js`, `/root/test.js`, `C:\root\test.js` all do resolve properly to the same module.
To fix this I resolve the absolute path using `path.resolve` on Windows. Noop on other platforms to avoid the overhead since it's not necessary.
**Test plan**
- Tested that it fixed the bug I had when running Exponent on Windows.
- Updated the absolute path test to use forward slashes since this is what happens in practice when using `getTransformOptions`. We can't test all cases on linux since adding the drive letter au
Closes https://github.com/facebook/react-native/pull/12530
Differential Revision: D4634699
Pulled By: jeanlauliac
fbshipit-source-id: 0cf6528069b79cba2e0f79f48f5a524d59b7091e
Summary:
This is #12292, but squashed into a single commit. This should help land the PR cleanly, as the commit history for #12292 was in a bad state: see how 1cbf79d456172c1d348a925d32a7f817df4aaf4b expects `"mkdirp": "^0.5.1"` in `package.json`, but the earlier 66920e4e4b04174d63834d6220c4da76453f27a2 had changed this to `"mkdirp": "*",`.
Verified the website built and run.
Confirmed docs, apis, components were generated.
Confirmed landing page, showcase, blog, docs, help page all load and look as expected.
Closes https://github.com/facebook/react-native/pull/12575
Differential Revision: D4617979
Pulled By: hramos
fbshipit-source-id: 86e2d0b36ccd25fc7f2e9f3b1351f97e7ba64d57
Summary: Simplify the UIExplorer setup, and remove dependency on NavigationExperimental, which is being phased out in favor of React Navigation.
Reviewed By: mkonicek
Differential Revision: D4627131
fbshipit-source-id: 6294623a885074a73c831b0d817770fbe8a90221
Summary:
This should get our node environments to match between internal tests and Travis runs
Closes https://github.com/facebook/react-native/pull/12624
Differential Revision: D4630451
Pulled By: hramos
fbshipit-source-id: 57db3411c9e7b20f13e9f5b37d663fa1726c08e3
Summary:
This will limit Slack's notifications to the #ci channel to whenever the build goes from green to red and vice versa on the default branch (master).
Closes https://github.com/facebook/react-native/pull/12611
Differential Revision: D4629295
Pulled By: hramos
fbshipit-source-id: dc04b774b32b262070c8cd3cc8f88c70a5729217
Summary:
Encourage people to test on the latest stable release.
Closes https://github.com/facebook/react-native/pull/12567
Differential Revision: D4629303
Pulled By: hramos
fbshipit-source-id: d3828607d5c26e562cc418cff8c51ede38d69a6b
Summary:
This switches our React feature flag so that componentWillMount happens before
componentWillUnmount when a child switches. It used to be inconsistent and this
makes it consistent and inline with what React Fiber does.
Breaking change. May cause issues.
Reviewed By: spicyj, bvaughn
Differential Revision: D4626543
fbshipit-source-id: f7eaf1ebd479ca9fada012f903a2f972a7901b40
Summary:
Changed the flex getters to return the values they were actually set. See #421 .
Closes https://github.com/facebook/yoga/pull/431
Reviewed By: astreet
Differential Revision: D4604744
Pulled By: emilsjolander
fbshipit-source-id: 02d79100ef22be866db1c3bd9d53e4447186811f