Commit Graph

4109 Commits

Author SHA1 Message Date
Tim Yung 1c57291faa RN: Support Multiple Packager Servers
Summary:
Adds support for multiple packager servers, which could be used to hot-reload dependencies in response to a change in the `cacheVersion`.

Currently, there is no way to:

- Create multiple `ReactPackager` servers.
- Instantiate more than one `FileWatcher` constructor (due to the "single instance" invariant).

public

Reviewed By: martinbigio

Differential Revision: D2713455

fb-gh-sync-id: 9be0f0cb2b846baf088d0cf14650cc8b9e950815
2015-12-02 19:03:27 -08:00
Satyajit Sahoo d691091530 Fix typo in permalink 2015-12-03 07:47:11 +05:30
Martin Konicek 63cff1abcb Merge pull request #4403 from satya164/docs
[Android] Add docs on building from source
2015-12-02 23:11:41 +00:00
Wenjing Wang 0058b0806b propTypes could be undefined
Summary:
public
This causes a warning since propType not exist

Reviewed By: vjeux

Differential Revision: D2713358

fb-gh-sync-id: 58406d1dc969e6f1d40bee958c28cc87036b30c2
2015-12-02 12:33:30 -08:00
Konstantin Raev 0779dd1e87 Open source the Android NetInfo module
Reviewed By: mkonicek

Differential Revision: D2703432

fb-gh-sync-id: 4a85844f1734ec433df543c89f0fdd56fe5db13c
2015-12-02 11:52:22 -08:00
James Ide 06f2c33f0d Merge pull request #4492 from sunnylqm/patch-11
add git requirement and note for environment variables
2015-12-02 10:40:52 -08:00
Nick Lockwood 6d29f710e1 Fixed TextInput on iOS 8 and earlier
Summary:
public

The scrolling fix I added to RCTTextView doesn't work on iOS 8 because the underlying UITextField doesn't resize correctly, which breaks text input functionality. This diff fixes it.

Reviewed By: tadeuzagallo

Differential Revision: D2712618

fb-gh-sync-id: 1d0282df3a16f1cb6ddf9d005d640738bb1b5659
2015-12-02 10:37:26 -08:00
Felix Oghina c06efc0831 remove activities from module constructors
Summary:
Refactor modules that take activities (or activities that implement some interface) as constructor args to not do that. Expose `getCurrentActivity()` in `ReactContext` and use that wherever the activity is needed.

public

Reviewed By: astreet

Differential Revision: D2680462

fb-gh-sync-id: f263b3fe5b422b7aab9fdadd051cef4e82797b0a
2015-12-02 10:05:28 -08:00
Nick Lockwood 7ab17e5ef3 Fix for long press state transition error in Touchable.js
Summary:
public

This diff fixes an occasional JS exception thrown by Touchable.js when it attempts to transitions to the RESPONDER_ACTIVE_LONG_PRESS_IN state from the RESPONDER_INACTIVE_PRESS_IN state.

Although I wasn't able to reproduce the error while testing, I was able to identify the likely cause: the LONG_PRESS_DETECTED state transition is triggered by a timer that is started on touch-down. This timer should be cancelled if the gesture is interrupted, however I identified a code path where the state can be changed to RESPONDER_INACTIVE_PRESS_IN without the longPressDelayTimeout being cancelled.

To fix this, I've added some logic to cancel the timer in that case. I've also added a test for the error scenario that will display a redbox in __DEV__ mode, but will fail gracefully in production mode.

Reviewed By: jingc

Differential Revision: D2709750

fb-gh-sync-id: aeea1a31de5e92eb394c2ea177f556b131d50790
2015-12-02 09:54:29 -08:00
mkonicek-pr-test 7424af6078 Test PR 6: Tweak colors in 2048 example
Summary:
Just testing the shipit bot
Closes https://github.com/facebook/react-native/pull/4503

Reviewed By: svcscm

Differential Revision: D2712738

Pulled By: androidtrunkagent

fb-gh-sync-id: 267f55991ca8267cb651734093bc62fb9c77a056
2015-12-02 09:04:28 -08:00
Nick Lockwood 37042573b8 Added blurOnSubmit support to multine TextInput (aka RCTTextView)
Summary:
public

Setting `blurOnSubmit=true` on a multiline `<TextInput>` now causes it to behave like a single-line input with respect to the return key:

With the default value of `false`, pressing return will enter a newline character into the field. If you set the value to `true`, pressing return will now blur the field and trigger the onSubmitEditing event. The newline character will *not* be added to the text.

