Commit Graph

7030 Commits

Author SHA1 Message Date
David Aurelio 0d58314fa6 Update eslint
Reviewed By: bestander

Differential Revision: D3517152

fbshipit-source-id: 785b273cf197f313ddba769377c2a9f672c4b10b
2016-07-05 10:58:50 -07:00
Alex Kotliarskyi 29e04a6d1b Fix test broken by D3516741
Reviewed By: astreet

Differential Revision: D3517064

fbshipit-source-id: 8fe6fca1bc2c77872b1bf09bd114a3d490d9c834
2016-07-05 10:58:49 -07:00
David Aurelio 73f62e588e Add a local packager config, so that react can find react-native when…
Summary:
The **motivation** for this PR is my sad colleague bestander: I managed to break travis with bd60d828c5, without considering the consequences. This PR solves this failure, and will fix it for good.

**Test plan (required)**

Travis will demonstrate that the code is solid.
Let’s make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/8576

Differential Revision: D3516652

Pulled By: bestander

fbshipit-source-id: 09bb488517a0ee2b5b6219dfda559aef568bbbc2
2016-07-05 10:28:24 -07:00
Siqi Liu ac18025d7c Change the Exception Message of Time Drift
Summary: We prefer not showing the accurate time information in the exception message of time drift, in order to be able to group this kind of exception only by exception message.

Reviewed By: foghina

Differential Revision: D3515390

fbshipit-source-id: f38bf3091ba749d4daeae24f7d42653b76c3289c
2016-07-05 09:58:29 -07:00
Tomasz Kurpios b046b2d51c Allow to specify simulator OS version from cli
Summary:
When multiple simulator runtimes are available, this change will make it possible to specify which one to run. So assuming you have e.g. iOS 9.0 and 9.3 runtimes, all following calls will now work:
```
react-native run-ios --simulator "iPhone 6s (9.0)"
react-native run-ios --simulator "iPhone 6s (9.3)"
react-native run-ios --simulator "iPhone 6s"
```
Closes https://github.com/facebook/react-native/pull/8559

Differential Revision: D3516811

Pulled By: frantic

fbshipit-source-id: c81658f77e482e712293367b13d27e783e538aad
2016-07-05 09:58:29 -07:00
Alex Kotliarskyi 3e681c1acc Don't attempt symbolicating non-http(s) urls
Summary:
Looks like spaces in function names can happen, but the lib we use for parsing stacktraces doesn't support that. As result, when error is thrown in global scope, new JSC puts "global code" as function name, our parser chokes on it and thinks "global code@http://...." is a file name and sends it to packager. The packager can't resolve that URL and fails the whole symbolication request.

Longer term fix here: https://github.com/errwischt/stacktrace-parser/pull/5

Reviewed By: astreet

Differential Revision: D3516741

fbshipit-source-id: 4f2bb70084437ed9d37495cd775622a8c981fad1
2016-07-05 09:43:26 -07:00
David Aurelio bd60d828c5 Remove `node_modules/react` from the list of discoverable haste modules
Summary: This removes `node_modules/react` from the list of directories that are used for haste module resolutions. Modules required from React are now imported with `require('react/lib/…')`.

Reviewed By: astreet

Differential Revision: D3509863

fbshipit-source-id: 32cd34e2b8496f0a6676dbe6bb1eacc18124c01e
2016-07-05 06:44:33 -07:00
danielbasedow 4ac4f86bf5 Add ping to WebSocket
Summary:
Idle WebSocket connections get reset after a few minutes of inactivity. To prevent this, most WebSocket implementations offer sending special ping messages. This PR adds a method `sendPing()` to  WebSocket. Ping payloads are not supported.

Manual testing can be done by adding `connection.on('ping', _ => console.log('Received ping'));` to a ws connection or using a packet sniffer while sending pings.
Closes https://github.com/facebook/react-native/pull/8505

Differential Revision: D3516260

Pulled By: dmmiller

fbshipit-source-id: cfebf5899188ae53254d5be6b666a9075e0eed89
2016-07-05 05:58:23 -07:00
Valentino Espinoza f48babaa5e Update Android Performance for opening trace.html
Summary:
Right now systrace generates an html file that is using the Object.observe function which is now deprecated in most up to date browsers.

