Commit Graph

9811 Commits

Author SHA1 Message Date
Eric Vicenti da04a6b1f3 Remove NavigationExperimental examples
Summary: NavigationExperimental is deprecated, so we should avoid documenting it with examples

Reviewed By: lacker, hramos

Differential Revision: D4634484

fbshipit-source-id: 6c8b114d2a7b49c75ec548025384fa6ed75cb2d2
2017-03-02 13:17:35 -08:00
Eric Vicenti a0f49fcbd5 Add deprecation warning for NavigationExperimental
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
2017-03-02 11:00:46 -08:00
Jean Lauliac 0cb2bc104f packager: make DependencyGraph.processFileChange private
Reviewed By: davidaurelio

Differential Revision: D4635645

fbshipit-source-id: baf3ec75927dfa2d1b29d6548a13453370f434ba
2017-03-02 08:53:55 -08:00
Jean Lauliac 067496e5f6 packager: ResolutionRequest: use moduleMap instead of hasteMap
Reviewed By: cpojer

Differential Revision: D4605535

fbshipit-source-id: bc8394eb296f3fbeda5d8f0f3c17790db8691033
2017-03-02 08:53:55 -08:00
Jean Lauliac 5d37bfa605 packager: DependencyGraph-test: fix tests
Reviewed By: davidaurelio

Differential Revision: D4635348

fbshipit-source-id: 0130496e20d54f5ddf6546823b7a6cba3118917d
2017-03-02 08:53:55 -08:00
Ludo Fardel 0b348095b6 blurRadius for Image
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
2017-03-02 07:47:21 -08:00
Christoph Pojer 94901b1e1d Bring back polyfill test
Reviewed By: jeanlauliac

Differential Revision: D4642517

fbshipit-source-id: 0882f453eb91c9f12a9e507ccfa60873106d2d71
2017-03-02 05:29:59 -08:00
Matt Mahoney fea8745845 Add missing Immutable-List parameter
Reviewed By: kassens

Differential Revision: D4636523

fbshipit-source-id: 99bbf32005073ef534c8b7d42109d9a1a1c2f945
2017-03-01 23:01:01 -08:00
alejandro garcia dc334b0e55 Improved flow on Picker.Item
Summary:
Flow improvement: Added ColorPropType on color property on Picker component
Closes https://github.com/facebook/react-native/pull/12528

Differential Revision: D4619897

Pulled By: ericvicenti

fbshipit-source-id: 6356d6f4ae6d2db3d93a56882ec51d140f9ac2ab
2017-03-01 22:19:30 -08:00
mlanter f66fba83cf Set initial opacity based on style
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
2017-03-01 21:46:40 -08:00
Spencer Ahrens d2ed064519 Add to docs
Reviewed By: hramos

Differential Revision: D4638645

fbshipit-source-id: 6a37a5fd4e0d8c7769f6c241142b949dba665c34
2017-03-01 21:15:03 -08:00
Scott Wolchok 906879ed9b BUCK file renaming round 2 (10/13)
Reviewed By: dinhviethoa

Differential Revision: D4641351

fbshipit-source-id: f965d3c55313258934d926f6333e2ba161263882
2017-03-01 21:15:03 -08:00
Hector Ramos cf4891c6bd Update Getting Started instructions.
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
2017-03-01 19:26:28 -08:00
Ke Mao 8bfab2c733 Improve command-line experience for capturing mobile JS heap
Reviewed By: cwdick

Differential Revision: D4612319

fbshipit-source-id: 607a09286abdd83368996ffc553b3ce984b62f34
2017-03-01 19:26:28 -08:00
Spencer Ahrens a7a3922b89 Improve doc generation with flow types
Reviewed By: vjeux, hramos

Differential Revision: D4638610

fbshipit-source-id: 122d6fb68d521b675019a0698b6427960bb2d070
2017-03-01 18:46:32 -08:00
Spencer Ahrens e70cdf0cc1 add to RN OSS package.
Summary: Also fix some bugs with fbjs requires.

Reviewed By: mkonicek

Differential Revision: D4635805

fbshipit-source-id: b0663b727632fe5784f1caa1ff20b160a82a3931
2017-03-01 17:55:30 -08:00
Marc Horowitz 18eb7aea97 Fix the RN OSS gradle build
Reviewed By: ericvicenti

Differential Revision: D4636504

fbshipit-source-id: 89a776902d893c19dff81afcf1cba631c220c9c2
2017-03-01 13:47:31 -08:00
sunnylqm 48a84dffd5 android now supports barStyle
Summary: Closes https://github.com/facebook/react-native/pull/12488

Differential Revision: D4590699

