Commit Graph

3212 Commits

Author SHA1 Message Date
Tadeu Zagallo 529687f923 Defer calls until bridge finishes loading
Summary: @​public

When de-batching the calls from native -> JS, some calls were being dispatched
before the bridge had finished loading, which would cause lost calls when running
on the `ContextExecutor` and redbox when running in the Chrome debugger

Reviewed By: @javache

Differential Revision: D2540746

fb-gh-sync-id: ece29406648d3cbcb42cef3b32b8774ff0c15fd8
2015-10-14 09:49:23 -07:00
Krzysztof Magiera 10a9b94b9c Skip unnecessary string allocs from frquently executed code paths.
Differential Revision: D2540814

fb-gh-sync-id: 045d012b52a6bc89d409bcc028532da1760c5775
2015-10-14 09:23:25 -07:00
Felix Oghină aae9f0255f [docs] add docs for integrating with existing apps on Android 2015-10-14 17:10:47 +01:00
Harry Wolff 1b94586fe6 Add documentation for making PushNotificationIOS events work,
Summary: I was just implementing push notifications for my iOS app and was very confused why the `register` event wasn't working.

[Eventually I ran across this tutorial](https://medium.com/@​DannyvanderJagt/how-to-use-push-notifications-in-react-native-41e8b14aadae) that explained that I needed to update my AppDelegate to make that event work.

I've updated the documentation to include that note within the actual file.
Closes https://github.com/facebook/react-native/pull/3390

Reviewed By: @​svcscm

Differential Revision: D2537853

Pulled By: @javache

fb-gh-sync-id: 1e8860173c38f6b2d7f9d273019f201e4cc9c0f2
2015-10-14 09:09:26 -07:00
Martin Konicek 3df34f1ba8 Merge pull request #2953 from j27cai/and-patch
updated ReactiveAndroid installation info
2015-10-14 17:00:59 +01:00
Martin Konicek f8ef2c4b77 Update breaking-changes.md 2015-10-14 16:58:26 +01:00
Christopher Chedeau 92c7eb25a6 Revert changes to breaking-changes.md
This is synced internally, we can't update it on github directly. cc @mkonicek
2015-10-14 08:53:55 -07:00
Martin Konicek 9a48b7c336 Update RunningOnDeviceAndroid.md 2015-10-14 16:49:51 +01:00
Dave Sibiski c2ae790396 Removes hardcoded port `8081` from URL format strings
Summary: This allows the use of different bundle URLs & ports in Dev mode. (ie. ngrok url shared with a team member)

The bundle URL can be changed via the normal Dev Menu, or programmatically by setting the `debug_http_host` shared preference key.

For example, in your apps `MainActivity.java` before creating your `ReactRootView`:
```java
SharedPreferences mPreferences = PreferenceManager.getDefaultSharedPreferences(getApplication());
SharedPreferences.Editor editor = mPreferences.edit();
editor.putString("debug_http_host", "my.customurlandport.com:8888");
editor.commit();
```

**Breaking change**: Custom bundle URLs added via the Dev Menu will need to also include the port. This has been noted in the documentation and also on the preference description in the Dev Menu.

Addresses: https://github.com/facebook/react-native/issues/2704
Closes https://github.com/facebook/react-native/pull/2824

Reviewed By: @​svcscm

Differential Revision: D2540450

Pulled By: @javache

fb-gh-sync-id: a053de91e3095bb67640bb0f1b8761e55775bc9c
2015-10-14 08:46:15 -07:00
Yuri Zarubin 45644aab35 Check that WS connection is open before closing it on failed. Fixes #3346
Summary: Check that the WS state is set to OPEN before trying to close it when the ```websocketFailed``` event fires. Otherwise the app throws an error at the Android level.

Fixes #3346
Closes https://github.com/facebook/react-native/pull/3347

Reviewed By: @​svcscm

Differential Revision: D2535807

Pulled By: @mkonicek

fb-gh-sync-id: bb70c551ea2e582cfaa80139a265dbbca6d990d2
2015-10-14 08:46:12 -07:00
Martin Konicek 855f7be4b8 Make Android examples depend on source again
Summary: @​public

The idea was to depend on a fixed version from Maven to make running the examples easy, however that only works if we depend on both fixed version of JS and the Android artifacts.

The current way leads to version mismatches and causes confusion: https://github.com/facebook/react-native/issues/3329

This commit makes the Android examples consistent with iOS (always build the latest JS and native code from master).

Added docs here: 8abfb5e0e2

Reviewed By: @foghina

Differential Revision: D2531525

fb-gh-sync-id: 7c0844b63ddeb94ad008a3f0e7a43e1af69031c4
2015-10-14 07:48:25 -07:00
Eric Jing Cai 6494746613 Update README.md 2015-10-14 10:44:14 -04:00
Mike Armstrong a041d770e4 PerfTest Stubs for OSS
Differential Revision: D2540549

fb-gh-sync-id: 01abb2e444f1636f50075df94d9275f8295340a3
2015-10-14 07:08:10 -07:00
Martin Konicek 31a02fb758 Merge pull request #2959 from BretJohnson/win-line-endings
Force LF line endings for Bash scripts, so they work on Windows
2015-10-14 14:43:21 +01:00
Krzysztof Magiera 8486a68b91 Share fontsize and numberoflines props between text and inputtext shadow nodes.
Differential Revision: D2540451

fb-gh-sync-id: 289eeaed6881efe429124a0e69195a025ac3cbb8
2015-10-14 05:41:24 -07:00
Martin Konicek ad4f589b65 Update breaking-changes.md 2015-10-14 12:53:43 +01:00
Martin Konicek 663ae6cbf7 Update breaking-changes.md 2015-10-14 12:53:16 +01:00
Martin Konicek 4b90db10da Update breaking-changes.md 2015-10-14 12:52:33 +01:00
Krzysztof Magiera 589df04846 Introduce @ReactProp-enabled LayoutShadowNode as a baseclass for most of the shadow nodes.
Differential Revision: D2540232

fb-gh-sync-id: 6dfed70c8253973897f4e447377ec5561862da23
2015-10-14 01:41:26 -07:00
James Ide 9493e96e13 Merge pull request #3396 from theinventor/patch-1
add RepairShopr to showcase
2015-10-13 22:05:34 -07:00
Troy Anderson c0654cfc96 add RepairShopr to showcase
Happy react-native users over here :)
2015-10-13 22:03:54 -07:00
Bret Johnson ea70525744 Added a .gitattributes file, ensuring that Bash script source files (gradlew and
*.sh) have normal Unix LF line endings even on Windows.  This change is needed
so gradlew, packager.sh, and other Bash scripts can run on Windows (under cygwin).
On Windows the rest of the source files will typically have CR+LF endings (Git
default), but Bash scripts need to have LF endings to work, thus this override
to force that.
2015-10-13 23:10:39 -04:00
Martin Konicek f03c7b59fd Merge pull request #3393 from passy/patch-1
Document opening rage menu via adb
2015-10-14 00:53:54 +01:00
Pascal Hartig 7aeae9778f Document opening rage menu via adb
You can access the rage menu via adb by sending the keycode manually if you don't have a physical device that you can shake.
2015-10-14 00:43:32 +01:00
Martin Konicek 0206347df3 Update KnownIssues.md 2015-10-13 23:24:44 +01:00
Krzysztof Magiera f4e2a670d3 Convert basic shadow nodes to use @ReactProp.
Differential Revision: D2537318