Since we don't want to depend on the systrace being up to date, we should advise opening the trace through the Tracing tool, since that is the only way to get it working until systrace removes its dependency on Object.observe.
Closes https://github.com/facebook/react-native/pull/7880

Differential Revision: D3516305

Pulled By: astreet

fbshipit-source-id: ab9ae46ba74b7a34b6cfb8c37ca1ec2e6b41e353
2016-07-05 05:58:23 -07:00
Andy Street 950cefa2d6 Add debug statements to UIManager
Summary: These are helpful for development and shouldn't affect anything when DEBUG=false

Reviewed By: lexs

Differential Revision: D3515015

fbshipit-source-id: 0bd5ff833f90fea8e70b3103eb1f9bc803bef27c
2016-07-05 04:28:21 -07:00
Nathan Azaria c12db8045c Removed calls to RCTBundleURLProvider setDefaults
Reviewed By: javache

Differential Revision: D3516105

fbshipit-source-id: ea92714378f3d2be189b59b1b76d3e689aeac4c7
2016-07-05 03:28:23 -07:00
Christoph Pojer 65eee61f24 Update to 13.1
Reviewed By: kentaromiura

Differential Revision: D3516030

fbshipit-source-id: 739003d8c1984207312b650e424397a419c5eb6a
2016-07-05 01:13:51 -07:00
James Ide 2f400a663b Use --follow-tags instead of --tags
Summary:
--tags pushes all tags, which is rarely what we want. --follow-tags pushes only the tags in the commits that are being pushed.
Closes https://github.com/facebook/react-native/pull/8531

Differential Revision: D3515530

fbshipit-source-id: c951ee1c6170286c5fee0191cc375657a299e34a
2016-07-04 12:43:28 -07:00
Joel Marcey b48d112f26 Add post documentation lockdown survey link
Summary:
We did a survey prior to the doc lockdown to get an idea of what we should focus on. Now we have a yes/no style survey to ensure that we met the user needs when it came to our start of improving the docs.

This diff adds the survey link to the bottom of each page. And we will cherry-pick it into 0.29 as well, which will be the first official release with the new doc content

> **NOTE**: The content via the links in this survey will not be valid until 0.29 is actually released. So I have not enabled the questions for the survey until then.

**Test Plan:**

http://localhost:8079/react-native/docs/getting-started.html

<img width="753" alt="screenshot 2016-07-01 17 35 17" src="https://cloud.githubusercontent.com/assets/3757713/16535354/987dd3a8-3fb4-11e6-81b7-1a1fcffd3bb2.png">
Closes https://github.com/facebook/react-native/pull/8530

Differential Revision: D3515242

Pulled By: JoelMarcey

fbshipit-source-id: c2d241d472853dfb3f9e7d3ae9560b318aacb866
2016-07-04 10:58:25 -07:00
Nathan Azaria a9a0ff267f Move setDefaults call to constructor.
Reviewed By: javache

Differential Revision: D3514703

fbshipit-source-id: 8195778b23868eae36a55edc2d5d4f148b36a12e
2016-07-04 10:58:25 -07:00
Alexey Lang 85983d0ae4 Change API for iOS
Reviewed By: michalgr

Differential Revision: D3514778

fbshipit-source-id: 29dc12ad0a701fd08262be3aa81ae990d4fc63a9
2016-07-04 09:28:27 -07:00
ianlin e1497ce2b6 improve TextInput docs
Summary:
Add `phone-pad` as one of cross-platform values to `keyboardType`.
Closes https://github.com/facebook/react-native/pull/8555

Differential Revision: D3515002

Pulled By: JoelMarcey

fbshipit-source-id: 4f30dd72e8e30905a8a5fb90d3f361fb58eb825e
2016-07-04 08:13:22 -07:00
Konstantin Raev 1d86be3a6e Turned on old bridge for OSS
Summary:
This should revert back to using old bridge by default until we fix gradle script to build new bridge for OSS correctly
Closes https://github.com/facebook/react-native/pull/8539

Differential Revision: D3514263

Pulled By: bestander

fbshipit-source-id: db9e0232b9bde27206814212dedc487c366e3511
2016-07-03 14:43:20 -07:00
Konstantin Raev f78e819f20 Reverted commit D3510867
Differential Revision: D3510867