(See associated github task for dicussion: https://github.com/facebook/react-native/pull/2149)

Reviewed By: javache

Differential Revision: D2710448

fb-gh-sync-id: c9706ae11f8b399932d3400ceb4c7558e455570d
2015-12-02 08:16:27 -08:00
Nick Lockwood 807e0d9310 Fixed Xcode warnings
Summary:
public

Fixed some Xcode warnings, and added some missing UIResponder methods to make the behavior of RCTTextView more self-consistent.

Reviewed By: javache

Differential Revision: D2712250

fb-gh-sync-id: d30038500194d7a5262d9e77d516c65d836a4420
2015-12-02 08:03:26 -08:00
Chirag a32ff54e70 Merge pull request #4491 from sercanov/patch-2
added Mobabuild app
2015-12-02 09:51:41 -05:00
Alon Schwarz f69ac1eaef Revert D2679408 (Only send layout update operation to nativehierarchymanager when layout actually changes)
Reviewed By: andreicoman11

Differential Revision: D2712224

fb-gh-sync-id: e6aebe6fcf54e9f36cac092cab801bb97a65dbfd
2015-12-02 06:46:28 -08:00
Alexander Blom 30a5eb51f8 Generate module definition on demand
Reviewed By: astreet

Differential Revision: D2707977

fb-gh-sync-id: fb2baa464a23df82e8b48a91a84c98370517d311
2015-12-02 06:25:28 -08:00
Justin Spahr-Summers c25c98c00c Flush UI blocks as soon as they're accumulated
Summary:
public

Currently, we wait to invoke `-flushUIBlocks` until the JavaScript batch to native has completed. This means we may be waiting an unnecessarily long time to perform view hierarchy changes and prop changes.

By instead invoking this after each chunk of enqueued UI blocks, we can perform some updates more eagerly, increasing our utilization of the main thread while splitting up the amount of time we spend running upon it.

This shouldn't affect layout, which is still tied to `-batchDidComplete`, so any visual inconsistencies should be limited to prop changes, which seems acceptable for the dramatic improvement in performance.

Reviewed By: javache

Differential Revision: D2658552

fb-gh-sync-id: 6d4560e21d7da1b02d2f30d1860d60735f11c4b5
2015-12-02 06:03:27 -08:00
Christopher Dro 802aef9509 Update argument passed for assetRoots.
Summary:
Fixes #4388
Closes https://github.com/facebook/react-native/pull/4431

Reviewed By: svcscm

Differential Revision: D2704076

Pulled By: mkonicek

fb-gh-sync-id: 2b788eb15787334bf7309fde730566092ff63832
2015-12-02 05:55:26 -08:00
sercanov 7e4c8b2d2d sorted alphabetically 2015-12-02 14:43:01 +02:00
sunnylqm edb26072c3 add git requirement and note for environment variables 2015-12-02 20:31:05 +08:00
sercanov 873efa2e97 added Mobabuild app 2015-12-02 14:27:18 +02:00
David Aurelio 5dc40afbf6 Add for-of transform to babel configurations
Summary:
Adds babel-plugin-transform-es2015-for-of to babel configuration.

public

Reviewed By: tadeuzagallo

Differential Revision: D2712220

fb-gh-sync-id: cc6dd9e6e70946607ef9bb9f659eb628cf2eb555
2015-12-02 04:14:30 -08:00
Nick Lockwood 04187536d1 Fixed threading bug in RCTNetworking
Summary:
public

When uploading images, RCTHTTPFormDataHelper was sometimes accessed on the wrong thread.

Reviewed By: helouree

Differential Revision: D2709186

fb-gh-sync-id: d0a14926927d1d41f602f78a9f6892dfbdfc6ff9
2015-12-02 02:24:27 -08:00
Wenjing Wang 0571250521 8/n Fix warnings at startup
Summary:
public
- Add missing required `key` prop for array of child components

Reviewed By: zjj010104

Differential Revision: D2711271

fb-gh-sync-id: b9848abffd3c458cf45b1231be5eff0a5de805f1
2015-12-01 22:53:30 -08:00
Gabe Levi c11dce36e6 Deploy 0.19.0
Reviewed By: mroch

Differential Revision: D2711202

fb-gh-sync-id: b889cc9fe13f676aa4e7a5672556174792ece365
2015-12-01 20:11:38 -08:00
Gabe Levi 892dd5b86a Fix errors uncovered by v0.19.0
Reviewed By: mroch

Differential Revision: D2706663

fb-gh-sync-id: 017c91bab849bf18767cacd2ebe32d1a1b10c715
2015-12-01 20:11:26 -08:00
Satyajit Sahoo d4d41f9523 Merge pull request #4454 from plrthink/master
add mockingbot to showcase
2015-12-02 09:18:17 +05:30
Olivier Notteghem 098fcb3a27 LayoutAnimation support for Android RN
Reviewed By: dernienl

Differential Revision: D2710141

fb-gh-sync-id: 28d6af84441b7c2dbc423b73eb05e71f62f7cdea
2015-12-01 19:06:32 -08:00
Nathan Spaun cf892a96d6 Fix NetInfo for Android
Reviewed By: oli

Differential Revision: D2708102

fb-gh-sync-id: f6a12c49c89c46d31114fefaf3e2b1ba72dabdee
2015-12-01 15:14:30 -08:00
Denis Koroskin b828ae4200 Initial FlatUIImplemenatation
Summary: public This patch adds an alternative UIImplementation based on an idea of creating UI hierarchy off-the-main-thread (everything but Views), flattening ReactShadowNode hierarchy and displaying it within a single View when possible. While NativeViewHierarchyOptimizer allows removing layout-only RCTViews, this allows removing RCTView, RCTText and RCTImage.

This is an initial bare-bones implementation that doesn't really draw anything, only lays out the shadow nodes. Followup diffs will add missing features.

Reviewed By: astreet

Differential Revision: D2564309

fb-gh-sync-id: 2dda4c8cfc2bac3eb39c5c15e97bd23a57550a1d
2015-12-01 13:11:27 -08:00
Daniel Hugenroth b0e39d26ae implemented tracing async flow events (s, t and f)
Reviewed By: jkeljo

Differential Revision: D2699625

fb-gh-sync-id: 1d1b41fac157650e98a49307b701b6da63589c4b
2015-12-01 10:36:27 -08:00
Aaron Chiu b6f662d6b6 init Timing.java in a paused state
Summary: It hasn't been resumed yet when first constructed.

public

Reviewed By: astreet

Differential Revision: D2705635

fb-gh-sync-id: fa90a89524d56fd5e349ebad2820b42deba7f26f
2015-12-01 10:06:27 -08:00
David Aurelio a26b89f8bd Add property mapping for `borderStyle` from JS to `RCTView` (iOS)
Reviewed By: nicklockwood

Differential Revision: D2540321

fb-gh-sync-id: 57316f7b8dc734ee784179dbfde83e6034827819
2015-12-01 09:00:28 -08:00
Satish Sampath 765801dfc2 Improve JSC GC implementation on android
Reviewed By: astreet

Differential Revision: D2657643

fb-gh-sync-id: a049ee745de9a066a4a2da2762ec6a2f1517c78b
2015-12-01 08:50:32 -08:00
David Aurelio cc4a5d39db Add unbundling to packager
Reviewed By: tadeuzagallo

Differential Revision: D2707409

fb-gh-sync-id: 30216c36066dae68d83622dba2d598e9dc0a29db
2015-12-01 08:48:30 -08:00
Mike Armstrong b6f5c7fa04 Fix systrace profile handling for relay async calls
Reviewed By: astreet

Differential Revision: D2700239

fb-gh-sync-id: eaa29d63ee4f7688dd70b0cdc12564a9d479f9ef
2015-12-01 08:42:24 -08:00
Huang Yu 0a3694ce48 fix several lint warnings
Summary: fix some ling warnings from several files
Closes https://github.com/facebook/react-native/pull/4450

Reviewed By: svcscm

Differential Revision: D2707606

Pulled By: mkonicek

fb-gh-sync-id: 410ccacf061ac7b0f6e44d1a5e4621a9d1d606fc
2015-12-01 07:26:29 -08:00
Perry Poon 16b9c7d6f6 change order in showcase 2015-12-01 23:01:48 +08:00
Tadeu Zagallo 8ec052a727 Expose JS hooks to profile async events
Summary: public

Expose JS hooks to add async events to Systrace from JS.

Reviewed By: mikearmstrong001

Differential Revision: D2702739

fb-gh-sync-id: 906849d3819a914c521b9315e396c75946c9211d
2015-12-01 05:58:31 -08:00
Dave Miller 7377fdcc70 Fix XY coords to be XY instead of YX
Summary: public

This fixes the ordering of methods in touch handling to take their arguments as X,Y instead of Y,X.

This is really just internal cleanup of native touch handling.

Reviewed By: andreicoman11

Differential Revision: D2703003

fb-gh-sync-id: d169436d21fd11c1a9cb251e7e0b57b2094699e4
2015-12-01 05:35:34 -08:00
Aleksei Androsov d08727d99f RCTImagePickerManager crash on image from CameraRoll
Summary: Image from CameraRoll haven't UIImagePickerControllerReferenceURL. So we need to save it to PhotoAlbums first.

To save image I've used the same method from RCTCameraRollManager.
Closes https://github.com/facebook/react-native/pull/4412

Reviewed By: svcscm

Differential Revision: D2707249

Pulled By: nicklockwood

fb-gh-sync-id: eee683bd4179700bed46ebf45e569197f3ad2077
2015-12-01 02:13:28 -08:00
Krzysztof Magiera aad40b8b1d Update Android Setup with recommendation to use gradle daemon 2015-12-01 09:55:57 +01:00
Christopher Dro f025049b6c Add secure and login-password types to AlertIOS.
Summary: Request from issue #3893

* Added support for `secure-text` and `login-password` types to AlertIOS.
* Fixed and extended the cancel button highlighting functionality, which was broken at some point
* Added localization for default `OK` and `Cancel` labels when using UIAlertController

Closes https://github.com/facebook/react-native/pull/4401

Reviewed By: javache

Differential Revision: D2702052

Pulled By: nicklockwood

fb-gh-sync-id: cce312d7fec949f5fd2a7c656e65c657c4832c8f
2015-11-30 19:51:41 -08:00
Huang Yu 7242efde0a fix navigator lint warnings
Summary: fix some lint warnings under `Libraries/CustomComponents/Navigator/` directory
Closes https://github.com/facebook/react-native/pull/4447

Reviewed By: svcscm

Differential Revision: D2706390

Pulled By: ericvicenti

fb-gh-sync-id: 5bfed687265e07a162ffc528a41fa5b0d384f635
2015-11-30 19:31:30 -08:00
Denis Koroskin baa97b2e9f Make ViewManagerRegistry class public
Summary: public I need to construct this class outside of the uimanager package, and this requires the class (and its constructor) to be public.

Reviewed By: astreet

Differential Revision: D2554847

fb-gh-sync-id: a73c3236b91a1ed7074521e19b72e1994804cced
2015-11-30 19:13:25 -08:00
Denis Koroskin 00046bc832 Allow extending NativeViewHierarchyManager
Summary: public This diff makes a few small changes to NativeViewHierarchyManager to allow extending it:
a) makes the class public so it can be constructed from outside of the package
b) adds resolveView and resolveViewManager to access mTagsToViews and mTagsToViewManagers
c) changes addRootView signature to make root view a ViewGroup instead of SizeMonitoringFrameLayout