fb-gh-sync-id: 3061545f27953299904fe224e973fa409650d239
2015-10-13 12:57:24 -07:00
Martín Bigio 08e79deebd Update RunningOnDeviceIOS.md 2015-10-13 15:41:42 -04:00
Martín Bigio a21e226b68 Remove `install` command
Summary: @​public

The implementation wasn't working. Lets remove this for now and revisit if we trully want to support this.

Reviewed By: @frantic

Differential Revision: D2536442

fb-gh-sync-id: 4aca2d1d2584cd15ac855d69e6e9a5a08abf778e
2015-10-13 12:08:22 -07:00
Martín Bigio 1ab0c3b374 Update RunningOnDeviceIOS.md 2015-10-13 15:08:11 -04:00
Dave Miller 19e11232fe Move SnapshotView to SnapshotViewIOS and create an unimplemented android version
Reviewed By: @andreicoman11

Differential Revision: D2536373

fb-gh-sync-id: 0f671e8198175a15540b74d54e53eee941aa0c1b
2015-10-13 11:48:38 -07:00
Martín Bigio a102e6f587 Breaking change: Move `bundle` to `private-cli`
Summary: @​public

We need to start using the `private-cli` for the new asset system. Note this is a breaking change! People will have to upgrade their workflows/scripts to start using the new cli. Otherwise we'd need to build a thin adapter that is aware of both APIs which is something we;d like to avoid. The major API changes are:
  - API is now `entry-file` based instead of `url` based.
  - /s/--out/--bundle-output
  - /s/--out/--sourcemap-output

