Commit Graph

6888 Commits

Author SHA1 Message Date
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
Ahmed El-Helw 99e2a67b39 Don't close reference to image in getSize
Summary:
ImageLoader improperly closes both the image reference
(which is shared) and the DataSource (which is shared, and should only be
handled by BaseDataSubscriber when it is correct).

Reviewed By: plamenko

Differential Revision: D3441752

fbshipit-source-id: bfb3d0281cd9ae789cba4079978ef46d295ac8f5
2016-06-17 11:58:38 -07:00
Felix Oghina bf79352e4f fix dialogmodule crashing with no fragment manager in onHostResume
Summary: This can happen now, we shouldn't crash. `showAlert` will crash instead if JS tries to call it.

Reviewed By: lexs

Differential Revision: D3450018

fbshipit-source-id: bbc062b357315f26ee98ed3b3a59db71dc5fc74a
2016-06-17 07:58:24 -07:00
David Aurelio ae6afcf3f6 move bundle signature to own file
Reviewed By: tadeuzagallo

Differential Revision: D3437491

fbshipit-source-id: c2e00932bacd799d547110c7214374c51ff0b830
2016-06-17 06:28:30 -07:00
Felix Oghina 49f20f4154 Add ReactInstanceHolder
Reviewed By: astreet

Differential Revision: D3328342

fbshipit-source-id: af4e825d0b7c2d3d4490094a939e97cc527dd242
2016-06-17 04:13:29 -07:00
Felix Oghina d78602b8cd show soft errors as redboxes in dev
Summary: These are generally things sent to console.error

Reviewed By: lexs

Differential Revision: D3445393

fbshipit-source-id: e76e82dbaa32dc71100ae6b1d721f80007d8cd3a
2016-06-17 03:28:39 -07:00
Andrei Coman 477cc52945 Use fresco cache to show low res image if available
Summary:
ImageView will now interrogate fresco cache for images that can be shown before
the one with the best fitting size is downloaded. Cache interrogation does not
take into account that the images from cache are smaller or bigger than the best
fit. Most of the cases, the smaller one will be displayed. It is also possible
that a bigger image is available for being displayed, but ideally we'd still
want the best fit to be shown, so as to not decode and resize images that are
too big.
I've added a ImageSource class to simplify things. This makes it easier to
lazy-parse the Uri's when necessary, and cache data related to that uri
and wether the image is local. This also gets rid of the Map, which makes
parsing the source a bit more elegant.

Reviewed By: foghina

Differential Revision: D3392751

fbshipit-source-id: f6b803fb7ae2aa1c787aa51f66297a14903e4040
2016-06-17 03:28:38 -07:00
Andrei Coman 675c55e8ad Update fresco from 0.10.0 to 0.11.0
Summary: Updating to new release from 16.06.2016.

Reviewed By: bestander

Differential Revision: D3444598

fbshipit-source-id: d8c14b3d088bab6c08effcdacde9bf2eccb20d68
2016-06-17 02:58:24 -07:00
Basil Hosmer 3f74568b9f remove NativeMethodsMixin from react-native.js.flow
Reviewed By: spicyj

Differential Revision: D3448011

fbshipit-source-id: b1ca6e691eadf59a989626040ae8ba728eafd848
2016-06-16 22:29:05 -07:00
Tim Yung f60e80d89d RN: Lazily Symbolicate Warnings
Summary:
Currently, every warning triggers a packager request to symbolicate the stack trace. If there happens to be a lot of warnings or if the packager or device are pretty busy (or low powered), this can cause a significant delay in responsiveness (and development velocity).

This fixes the issue by only symbolicating warnings when users inspect them.

Reviewed By: sahrens

Differential Revision: D3448032

fbshipit-source-id: d6154f336ed34c15f99170da013ae3ff1f1ef075
2016-06-16 19:13:23 -07:00
Chris Hopman 1731598428 Add some (possibly temporary) noexcept/throw specifications
Reviewed By: mhorowitz

Differential Revision: D3435575

fbshipit-source-id: 93b60a5d6890d21db6b3726784bc6fd868af5ba0
2016-06-16 16:13:17 -07:00
Basil Hosmer b4a4c71a68 update flowification of react-native
Reviewed By: frantic, gabelevi

Differential Revision: D3436342

fbshipit-source-id: 7630eac4601d0768f57dc9fc945595039067eceb
2016-06-16 15:43:20 -07:00
Ben Alpert 92d6632d7a Update React to 15.2.0-rc.1
Summary:
Notable changes (excluding DOM-only things):

- Improved warning messages for propTypes and key warnings
- Production error codes
- Improved performance in DEV mode
- More accurate data in ReactPerf instrumentation
- Experimental JSON test renderer
- Minor bug fixes

Full changelog: fef495942a...c66f40f749.

Reviewed By: AaaChiuuu

Differential Revision: D3442002

fbshipit-source-id: 940fc65ba5d0b742417bbe2fcbd36eb9dc7443e1
2016-06-16 14:44:18 -07:00
Marc Horowitz a60b74d974 When executing JS throws an exception, capture the js stack in the C++ exception thrown
Reviewed By: davidaurelio

Differential Revision: D3428921

fbshipit-source-id: 0e8be84a2be92558ea3de0d32d1d4a53308d8270
2016-06-16 14:44:18 -07:00
Benoit Lemaire bc42861cbf Cleanup packager dead debug endpoint
Summary:
When trying to access the debug dependency graph through the `/debug/graph` endpoint of the packager server (documented in the packager README and listed as well when hitting the root `/debug` endpoint), all I am getting back is a nasty HTTP 500 error :'(

What triggers this HTTP 500 is a `TypeError` being thrown while trying to access a function that doesn't exists (anymore). Here is the error log of the packager when trying to access this endpoint :

```
TypeError: this._depGraph.getDebugInfo is not a function
    at Resolver.getDebugInfo (index.js:270:27)
    at Bundler.getGraphDebugInfo (index.js:575:27)
    at Server._processDebugRequest (index.js:369:28)
    at Server.processRequest (index.js:423:12)
    at next (/Users/blemair/Code/DependencyGraphTest/node_modules/connect/lib/proto.js:174:15)
    at Object.module.exports [as handle] (cpuProfilerMiddleware.js:17:5)
    at next (/Users/blemair/Code/DependencyGraphTest/node_modules/connect/lib/proto.js:174:15)
    at Object.module.exports [as
Closes https://github.com/facebook/react-native/pull/8117

Differential Revision: D3445582

fbshipit-source-id: cf5af8bbba293f39773f32814a3b388b7ff67bf7
2016-06-16 14:28:29 -07:00