fbshipit-source-id: 365eb22e143f1c0eec6e4b8810c93dbb0e9fbbfa
2016-07-02 13:43:23 -07:00
Marc Horowitz 8b2adeaa2e Pull an updated version of fbjni into RN OSS
Differential Revision: D3510867

fbshipit-source-id: b4f3300ef003c57aa7d4f3513bca537c464f7647
2016-07-01 16:28:47 -07:00
Jan Kassens eb28c90205 Sort keys in createStrictShapeTypeChecker message
Summary:
The keys were in random order which made this warning less useful when there are
many keys.

Reviewed By: spicyj

Differential Revision: D3504322

fbshipit-source-id: c184aa447c985a0149cbfa8c90c6daf9632b6226
2016-07-01 15:43:23 -07:00
Chris Hopman bf79f87895 Make the new bridge the default
Reviewed By: astreet

Differential Revision: D3507482

fbshipit-source-id: b62f3bf0fe1dd4f49594e441f4e00b9e20ec972b
2016-07-01 14:43:22 -07:00
Ben Alpert 1a0c69f4b7 Update to React 15.2.0 final
Summary: This should have literally no changes from the RC that affect RN -- just a version bump.

Reviewed By: vjeux

Differential Revision: D3511116

fbshipit-source-id: 5bb3a330c0d2e78a2f3dfbb0e948c99607d2e66e
2016-07-01 14:28:21 -07:00
Konstantin Raev 2eed7e7429 Reverted commit D3503958
Summary:
Fixes https://github.com/facebook/react-native/issues/6679
Closes https://github.com/facebook/react-native/pull/8512

Differential Revision: D3503958

Pulled By: donyu

fbshipit-source-id: f2102c1051fb3fe1d55ecfa24bed19c8d25224e9
2016-07-01 13:13:32 -07:00
Michael McKinley 6424c8b2e0 Remove CUIICatalog invalid asset name supplied error
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/7535

Differential Revision: D3509757

fbshipit-source-id: 70ff6c9c137c766ccb1173921f08571f48cb4f0b
2016-07-01 11:29:50 -07:00
Felix Oghina adea8d5fc9 use MultiSourceHelper in PhotoViewer
Reviewed By: andreicoman11

Differential Revision: D3509011

fbshipit-source-id: 96fe96f28da24efb00b98589cea28e6c9cfc7180
2016-07-01 10:58:34 -07:00
Felix Oghina 2ce76771b5 extract MultiSourceHelper
Reviewed By: andreicoman11

Differential Revision: D3505224

fbshipit-source-id: e731325af7fd0c1cbd600695607302c968e0f36e
2016-07-01 10:58:33 -07:00
Felix Oghina 3d4adb8c34 extract ImageSource class for sharing
Summary: Move ImageSource out of ReactImageView so it can be used by other views dealing with images. Make ResourceDrawableIdHelper static in the process.

Reviewed By: dmmiller

Differential Revision: D3505103

fbshipit-source-id: 776a5b22a6934eeaa370826cb71c00cd937d3187
2016-07-01 10:58:33 -07:00
David Aurelio 970f9335a9 allow `rn.cli-config.js` w/o `getTransformModulePath`
Reviewed By: bestander

Differential Revision: D3509026

fbshipit-source-id: d7db3de13ecc92f6ddfdcec3029c78915e1e66c0
2016-07-01 06:58:37 -07:00
Ramiro González Maciel e5b389e44c FIX CGMakeRect is really CGRectMake
Summary:
There's a typo,  CGMakeRect is really CGRectMake

https://developer.apple.com/reference/coregraphics/1455245-cgrectmake
Closes https://github.com/facebook/react-native/pull/8524

Differential Revision: D3508996

Pulled By: bestander

fbshipit-source-id: 67270ba52b97bbf4e2a5afd97cfb04647e5aad62
2016-07-01 06:28:24 -07:00
Alexey Lang 6a1324e8f6 Fix codesign and enable in Wilde again
Reviewed By: michalgr

Differential Revision: D3497518