Also these parameters have no longer default values, you need to specify them. For instance, if you want to generate the sourcemaps you need to pass in the `--sourcemap-output` option

Lastly, additional project roots or asset roots need to be specified on the `rn-cli.config.js`.

Reviewed By: @frantic

Differential Revision: D2533877

fb-gh-sync-id: a45f9095fdf9442a9106ea7bb6a6b7f651d25273
2015-10-13 11:48:30 -07:00
Martín Bigio 793c3564ff Fail loud when module is not resolved correctly
Summary: @​public
We've been forgiving unresolved modules errors in the past but we've realized that doing so makes the codebase a bit unstable as people don't make sure to fix these errors. From now on we'll early fail and stop the packager when any module cannot be resolved (including assets)

Reviewed By: @amasad

Differential Revision: D2518076

fb-gh-sync-id: e170d95b905cc29afbe46e24b65425ddd887f77c
2015-10-13 11:48:23 -07:00
James Ide 49f7b68772 Merge pull request #3388 from paramaggarwal/patch-5
Add Myntra to showcase
2015-10-13 11:38:26 -07:00
Param Aggarwal 39bea42932 Add Myntra to showcase
We are using React Native on our app's homepage for the Daily Fashion Feed - a curated list of content to discover inspiring content. We recently went live to 100% and happy to share this news with the community.

Also, we are doing JS updates on the fly to our customers and loving it!
2015-10-13 23:53:19 +05:30
Krzysztof Magiera 05015e8d36 Extract @ReactProp annotated properties from shadow nodes.
Differential Revision: D2536419

fb-gh-sync-id: 643499d4fdcb481349dad1701391059d2362984e
2015-10-13 10:11:30 -07:00
James Ide 3d22547e31 Merge pull request #3384 from mosch/patch-2
Make platform name unselectable
2015-10-13 09:53:29 -07:00
Nick Lockwood a92f107712 Added RCTFileRequestHandler
Summary: @​public

We previously discovered that using an NSURLSessionDataTask to load local files is noticably less efficient than using regular filesystem methods.

This diff adds RCTFileRequestHandler as a replacement for RCTHTTPRequestHandler when loading local files. This reduces loading time when loading local files via XMLHttpRequest, as well as improving the performance for some image load requests.

Reviewed By: @javache

Differential Revision: D2531710

fb-gh-sync-id: 259714baac131784de494d24939f42ad52bff41a
2015-10-13 08:14:28 -07:00
Andy Street 28f6eba22d Make removeClippedSubviews default to true on ListView/RecyclingListView
Reviewed By: @satishsampath

Differential Revision: D2536046

