Commit Graph

3610 Commits

Author SHA1 Message Date
James Ide cd3865a14d Merge pull request #3658 from divyenduz/native_ios_docs
add missing curly brace in NativeModulesIOS.md
2015-10-24 15:39:34 -07:00
Tadeu Zagallo a044ade333 Update button and add comments to Perf Monitor
Summary: public

Rename the dev menu button and add comments to the private method
used.

Reviewed By: ndfred

Differential Revision: D2576599

fb-gh-sync-id: cd5cde7562dcbc243663ac68d2b9cac5c0a984ab
2015-10-24 14:03:27 -07:00
Divyendu Singh 484e6403b3 add missing curly brace in NativeModulesIOS.md 2015-10-25 01:04:59 +05:30
Brent Vatne 032c3641d0 Merge pull request #3650 from qingfeng/patch-1
add Go Fire APP to showcase
2015-10-24 11:16:48 -07:00
QingFeng 1776fce435 Go Fire APP, All use react native Development 2015-10-24 17:55:58 +08:00
PJ Cabrera 7882506c75 Send the evaluation of the injectedJavaScript prop back to the React Native side
Summary: We have a use case in the development of our app, where we are rendering some HTML content in a web view. But this content comes from the back end, and varies in height. There are other components on the page, so it's not a full screen web view. We need to dynamically alter the web view height, to fit the HTML content without scrolling, and to push the non-web view content on the screen down.

The solution I came up with, was to use the _loadingFinish callback, to send the evaluation of the injectedJavaScript property back to the React Native side. In my example above, injecting 'document.getElement(elementId).offsetHeight' evaluates to the height of the element, with margins and borders applied, and once returned to the RN app, it can change the app state and cause the web view height to be adjusted.
Closes https://github.com/facebook/react-native/pull/2753

Reviewed By: svcscm

Differential Revision: D2578688

Pulled By: mkonicek

fb-gh-sync-id: fc9c0d0f84994a409e037016a555534549f8957a
2015-10-23 20:24:26 -07:00
Martin Bigio 47926abca9 Use default asset roots on `default.config.js`
Summary: We need to cherry pick this one as well.

cc ide
Closes https://github.com/facebook/react-native/pull/3640

Reviewed By: svcscm

Differential Revision: D2577961

Pulled By: mkonicek

fb-gh-sync-id: 3368fc02a931e0f259f3baa6706bd7d8586b0fbf
2015-10-23 18:49:25 -07:00
Martin Bigio 271de0f9b6 Fix webSocketProxy.js
Summary: cc mkonicek ide
Closes https://github.com/facebook/react-native/pull/3638

Reviewed By: svcscm

Differential Revision: D2576536

Pulled By: martinbigio