fbshipit-source-id: 615679fdfa22f9a03535248ebaa80ff9aa2e9e71
2016-07-01 04:43:28 -07:00
JasperStam aa0efd2e64 Add cardStyle prop to NavigationCardStack.
Summary:
This allows the `NavigationCard` style to be extended, the default `backgroundColor` style of the `NavigationCard` is not applicable to all apps.
Fixes issue #8116. PR #8115 was already made for this but didn't pass CI checks.

**Test plan**

When rendering a NavigationCardStack, add

```
const { CardStack } = NavigationExperimental;
...

<CardStack cardStyle={{ backgroundColor: 'purple' }} />
```

to see that the `NavigationCard` background has changed to purple.
Closes https://github.com/facebook/react-native/pull/8471

Differential Revision: D3508849

Pulled By: javache

fbshipit-source-id: 65703cccf3d01def9f2060256f0ff564bbdc47d3
2016-07-01 04:43:28 -07:00
Franklyn Tackitt 22fbb6d46d Remove iOS platform check for running devtools
Summary:
Currently, DevTools only work under ios (although this is undocumented!),
because the JavaScriptEngine initialization process skips setupDevTools() on
android.

DevTools work fine with Android, as tested on 0.26, 0.27, and 0.28 using
Nuclide's inspector.

For reference, the relevant issue on react-devtools.
Closes https://github.com/facebook/react-native/pull/8095

Reviewed By: bestander

Differential Revision: D3492788

Pulled By: andreicoman11

fbshipit-source-id: 1eda9196d7125da19a8d7baaab22b61b744ca629
2016-07-01 04:28:48 -07:00
Felix Oghina 010e1977a8 Promote ResourceDrawableIdHelper to new module
Summary:
Found a couple of places where we were copy-pasting the logic `ResourceDrawableIdHelper` had. This class was only available on the image module and it had package visibility. I moved it to its own module so that we can easily use it from others.

This diff is pretty simillar to 54ed44628d but it fixes a bug due to which we had to revert it.

Reviewed By: andreicoman11

Differential Revision: D3499062

fbshipit-source-id: f912f57e5ac21a9f30fe42067c784f49fa46ed48
2016-07-01 04:28:48 -07:00
Hugo Dozois 508cc06565 Add __DEV__ around textInput prop check
Summary:
**Motivation**

The prop validation was run on every render, even in prod which seems odd to me. This adds a dev check to make sure prod build skips the validation.

**Test plan (required)**

There are no changes to the ui.
Closes https://github.com/facebook/react-native/pull/8499

Differential Revision: D3508805

Pulled By: javache

fbshipit-source-id: 68c6a1224e33997f9df93481426daff790ef5bcd
2016-07-01 04:13:24 -07:00
Pieter De Baets 33d59137a5 Fix missing methods in !RCT_DEBUG
Reviewed By: bestander

Differential Revision: D3508704

fbshipit-source-id: 82c38819a83a50e0d5ba25480b5b4b7290c92e13
2016-07-01 03:13:18 -07:00
Konstantin Raev 88bd5e4d90 Reverted commit D3428952
Reviewed By: frantic

Differential Revision: D3428952

fbshipit-source-id: 61e5195399746d6511719971121c7c63f87ef4f4
2016-07-01 02:13:21 -07:00
James Ide a8011bbfdc Set LayoutParams in ReactTextView to fix crash
Summary:
ReactTextView occasionally crashes when `setText` is called. Doing some cursory research, it looks like this could be a bug in Android. We also suspect it might be related to removeClippedSubviews though.

The LayoutParams don't actually matter because RN controls layout, but on occasion (haven't narrowed down what this is...) `mLayout` is non-null and triggers relayout during `setText`, which fails because the LayoutParams are null. jesseruder came up with this fix and it appears to be working well.

Stack trace: http://pastebin.com/P8VbxvPz
Closes https://github.com/facebook/react-native/pull/7011

Differential Revision: D3508097

fbshipit-source-id: 12b4aa11e42112c8ba19a1af325e3ee9a232d08f
2016-06-30 20:50:09 -07:00
Marc Horowitz d1d9045eb4 Display JS exceptions and stacks in a red box.
Reviewed By: javache

Differential Revision: D3429031

fbshipit-source-id: a7ffd71151d8d78ccf8f0cc45807762b601cd112
2016-06-30 19:43:28 -07:00
Andrew Y. Chen 2b88482701 Implement JavaOnlyArray#getType
Reviewed By: AaaChiuuu