fb-gh-sync-id: 7e0b4442bb0b3705bba3b5f7bdf873fb348a83f6
2015-10-13 08:06:26 -07:00
Andy Street e0b2c2e34e Batch native method calls in 5ms increments
Reviewed By: @mkonicek

Differential Revision: D2535803

fb-gh-sync-id: 8363a83d6966cfa4c2ea46358b10e4139333329f
2015-10-13 08:03:41 -07:00
Martín Bigio 88a880b1fc Pull into our repo `cli.js`
Reviewed By: @vjeux

Differential Revision: D2533584

fb-gh-sync-id: c73647202024c211ffa4a744e0f3566b09c4bc40
2015-10-13 08:03:34 -07:00
Martín Bigio 76e0f49338 Merge pull request #3385 from martinbigio/rm-cli
Temporarily remove cli.js
2015-10-13 11:03:04 -04:00
Param Aggarwal 8e03dfc99e Expose RCTTest for consumers via CocoaPods
Summary: Enables using `RCTTestRunner` in app code.
Closes https://github.com/facebook/react-native/pull/3382

Reviewed By: @​svcscm

Differential Revision: D2536089

Pulled By: @nicklockwood

fb-gh-sync-id: 35d3e57e43ac94ad3e6abf6852bf963c9dd2e1c9
2015-10-13 07:39:24 -07:00
Pieter De Baets 44c651037a Disable RCTLog completely in production
Reviewed By: @nicklockwood

Differential Revision: D2521718

fb-gh-sync-id: f06c9af3906ae8cebca0d318fc2b0e2d03671220
2015-10-13 07:31:25 -07:00
Pieter De Baets c70cbbaf61 Update npm-shrinkwrap
Reviewed By: @foghina

Differential Revision: D2535983

fb-gh-sync-id: 05769aba306e5772d399abb8084c31f9ef2cfc55
2015-10-13 07:23:26 -07:00
Felix Oghină b721c12516 import latest changes from github
Differential Revision: D2536028

fb-gh-sync-id: 2d28b10f06b4ab3a9113b7870e58faf6debba9b6
2015-10-13 06:59:42 -07:00
Martin Bigio 3f55bd1380 Temporarily remove cli.js 2015-10-13 09:57:32 -04:00
Quentin Adam c73ceff914 Corrected computation of RCText element height with padding
Summary: Corrected computation of RCText element height with padding (padding was counted twice).
See also issue #2466.
Closes https://github.com/facebook/react-native/pull/2838

Reviewed By: @​svcscm

Differential Revision: D2535924

Pulled By: @nicklockwood

fb-gh-sync-id: b9527803c0a5a6eed1db7e37c98b628750ab2045
2015-10-13 06:44:32 -07:00
Nick Lockwood 5b425278bb Removed references to isStatic from the codebase
Summary: @​public

The legacy 'isStatic' property for image sources is no longer used anywhere in our codebase, but was still being generated by the packager and referenced in the JS in various places.

This diff removes all the remaining references.

Reviewed By: @frantic

Differential Revision: D2531263

fb-gh-sync-id: 0bba0bb8473b1baa908ef7507cbf6d83efb0d9ee
2015-10-13 06:44:30 -07:00
Alexey Lang aabdc9cc9f Improve RCTPerfomanceLogger
Reviewed By: @mikearmstrong001

Differential Revision: D2531397

fb-gh-sync-id: 3f6c1831c9a7b62f857deda7a535589970cf2052
2015-10-13 06:44:27 -07:00
Tadeu Zagallo baf5b7b4d5 De-batch native->js calls and react updates
Summary: @​public

Take a step back and de-batch the bridge calls so we can have better profiling data and a better starting point to work on future optimisations. Also gave a 10~15% win on first render.

Reviewed By: @javache

Differential Revision: D2493674

fb-gh-sync-id: 05165fdd00645bdf43e844bb0c4300a2f63e7038
2015-10-13 06:44:25 -07:00