fb-gh-sync-id: 27f53eedf2bd94f71f4e405d3d4bb193eaabc918
2015-10-23 13:58:31 -07:00
James Ide ba6be7ab88 Merge pull request #3627 from christopherdro/fix-3622
Add section for troubleshooting. Closes #3622
2015-10-23 12:29:55 -07:00
James Ide 2fb51bf74a [Docs] Update Podfile troubleshooting to use local :path syntax
The supported way to use CocoaPods is via a local pod in node_modules so update the docs to reflect that.
2015-10-23 12:27:56 -07:00
James Ide 1f00ae787a [Docs] Update docs to explain how to use local Pod from npm
These instructions were already in the docs; just gave them more meat and deleted the old instructions that talked about installing from the Pod repo. Now, we publish only to npm so these instructions are important.
2015-10-23 12:26:25 -07:00
Christopher Dro c211a084ef Add section for troubleshooting. Closes #3622 2015-10-23 11:57:51 -07:00
Spencer Elliott c1faabcdf6 Replace applescript with https://github.com/sindresorhus/opn
Summary: This allows opening the Chrome debugger on OS X, Linux, and Windows, and succeeds the previous PR which used [browser-launcher2](https://github.com/benderjs/browser-launcher2) and included a `--dangerouslyDisableChromeDebuggerWebSecurity` option: https://github.com/facebook/react-native/pull/2406

[opn](https://github.com/sindresorhus/opn) is cross-platform and much simpler than browser-launcher2 (since we don't have to manage the opened Chrome instance; the OS will just use the default instance).
Closes https://github.com/facebook/react-native/pull/3394

Reviewed By: mkonicek

Differential Revision: D2550996

Pulled By: frantic

fb-gh-sync-id: fa4cbe55542562f30f77e0a6ab4bc53980ee13aa
2015-10-23 11:32:35 -07:00
Alex Kotliarskyi f0cf0b0288 npm install --save opn
Reviewed By: mkonicek

Differential Revision: D2570884

fb-gh-sync-id: 89f9ab8e8b04081442da28e8c30caa80b454d696
2015-10-23 11:32:29 -07:00
Tadeu Zagallo 9069bdf1c2 Introduce Perf Monitor
Summary: public

Kill `RCTPerfStats` and introduce the new `RCTPerfMonitor`, including memory
usage, JSC heap size, number of RN views in screen, FPS (both on UI and JS threads)
and more to come.

It removes all the previous traces that were previous spread across the bridge
and the dev menu and moves everything to be more contained, so the whole thing
can be safely striped in production.

Reviewed By: nicklockwood

Differential Revision: D2575158

fb-gh-sync-id: 6a6d0c4422adbddeeefddd32ec3409a7095ff2a9
2015-10-23 10:56:56 -07:00
Nick Lockwood cae4761006 Use arrays for module method data
Summary: public

Use arrays instead of dictionaries for encoding module method information.

This further reduces UIExplorer startup JSON from 16104 bytes to 14119 (12% reduction)

Reviewed By: javache

Differential Revision: D2570057

fb-gh-sync-id: 4a53a9ead4365a136e7caeb650375733e1c24c0e
2015-10-23 10:16:26 -07:00
Martín Bigio dad45aa8f2 Fix `android` command
Summary: public

We've recently tweak `Config.js` so that it changes the current working directory to be able to keep track of it when running functions on the config instances. Turns out we can't do this as some commands rely on the current path (i.e.: `android`).

Although for this specific command we could fix the issue by using several `../` I feel like changing the cwd could bring other weird problems in the future, so I'm reverting the last update I did to D2565954.

Reviewed By: foghina

Differential Revision: D2572172

fb-gh-sync-id: 8cba62228b19a7729efcfe240a2f00e9becda61f
2015-10-23 09:53:24 -07:00
Pieter De Baets 039dab078a Fix configuration for OSS UIExplorer tests
Reviewed By: nicklockwood

Differential Revision: D2575356

fb-gh-sync-id: 0ab5bd29aa3c17a8cb067a8a17abed3e178c5bcf
2015-10-23 09:35:25 -07:00
Nick Lockwood b0b9a56ef8 Fixed ActivityIndicatorIOS layout
Summary: public

This has been broken for a while. The styles in the JS were being set on the container instead of the activity view itself.

Also, due to the way frames were set directly on layer properties instead of the view, resizing didn't work properly because the UIImageView inside the UIActivityView was not being realligned when the bounds changed. This also caused problems for other controls such as maps, where it was fixed with a method override, but the simpler solution is just to set the view center and bounds directly.

Before: {F23631143}
After: {F23631144}

Reviewed By: javache, tadeuzagallo

Differential Revision: D2575156

fb-gh-sync-id: e82e56d36648e7c924df77da1750e03037b5d5be
2015-10-23 09:13:24 -07:00
Pieter De Baets ed0b45ef8e Merge pull request #3578 from javache/xcode-7
Use latest simulator version
2015-10-23 16:04:22 +01:00
Felix Oghină 864fdd1ebd Merge pull request #3580 from exponentjs/cli-version-check
[CLI] Make `react-native init` check your Node version
2015-10-23 11:57:25 +01:00
Felix Oghină 7e53ee1095 add upgrade cli command
Reviewed By: mkonicek

Differential Revision: D2559885

fb-gh-sync-id: 785bd6ad855da30c00b170e737a7dd0f3e756430
2015-10-23 03:37:28 -07:00
Felix Oghină 6f71b790f1 Merge pull request #3297 from exponentjs/node-4-cli
[CLI] Add Node >= 4 requirement to CLI tools
2015-10-23 11:18:44 +01:00
rocman 772010a9af Add controller to closest parent on time so as to fix the automaticallyAdjustContentInsets feature.
Summary: Here's the bug to fix:
https://github.com/facebook/react-native/issues/898
Closes https://github.com/facebook/react-native/pull/3509

Reviewed By: svcscm

Differential Revision: D2574869

Pulled By: javache

fb-gh-sync-id: 8d947c2a0edcfb695c2e209c7b44ae6417b6233e
2015-10-23 03:15:25 -07:00
James Ide bc409ba2da Merge pull request #3620 from jabbrass/patch-2
[docs] fix typos (docs/Animations)
2015-10-22 17:16:10 -07:00
J. Andrew Brassington 7c36138caa Fix typos (docs/Animations)
Line 461: "simlar" => "similar"
Line 545: "tighly" => "tightly"
2015-10-22 17:02:40 -07:00
Alexander Blom e6ad91b5a2 Fix showsHorizontalScrollIndicator for ScrollView
Differential Revision: D2573323

fb-gh-sync-id: 980a29fcf836326f9f581eb404d36638afb67f10
2015-10-22 16:50:25 -07:00
James Ide 6ec4d65aec Set up the RN JS environment before requiring other modules
Summary: Set up the polyfills for console and process before initializing other modules. Some modules do work (e.g. call `invariant`) when they are first required, so requiring the DefaultInjection module at the beginning ensures we have a consistent JS environment.
Closes https://github.com/facebook/react-native/pull/3526

Reviewed By: spicyj

Differential Revision: D2560340

Pulled By: frantic

fb-gh-sync-id: 44c743e3212ff1dcdbe0169041dfd3ea8f1a54f7
2015-10-22 15:48:28 -07:00
Martin Konicek 251a4086a7 Fix Chrome debugging
Reviewed By: dkoroskin

Differential Revision: D2572178

fb-gh-sync-id: 677f2eb5a7ff5ada2a4e66f86e90664787bef346
2015-10-22 14:26:27 -07:00
Martín Bigio dee96fbedc Update blacklist.js
Summary: Since we rely on a non npm version of `react-tools` which includes docs and other unnecessary files we need to make sure we blacklist some of them as otherwise the packager fails
Closes https://github.com/facebook/react-native/pull/3616

Reviewed By: svcscm

Differential Revision: D2572024

Pulled By: mkonicek

fb-gh-sync-id: 2082cd69e2ccddb275dfdc7db107d4ed6b826bbb
2015-10-22 14:20:26 -07:00
Martin Konicek 582655e6a8 Merge pull request #3612 from martinbigio/scripts-fix
[react-native-cli] Fix errors on tests refering `packager.js`
2015-10-22 20:45:24 +01:00
Martin Konicek eced31ffaf Merge pull request #3611 from foghina/bundle_upgrade_docs
[docs] add bundle and upgrade docs
2015-10-22 20:11:07 +01:00
Martin Bigio 26df016600 [react-native-cli] Fix errors on tests refering `packager.js` 2015-10-22 14:17:29 -04:00
Felix Oghină 880a06a4b2 [docs] add bundle and upgrade docs 2015-10-22 19:11:38 +01:00
Martin Konicek 3d489c3a6a Update GettingStarted.md 2015-10-22 19:05:11 +01:00
Martin Konicek 98aed73e1c Update GettingStarted.md 2015-10-22 19:02:19 +01:00
Martín Bigio 32aeeea313 Fix cli entry points
Reviewed By: frantic

Differential Revision: D2565954

fb-gh-sync-id: 6fde9e1dbefd71944e8f857e9a40619bf599ef75
2015-10-22 10:13:13 -07:00
Martin Konicek 17ef86d6bb Update LinuxWindowsSupport.md 2015-10-22 17:22:52 +01:00
Martin Konicek 58ea08dfdb Fix react-tools dependency
Reviewed By: foghina, spicyj

Differential Revision: D2570237

fb-gh-sync-id: 4340953702112af704cac97e7d27313c573eee20
2015-10-22 08:38:27 -07:00
Pieter De Baets 59bb57a002 Use latest simulator version 2015-10-22 16:10:09 +01:00
Martin Konicek 55f8f3e370 Explanatory message when starting packager on Windows or unknown platform
Reviewed By: martinbigio

Differential Revision: D2564756

fb-gh-sync-id: 097ec541267a54a45d82116a03e4c22b8f49eb99
2015-10-22 07:10:27 -07:00
Pieter De Baets afea653cbc Measure script conversion time in RCTPLScriptExecution
Reviewed By: alexeylang

Differential Revision: D2570036

fb-gh-sync-id: a3ca8cdf0420b0da12b65ac0a672179940b2f818
2015-10-22 06:41:28 -07:00
Felix Oghină ce7de93275 [android] remove deprecated gradle plugin 2015-10-22 14:25:03 +01:00
Nick Lockwood ae5de54f00 Reduced module config data
Summary: public

We're sending a lot of module config data when the app first starts, and much of this is redundant.

UIExplorer current sends 19061 bytes of module config JSON. This diff reduces that to 16104 (15% saving) by stripping modules that have no methods or constants, and removing method types unless method is async.

Reviewed By: tadeuzagallo, javache

Differential Revision: D2570010

fb-gh-sync-id: 8c0abbd1cdee3264b37a4f52e852008caaffb9c5
2015-10-22 05:53:26 -07:00
Charles Marsh 66717d802b Allow for styling of ToolbarAndroid's overflow icon
Summary: Fixes #2858.

Here's a screenshot of the custom overflow icon in action:
<img width="638" alt="overflow" src="https://cloud.githubusercontent.com/assets/1309177/10567090/693e395a-75ae-11e5-84cd-20b19149c620.png">
Closes https://github.com/facebook/react-native/pull/3497

Reviewed By: svcscm

Differential Revision: D2559787

Pulled By: foghina

fb-gh-sync-id: f188711ec094af3fa307722527f22aefff722e64
2015-10-22 04:43:25 -07:00
Tadeu Zagallo 71da2917e5 Remove retainArguments from RCTModuleMethod's invocation
Summary: public

Fixes #2527

We were re-using the same invocation for every module's method, but calling
`[NSInvocation retainArguments]`, so the arguments would never be released.

Reviewed By: nicklockwood

Differential Revision: D2559997

fb-gh-sync-id: eafa3b3517c7cab3539954e26e250f7f668eee50
2015-10-22 04:04:25 -07:00
Felix Oghină ff17789e98 consistent redbox theme, bigger text and spacing
Differential Revision: D2569981

fb-gh-sync-id: 20b9bfc6801544795d6d13aa029ae5e1f5ee1dee
2015-10-22 03:39:26 -07:00
Alexander Kotliarskyi 8c18a24277 Merge pull request #3586 from frantic/fix-e2e-tests
Fix e2e tests
2015-10-21 21:03:13 -07:00
Alex Kotliarskyi be70e32de2 Generate bundle and assets when building via Xcode
Summary: This integrates React Native into Xcode's build process, which lets us automatically handle bundling and packaging image assets.

Tested the script via https://github.com/frantic/ReactNativeAssetsExample

Loaded from packager:
<img width="432" alt="screen shot 2015-10-19 at 3 11 12 pm" src="https://cloud.githubusercontent.com/assets/192222/10593447/be5bc7e8-7678-11e5-8c70-ecc2a1ee24fc.png">

Loaded from offline bundle:
<img width="432" alt="screen shot 2015-10-19 at 3 10 58 pm" src="https://cloud.githubusercontent.com/assets/192222/10593448/be5d5194-7678-11e5-8b02-d492a26cfb81.png">

Android:
<img width="639" alt="screen shot 2015-10-19 at 3 11 20 pm" src="https://cloud.githubusercontent.com/assets/192222/10593449/be5de2d0-7678-11e5-8d3c-0378fc447f15.png">
Closes https://github.com/facebook/react-native/pull/3523

Reviewed By: mkonicek

Differential Revision: D2557923

Pulled By: frantic

fb-gh-sync-id: 19957e255993696e793b0162662772efd89f5c1a
2015-10-21 18:44:27 -07:00
Bhuwan Khattar aff4cfb3b3 Fix spacing
Reviewed By: cpojer

Differential Revision: D2568166

fb-gh-sync-id: 8cedfd49ae4ce0de57a4ff3b499057c748803bd3
2015-10-21 17:39:26 -07:00