fbshipit-source-id: 003da4b622e8732ab66c6f2c931670a2eae47eae
2017-03-01 13:32:16 -08:00
Hector Ramos 4ee7d9430c Move showcase source data into a JSON file
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
2017-03-01 13:32:15 -08:00
Eric Vicenti 08dbc43fa6 Deprecate NavigationExperimental
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
2017-03-01 11:50:03 -08:00
Hector Ramos d54c7f8282 Refresh website
Reviewed By: mkonicek

Differential Revision: D4634272

fbshipit-source-id: 97d22115ffa29456ce253ad8c97a720d0c4e4d53
2017-03-01 11:00:49 -08:00
Lukas Wöhrl bdd9aed909 Move configuration to new YGConfig and pass them down to CalculateLayout
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
2017-03-01 09:31:06 -08:00
Emil Sjolander 4d69f4b2d1 Add display:none support to react native
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
2017-03-01 09:16:05 -08:00
Emil Sjolander 31f848a5fa Expose alignContent to react native
Summary:
This diff adds alignContent (https://developer.mozilla.org/en-US/docs/Web/CSS/align-content) support to React Native. This enables aligning the lines of multi-line content. See below playground for example usage.

```
class Playground extends React.Component {
  render() {
    return (
      <View style={{width: '100%', height: '100%', flexDirection: 'row', backgroundColor: 'white', flexWrap: 'wrap', alignContent: 'space-between'}}>
        <View style={{width: 100, height: 100, marginLeft: 10, marginTop: 10, backgroundColor: 'red'}}/>
        <View style={{width: 100, height: 100, marginLeft: 10, marginTop: 10, backgroundColor: 'red'}}/>
        <View style={{width: 100, height: 100, marginLeft: 10, marginTop: 10, backgroundColor: 'red'}}/>
        <View style={{width: 100, height: 100, marginLeft: 10, marginTop: 10, backgroundColor: 'red'}}/>
        <View style={{width: 100, height: 100, marginLeft: 10, marginTop: 10, backgroundColor: 'red'}}/>
        <View style={{width: 100, height: 100, marginLeft: 10, marginTop: 10, backgroundColor: 'red'}}/>
        <View style={{width: 100, height: 100, marginLeft: 10, marginTop: 10, backgroundColor: 'red'}}/>
      </View>
    );
  }
}
```

Reviewed By: astreet

Differential Revision: D4611803

fbshipit-source-id: ae7f6b4b7e9f4bc78d2502da948214294aad4dd2
2017-03-01 09:16:05 -08:00
Emil Sjolander cc275557be Add margin auto support to react native
Summary:
This diff adds margin:auto (https://drafts.csswg.org/css-flexbox-1/#auto-margins) support to React Native. This enables layout not previously supported without inserting empty 'spacer' views. 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, backgroundColor: 'red'}}/>
        <View style={{width: 100, height: 100, marginLeft: 'auto', backgroundColor: 'blue'}}/>
      </View>
    );
  }
}
```

Reviewed By: astreet

Differential Revision: D4611753

fbshipit-source-id: e78335565c193f7fb263129a638b444715ba5ab0
2017-03-01 09:16:05 -08:00
Emil Sjolander fb266fcaad More efficient decoding of Dynamic value in LayoutShadowNode
Reviewed By: astreet

Differential Revision: D4627219

fbshipit-source-id: 1495d58b08af3c619a8dc0d2df655e0c42aa813e
2017-03-01 09:16:05 -08:00
Emil Sjolander d5a381f493 Fix margin auto for start and end values
Reviewed By: astreet

Differential Revision: D4627339

fbshipit-source-id: eebf64e79a34331e79cffcfa3662d4938fbd6c13
2017-03-01 09:16:05 -08:00
Spencer Ahrens 7b35eb3fdb Move new components out of `Experimental` directory
Summary: I think these are sufficiently baked. Also beef up comments.

Reviewed By: yungsters

Differential Revision: D4632604

fbshipit-source-id: 64ae6b240a05d62e418099f7403e1781f9b4717c
2017-03-01 09:16:05 -08:00
Janic Duplessis 5facc23799 Packager - Fix absolute imports on Windows
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
2017-03-01 08:15:51 -08:00
Christoph Pojer 4d00df41b4 Fix lint errors 2/2
Reviewed By: jeanlauliac

Differential Revision: D4628330

fbshipit-source-id: 94fad1294e22fa0073e15843f94241ae778112a0
2017-03-01 08:15:51 -08:00
Jean Lauliac 04f42ab075 packager: DependencyGraph-test: go through fs.watch mock rather than manual API
Reviewed By: davidaurelio

Differential Revision: D4628593

fbshipit-source-id: 43ccdb038bd387e87096f2a7020c98d915fa5bba
2017-03-01 08:00:18 -08:00
Martin Konicek e44730cb63 Fast finish Travis builds, disable tvOS and JS tests
Reviewed By: mkonicek

Differential Revision:
D4635182
Ninja: Manual import https://github.com/facebook/react-native/pull/12603

fbshipit-source-id: f512bf3ce7840b3fbc229e9225e06e3112d849d3
2017-03-01 07:47:07 -08:00
Emil Sjolander 23f2f5f239 default root node to size of parent contraints
Reviewed By: dshahidehpour

Differential Revision: D4634616

fbshipit-source-id: 089eb4313c5bb810a6ff56f158cd19cec71808ec
2017-03-01 07:15:23 -08:00
Aaron Chiu 6b738d1b2e remove getAllPerformanceCounters() function
Reviewed By: fkgozali

Differential Revision: D4626085

fbshipit-source-id: f07f5a72791176f075d3ce450af4c7ae4cd6fa5c
2017-02-28 20:22:24 -08:00
Héctor Ramos bd4b5dedc2 Refreshed design.
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
2017-02-28 16:44:55 -08:00
Georgiy Kassabli 1209b39492 Yoga test failure for flexing with min stack dimension
Reviewed By: emilsjolander

Differential Revision: D4558653

fbshipit-source-id: 06b38d7ed43aee063cc881f38b84558641f043f3
2017-02-28 16:30:40 -08:00
Eric Vicenti 761d528153 Remove NavExperimental from UIExplorer
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
2017-02-28 15:45:43 -08:00
Marc Horowitz db8cec4331 Initialize glog in bridge
Reviewed By: AaaChiuuu

Differential Revision: D4614463

fbshipit-source-id: c115534c214f6bb40808f12e571a66afc9206d4d
2017-02-28 14:15:57 -08:00
Marc Horowitz 611661e5fe TODO is done
Reviewed By: AaaChiuuu

Differential Revision: D4614454

fbshipit-source-id: 48d66b26371834e35c43731a22abc015fc234650
2017-02-28 14:15:57 -08:00
Marc Horowitz 0b921ef52e Expand the visible parts of the android bridge a little bit
Reviewed By: javache

Differential Revision: D4560212

fbshipit-source-id: 7591ff825fd51ae5b3d3f494c677c75d75388471
2017-02-28 14:15:57 -08:00
Marc Horowitz 6bce498bbc Tweak CxxMessageQueue to work with unique_ptr
Differential Revision: D4560164

fbshipit-source-id: 8975157f5a14d5849365a9e35922a02ac6dc185b
2017-02-28 14:15:56 -08:00
Eric Vicenti 406a4c04d3 Update travis config to test on node 6
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
2017-02-28 14:15:56 -08:00
Héctor Ramos 9309bd00bb Do not ping Slack on PR builds
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
2017-02-28 12:31:00 -08:00
Héctor Ramos 7be7aa8ed5 Clarify access scope for publicly visible access token
Summary:
This token is restricted to public_repo access rights and it's alright to store in the open:

```
$ curl https://api.github.com/user?access_token={...}
X-OAuth-Scopes: public_repo
```
Closes https://github.com/facebook/react-native/pull/12569

Differential Revision: D4629308

Pulled By: hramos

fbshipit-source-id: 581a4c581f7b07068eaf1e953f62fc85ceb05ab2
2017-02-28 12:31:00 -08:00
Héctor Ramos 152abb678e Update ISSUE_TEMPLATE.md
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
2017-02-28 12:31:00 -08:00
Sebastian Markbage 5eb3ab3522 Switch componentWillMount / componentWillUnmount order
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
2017-02-28 12:22:07 -08:00
Charles Dick 31628f3aa4 remove global list in JscHeapCapture
Differential Revision: D4620810

fbshipit-source-id: 88ddadb1a2111408bc0188512dd818b7a7bf31c7
2017-02-28 11:15:08 -08:00
Lukas Wöhrl 80225fb9e7 Change flex getters to return the set values
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
2017-02-28 09:31:47 -08:00
Christoph Pojer 5403946f09 Fix lint errors 1/n
Reviewed By: davidaurelio

Differential Revision: D4627645

fbshipit-source-id: 3cf368c6a24a555b7d0a39045f6ba6fd92ae34e1
2017-02-28 09:00:42 -08:00
Spencer Ahrens 05c36b463b Add new list examples to UIExplorer
Reviewed By: yungsters

Differential Revision: D4626221

fbshipit-source-id: 73118b89180351c240168099b8f14f2386c94d7c
2017-02-28 09:00:39 -08:00