The reason behind change c) is that in FlatUIImplementation I want to use a root view that does not extend SizeMonitoringFrameLayout. NativeViewHierarchyManager doesn't really use any of the root view properties, so it could be even a View, but ViewGroup seems more fitting.

This diff should contain no functional changes or other side-effects.

Reviewed By: astreet

Differential Revision: D2554841

fb-gh-sync-id: cce748707cf7485d456e4a057dae1db87aa17160
2015-11-30 18:59:26 -08:00
Perry Poon da9e9e709b add mockingbot to showcase 2015-12-01 10:50:35 +08:00
Denis Koroskin fe28118a48 When creating a View using NativeViewHierarchyManager, pass ThemedReactContext instead of root view tag
Summary: public NativeViewHierarchyManager.createView() takes int rootViewTag which is only used to resolve ThemedReactContext, but we already have it resolved before we enqueueCreateView, so we can just pass it directly. This makes mRootViewsContext tag -> to ThemedReactContext mapping unnecessary in NativeViewHierarchyManager. Makes the class simpler.

Reviewed By: kmagiera, astreet

Differential Revision: D2460280

fb-gh-sync-id: 68c503f4fb37ca0b1dcb2abc9e0c33a5225d1f6a
2015-11-30 18:21:40 -08:00
Denis Koroskin c4c74215fa Allow extending UIViewOperationQueue
Summary: public I need to extend NativeViewHierarchyManager to support a richer set of operations on Views, and those operations needs to be ran in UI thread.
Existing UIViewOperationQueue doesn't know about those operations, so I need to extend it too to allow them. This patch is making the class constructor protected to allow subclassing it from another package. Should not have any functional changes.

Reviewed By: astreet

Differential Revision: D2554826

fb-gh-sync-id: ad2d44a61beb216d940e20cd1489d3b5da1b398b
2015-11-30 17:43:27 -08:00
Huang Yu 8f2023d961 fix Libraries/Components/Touchable lint warnings
Summary: fix 4 lint warnings under Libraries/Components/Touchable directory
Closes https://github.com/facebook/react-native/pull/4449

Reviewed By: svcscm

Differential Revision: D2705537

Pulled By: spicyj

fb-gh-sync-id: 0c573d846a2263819c2a0bffe0a178eee1fe3fca
2015-11-30 17:16:26 -08:00
Huang Yu da0744892c fix Library/ReactNative lint warnings
Summary: fix 2 lint warnings under `Libraries/ReactNative` directory
Closes https://github.com/facebook/react-native/pull/4446

Reviewed By: svcscm

Differential Revision: D2705429

Pulled By: nicklockwood

fb-gh-sync-id: a7318ef9d1d194f077b0879fd041c42da5b2dec3
2015-11-30 16:25:46 -08:00