Differential Revision: D3504601

fbshipit-source-id: 37dbbcdd8cc0523cb8f1673047995c4410e8f7be
2016-06-30 19:43:28 -07:00
Marc Horowitz ff31128200 Display JS exceptions and stacks in a red box
Reviewed By: frantic

Differential Revision: D3428952

fbshipit-source-id: e2b77487d54a3d89039661943061a0137f8410c0
2016-06-30 19:13:26 -07:00
Sunny Gurnani 730619dabf BugFix: Title should be from scene.route.title
Summary:
Its a minor Bug fix for rendering Title in NavigationHeader
Closes https://github.com/facebook/react-native/pull/8437

Differential Revision: D3507319

Pulled By: ericvicenti

fbshipit-source-id: ff4aa36be3c4991be11aabecbaad952c015a60e2
2016-06-30 17:58:25 -07:00
Héctor Ramos 7d3fbbdb68 Introduce navigators in the tutorial
Summary:
Adds a new section to the tutorial. Covers the basics of scenes and navigators.

The navigator comparison doc has been moved to docs/navigation.html in this PR.

![navigators](https://cloud.githubusercontent.com/assets/165856/16505919/37459e3a-3ed4-11e6-87e9-5fa7e6f792d3.png)
Closes https://github.com/facebook/react-native/pull/8515

Differential Revision: D3507325

Pulled By: caabernathy

fbshipit-source-id: e9ee5b2572868189af198cdf461b2728dfa84f9e
2016-06-30 17:58:25 -07:00
Marc Horowitz ccd608a4b6 Update nul termination handling to avoid copies on iOS
Reviewed By: javache

Differential Revision: D3495998

fbshipit-source-id: 8d69ecc4777402a5d6b0e814af9f1862b47ecaa1
2016-06-30 16:43:56 -07:00
Chris Hopman e19225aa64 assert that ShadowNodeRegistry is only accessed from one thread
Reviewed By: astreet

Differential Revision: D3461859

fbshipit-source-id: 790e831d2ca239110e00a5723be40e870ceab020
2016-06-30 15:13:39 -07:00
Chris Hopman c1f7aa3824 Change gradle ndk build inputs back to what they were
Reviewed By: bestander

Differential Revision: D3442666

fbshipit-source-id: 735cb7e908670fa9b1ec58a533a2c59008ccc154
2016-06-30 14:28:23 -07:00
Jimmy Mayoukou 31f30aa4b3 Return empty bundle when passing an empty map to toBundle
Summary:
(I swear this was working before...)

Right now, when passing an empty map to `toBundle` it returns null:
- It feels counter-intuitive to have the data modified without any good reason;
- It is different from what iOS does

This PR fixes this behavior by returning an empty `Bundle` instead of `null`.

It is a breaking change though, and I'm not sure where it goes with the new bridge.
Closes https://github.com/facebook/react-native/pull/7847

Differential Revision: D3504024

fbshipit-source-id: 97ca19259fdf3219e8237e44a313645503a695fd
2016-06-30 10:43:58 -07:00
Mahdi Yusuf 08b7cb7963 Adding Gyroscope to Showcase.
Summary: Closes https://github.com/facebook/react-native/pull/8448

Differential Revision: D3504004

Pulled By: lacker

fbshipit-source-id: 2472ad64a6f0e26bb63c43f353ea92a350661753
2016-06-30 10:43:58 -07:00
Konstantin Raev 034b64509f Fixes Fetch error when debugging in Chrome
Summary:
Fixes https://github.com/facebook/react-native/issues/6679
Closes https://github.com/facebook/react-native/pull/8512

Differential Revision: D3503958

Pulled By: davidaurelio

fbshipit-source-id: 204eaa40832c9acb455f736d0cae40385c67a82f
2016-06-30 10:43:57 -07:00
Nathan Azaria 98f06c8876 Allow RCTPhotoLibraryImageLoader to handle assets-library request
Reviewed By: javache

Differential Revision: D3503380

fbshipit-source-id: 8f8eb545343738906e44ee01aa4ba23755a209c7
2016-06-30 08:43:25 -07:00