Commit Graph

6802 Commits

Author SHA1 Message Date
hi大头鬼hi 3e4f16a2a6 fix link
Summary:
fix link in comment
Closes https://github.com/facebook/react-native/pull/8295

Differential Revision: D3469079

Pulled By: javache

fbshipit-source-id: e4c4c3b8871bfac1ff49d5cb29305f96e30282b6
2016-06-22 03:28:26 -07:00
Emilio Srougo d9adeb9299 Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285

Differential Revision: D3468707

fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
2016-06-21 23:13:28 -07:00
Marc Horowitz 254404b98c if !WITH_JSCEXTENSIONS, append a \0
Reviewed By: astreet

Differential Revision: D3459183

fbshipit-source-id: f62110e67faed827d888afc9a39d1586cdeeb074
2016-06-21 22:13:33 -07:00
Joel Marcey d662628ee3 Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287

Differential Revision: D3467042

Pulled By: lacker

fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
2016-06-21 17:28:38 -07:00
Kevin Lacker d88c1ab051 New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.

Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291

Differential Revision: D3466855

Pulled By: JoelMarcey

fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
2016-06-21 17:13:30 -07:00
Kevin Lacker 46e42ac788 overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263

Differential Revision: D3463856

Pulled By: JoelMarcey

fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
2016-06-21 15:59:04 -07:00
Jake Murzy 8ce7ad48b0 Kill NavigationAnimatedView
Summary:
NavigationAnimatedView is deprecated. Use NavigationTransitioner.

As discussed in #8262, #8189.
Closes https://github.com/facebook/react-native/pull/8269

Reviewed By: hedgerwang

Differential Revision: D3462087

Pulled By: ericvicenti

fbshipit-source-id: 6d7504cb8533f12a3610d34ef5b35edcf79fd5b7
2016-06-21 15:59:04 -07:00
Jake Murzy 47a728907f Migrate NavigationCardStack
Summary:
As discussed in #8262.
Closes https://github.com/facebook/react-native/pull/8268

Reviewed By: hedgerwang

Differential Revision: D3462059

Pulled By: ericvicenti

fbshipit-source-id: 1f48db3a15668e5a1122b7dcb244bd4352acf9a9
2016-06-21 15:59:04 -07:00
Philipp von Weitershausen 9c47742176 Fix React.xcodeproj by adding recently added RCTI18nUtil.* files
Summary:
88c6e7a22b / D3446871 broke the OSS version of React where React.xcodeproj isn't autogenerated.

**Test plan:** UIExplorer example works again.
Closes https://github.com/facebook/react-native/pull/8288

Differential Revision: D3466246

Pulled By: javache

fbshipit-source-id: 1240b755b0df54ddfde016d0122640293e50caeb
2016-06-21 15:43:54 -07:00
Christine Abernathy 22f59a88a6 Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:

- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).

FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).

Two docs have been updated to showcase how we'd like the new docs to look:

- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.

**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196

Differential Revision: D3465037

Pulled By: lacker

fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
2016-06-21 14:28:43 -07:00
Hedger Wang bdb8efdd66 Add example for <NavigationTransitioner />
Summary:
Add an example for <NavigationTransitioner /> that shows how to use
<NavigationTransitioner /> and <Animated.View /> to build a stack of
animated scenes that render the navigation state.

This also defines the generic method for NavigationTransitioner to render scenes.

Reviewed By: ericvicenti

Differential Revision: D3422322

fbshipit-source-id: b9ff4c5102442a110739a546565552496349d473
2016-06-21 14:28:41 -07:00
Hedger Wang c57bac4767 Pass the current and previous transition props to `render`, `onTransitionStart` and `onTransitionEnd`.
Summary: This shall make it convenient to handle transition changes.

Reviewed By: ericvicenti

Differential Revision: D3442291

fbshipit-source-id: aee0ffe18ada40ef133484b4a4999f282c66c181
2016-06-21 14:13:27 -07:00
Fred Liu 6982f5aa24 Fix Navigator jumpTo same route issue
Summary: https://github.com/facebook/react-native/pull/8071 introduced a bug where jumping to the same navigator route would show a blank screen since the `index` check is not catching cases where the `transitionQueue` is empty.

Reviewed By: ericvicenti

Differential Revision: D3464697

fbshipit-source-id: 494527d1fb0ac5aea394abd3231dd19c56596549
2016-06-21 13:43:25 -07:00
Joel Marcey 6668cd2129 Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.

Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266

Differential Revision: D3465105

Pulled By: JoelMarcey

fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
2016-06-21 13:28:30 -07:00
Joel Cloralt b0dbb4210f Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078

Differential Revision: D3464912

Pulled By: JoelMarcey

fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
2016-06-21 12:58:28 -07:00
Alexey Lang b36eaeda5d Replace RCT_DEV with RCT_PROFILE
Reviewed By: javache

Differential Revision: D3462735

fbshipit-source-id: 44513a9540b3111e036c4b14e0fda2d34b43cdf6
2016-06-21 12:15:45 -07:00
Mengjue Wang 7eadd8c408 Create a module for React Native to get IsRTL info and set ForceRTL 2/2
Summary: This diff build the connection between the native code and js code so that the js could get IsRTL value and us ForceRTL function.

Reviewed By: fkgozali

Differential Revision: D3447013

fbshipit-source-id: 9f6c7f71cef0add7bd5beb0ba2b1543f0cabc2b3
2016-06-21 11:58:39 -07:00
Mengjue Wang 88c6e7a22b Create a module for React Native to get IsRTL info and set ForceRTL 1/2
Summary: Create a module for React Native to get IsRTL information and set ForceRTL function.

Reviewed By: fkgozali

Differential Revision: D3446871

fbshipit-source-id: 736edf138a89d222818071370ac49dc54bda63b7
2016-06-21 11:58:39 -07:00
Krzysztof Magiera a59afb98d5 Decompose transform matrix in native (for android).
Summary:
This diff translates implementation of transform matrix decomposition from JS to java. This is to support offloading animations of transform property, in which case it is required that we can calculate decomposed transform in the UI thread.

Since the matrix decomposition code is not being used for other platform I went ahead and deleted parts that are no longer being used.

**Test plan**
Run UIExplorer Transform example before and after - compare the results
Closes https://github.com/facebook/react-native/pull/7916

Reviewed By: ritzau

Differential Revision: D3398393

Pulled By: astreet

fbshipit-source-id: 9881c3f565e2050e415849b0f76a0cefe11c6afb
2016-06-21 11:28:29 -07:00
Patricio Beltran d1690a8f9e Support vscode as a React Editor
Summary:
When opening a text editor from react native there are a list of editors being supported. This PR adds `VSCode` to that.

As a difference with the current supported editors, `VSCode` has a notion of `workspace` (a directory that contains all of the project's files). The `workspace` can be passed to `VSCode` as a parameter so that if the workspace is already open we don't get new instances of `VSCode` every time a new file is open. The `workspace` is gotten by comparing the file location with the different `project roots`.

This code relies on `VSCode`'s `code` command, which it's documentation can be found at: https://code.visualstudio.com/Docs/editor/codebasics#_launching-from-the-command-line
Closes https://github.com/facebook/react-native/pull/7757

Differential Revision: D3463761

fbshipit-source-id: ee9ec999747ad6d16d95ec8317f551f3535286c9
2016-06-21 11:09:24 -07:00
Konstantin Raev 0cdad4f52f Fixed travis stalls by updating to latest node
Summary:
Travis got slower recently and 10 minutes may be not enough
Closes https://github.com/facebook/react-native/pull/8278

Differential Revision: D3463714

fbshipit-source-id: b521687265d9efdf3d750611e59e36fc270e1fe9
2016-06-21 10:28:29 -07:00
Konstantin Raev f58c53e3ee Cicle CI fix: limit predex threads
Summary:
Limited nubmer of threads Gradle may spawn when generating dex files
Closes https://github.com/facebook/react-native/pull/8279

Differential Revision: D3463716

fbshipit-source-id: 6f1ee35c077649d94fe879cf9327383971321307
2016-06-21 10:28:29 -07:00
Alexander Blom d63d4f0e9c Bind methods instead of using eval
Reviewed By: astreet

Differential Revision: D3417452

fbshipit-source-id: 437daa2dfcd01efb749465a94c1a72ce8a2cb315
2016-06-21 10:13:33 -07:00
Joel Marcey cd542f0656 Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.

We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260

Differential Revision: D3463284

Pulled By: JoelMarcey

fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
2016-06-21 09:13:40 -07:00
Omeid 4f187074bf Components:Touchables: Expose Accessibility prop. Fix #6550
Summary:
With accessibility prop set to true, it is not possible to access
childern elements. This makes it impossible to test Components with
appium and releatives. This commit adds support to change accessiblity
property on Touchable elements to overcome the aforementioned issue.
Closes https://github.com/facebook/react-native/pull/8243

Differential Revision: D3462949

Pulled By: javache

fbshipit-source-id: 65ce6507a1619218ab5b527c970a74af197ef462
2016-06-21 08:28:23 -07:00
hi大头鬼hi 99bbdff011 fix package name used in comment
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

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/master/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/8272

Differential Revision: D3462939

Pulled By: javache

fbshipit-source-id: af1e6af3807e22466ee9b364a1f09a4510553545
2016-06-21 06:13:37 -07:00
Konstantin Raev 8af217641f Fixed manual e2e test runner script
Summary:
Android folder may contain versions from previous runs and it may affect e2e test execution.
This should make tests independent of cached jars.
Closes https://github.com/facebook/react-native/pull/8277

Differential Revision: D3462901

fbshipit-source-id: 25b1f75b9b207617431e26ad60f5d4de322ab1f4
2016-06-21 05:28:31 -07:00
Konstantin Raev 343ad3be79 Fixed CircleCi script to make gradle builds more stable
Summary:
This is a temporary patch because gradle builds are not properly cached
Closes https://github.com/facebook/react-native/pull/8274

Differential Revision: D3462705

fbshipit-source-id: 1873904873dec36a42405b9cf37def521552ee8b
2016-06-21 02:58:27 -07:00
Denis b2c5584fce set state to LOADING on reload()
Summary:
https://github.com/facebook/react-native/issues/8239
Closes https://github.com/facebook/react-native/pull/8247

Differential Revision: D3460015

Pulled By: javache

fbshipit-source-id: dd41fc7cf01a07acecd124733f8ef109de5ccc35
2016-06-21 02:43:49 -07:00
Dale Jefferson 4c3c15fd89 Add app to showcase - RNF Beacon Toolkit
Summary:
iBeacon app built with React Native
Closes https://github.com/facebook/react-native/pull/8245

Differential Revision: D3462061

fbshipit-source-id: e57437c66abb4cc25d78e24f5724dc5db2710046
2016-06-20 21:28:31 -07:00
Tim Yung 2c57f6e38f RN: Enable Flow Object Type Lint Rule
Reviewed By: voideanvalue

Differential Revision: D3460466

fbshipit-source-id: 9f5ca9a8a22827ab13b1b93044390bf6a95908af
2016-06-20 18:13:32 -07:00
Héctor Ramos bdf58ae780 Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254

Reviewed By: caabernathy

Differential Revision: D3459018

Pulled By: JoelMarcey

fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
2016-06-20 15:28:28 -07:00
Joel Marcey f2affcf24d Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.

Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256

Differential Revision: D3459601

Pulled By: JoelMarcey

fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
2016-06-20 15:13:29 -07:00
Chris Hopman 6128b7236f Synchronously fail when calling JS too early
Differential Revision: D3453476

fbshipit-source-id: 3fbfda46b4cb7d31f554df6760c5146c412ff468
2016-06-20 12:58:23 -07:00
Christine Abernathy cc8cf8f0f2 Simplify guide and make it more prescriptive
Summary:
This is related to #8157. Updated the guide and made it simpler and more prescriptive.

**Testing**

- cd react-native
- npm install
- cd website
- npm install
- npm start
- Go to http://localhost:8079/react-native/docs/platform-specific-code.html
- Checked content

![platform-specific-update](https://cloud.githubusercontent.com/assets/691109/16205926/f5fd0662-36da-11e6-978c-e364688facf6.png)
Closes https://github.com/facebook/react-native/pull/8251

Differential Revision: D3458249

Pulled By: JoelMarcey

fbshipit-source-id: 5568337af92da53ee6cd53541591eb01ae323f4f
2016-06-20 12:28:26 -07:00
Alex Kotliarskyi d26ce2e2c0 Attempt packager connection even when loaded from offline bundle
Reviewed By: bottledwalter

Differential Revision: D3446086

fbshipit-source-id: b6400cf9b1ec0b59bb53f94b306698359072fb7a
2016-06-20 10:58:32 -07:00
Alex Kotliarskyi 662ec705cb Reconnect RCTWebSocketManager when packager restarts
Reviewed By: bottledwalter

Differential Revision: D3434769

fbshipit-source-id: a0b165129b66d03403defb39a20c86ab982fc8b5
2016-06-20 10:58:32 -07:00
Alex Kotliarskyi bc8954babb Use messageSocket to broadcast reload command on global shortcut
Reviewed By: yungsters

Differential Revision: D3433464

fbshipit-source-id: 74111f419d224310b546e7c80fa871417436e1ab
2016-06-20 10:58:32 -07:00
David Aurelio b39fc05dbb Print nicer error message if an asset directory is not found in any of the roots
Summary:
When an asset is included in a module, and the directory for that asset can't be found in any of the roots, it is hard to debug that, because the error message contains neither the name of the requested file, the sub directory it is located in, nor the roots that have been searched for it. It becomes more difficult, because that exception is created asynchronously. It contains the calling promise code.

This diff makes the error message more useful by including the name of the file, the sub directory, and the roots.

Reviewed By: bestander

Differential Revision: D3456738

fbshipit-source-id: 60b81f04626ad386f7120247c5f5361c81c52968
2016-06-20 10:13:22 -07:00
leeight dcc2abc1f6 Fix Examples/{UIExplorer,Movies}
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

UIExplorerActivity.java and MoviesActivity.java should override `getReactNativeHost` method. And this PR will fix https://github.com/facebook/react-native/issues/8215.

**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/master/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests).
Closes https://github.com/facebook/react-native/pull/8223

Differential Revision: D3456957

fbshipit-source-id: cc0b51e5bfaec71d210bfba81b1f7cd06a723d8c
2016-06-20 08:43:29 -07:00
Nathan Azaria cfa9d5ef34 Added nil check to RCTModuleData
Reviewed By: javache

Differential Revision: D3456536

fbshipit-source-id: b23e618cf5b4a33822579b456c0f50a41a1c7a31
2016-06-20 05:44:19 -07:00
Siqi Liu ee0333c65d Enable Logging information from redboxes in Android Ads Manager to Scuba
Reviewed By: mkonicek

Differential Revision: D3433990

fbshipit-source-id: 54fa60fa746c9d0d834f86b7dd2e3ef18a694a32
2016-06-18 12:58:29 -07:00
Daniel Braun c6020a0ef4 Added logging to push registration failure.
Summary:
It seems it's a common problem people trying to register for push notifications in their simulator, and not understanding why the "register" event never works.
I've wasted a few hours myself on this issue.
This commit simply logs any failures with push registration, preventing confusion.
Closes https://github.com/facebook/react-native/pull/8046

Differential Revision: D3454922

Pulled By: javache

fbshipit-source-id: a96896d97d97cfe1bd319e6490750838dfaad3cd
2016-06-18 08:58:20 -07:00
Janic Duplessis e08197b998 Add note about submitting PRs on master
Summary:
We got a lot of PRs on stable branches recently, this adds a note about that in CONTRIBUTING that (hopefully) people will read.
Closes https://github.com/facebook/react-native/pull/8209

Differential Revision: D3454813

fbshipit-source-id: 4f972d9e5edc1f13b249d9f7a627f84ba9826a0a
2016-06-18 02:43:20 -07:00
Chirag Shah d929f1ccef Added userAgent prop type in docs for webview
Summary:
userAgent as a prop type is available in WebView for android but is not documented. This PR fixes it.

**TestPlan** : Not required as this just adds an entry in the documentation

![webview react native a framework for building native apps using react 2016-06-18 02-14-58](https://cloud.githubusercontent.com/assets/6805530/16164289/e8908526-34fa-11e6-98fe-face38ff9f51.png)
Closes https://github.com/facebook/react-native/pull/8200

Differential Revision: D3454625

fbshipit-source-id: 260087044f78a1339cf7ec8760e92cd9fbdb5111
2016-06-17 22:28:21 -07:00
carlos 12754839a1 if quick call jumpTo the transitionQueue will be quit before handle a…
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

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/master/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/8071

Differential Revision: D3453372

Pulled By: ericvicenti

fbshipit-source-id: 3494faee1a83574c3937a6545b246713ec38e0d0
2016-06-17 16:43:23 -07:00
Tim Yung a2f78825f2 RN: Increase Time Drift Threshold
Summary: Increases time drift threshold to reduce chance of false positives. Also, tweaked the error message to contain slightly more information.

Reviewed By: frantic

Differential Revision: D3450852

fbshipit-source-id: 7fbf3eb25543977f9767c7a57277db336006bd12
2016-06-17 16:28:27 -07:00
Alex Harrison 8ca3a0c91c Add ReacTube to Showcase
Summary:
The blog post for ReacTube was released recently. In addition, ReacTube is currently on the Play Store and will be released on the iOS store soon.
Closes https://github.com/facebook/react-native/pull/7896

Differential Revision: D3453146

Pulled By: mkonicek

fbshipit-source-id: 887ca6c9d12cd6f50f10d11091f1501476ae2144
2016-06-17 16:13:31 -07:00
Gant Laborde a9d8d1cab6 Add caveat on PCH errors
Summary:
Moving files that have generated PCHs causes an error that you cannot clear easily.  Here are the instructions on how.

I was prompted to place this info here via #6797
Closes https://github.com/facebook/react-native/pull/7185

Differential Revision: D3453289

Pulled By: mkonicek

fbshipit-source-id: 8e16ea8f1bc3495209d1510a1caad2c6208c2e1e
2016-06-17 16:13:31 -07:00
David Aurelio 62bb09d1f6 make module IDs deterministic when bundling
Summary:
This makes sure that `getModuleId` is called on modules in the order returned by `node-haste`, rather than waiting for a couple of promises to resolve before calling the function.

Related: #7758

Reviewed By: frantic

Differential Revision: D3450853

fbshipit-source-id: 7f26590b39b94ade32c73a8db9fd31d283d57549
2016-06-17 12:58:49 -07:00