Summary:
When we nest scrollviews, the hack in handleCustomPan: will cause the scroll to stall and break.
There's still some weird behaviour inside ScrollResponder.js but this does not seem the affect the scrollview's scrolling.
public
Reviewed By: fionaf, jingc, majak
Differential Revision: D2713639
fb-gh-sync-id: ad898ead62415bc14c91bc84fdfdb8c0fbb32b06
Summary:
public
Fixes#4309
This adds the possibility to reject `Promise` instances with `Throwable`s in java, instead of strings.
For now, it only reads the message, but we can add more features on top of this, e.g. forwarding the error stack.
Reviewed By: andreicoman11
Differential Revision: D2708192
fb-gh-sync-id: ca5ff584eca29370a9f9b780fa9825b17863a7e9
Summary:
public
Looping through every `RCTModuleData` to check whether the module responds to `-batchDidComplete` or `-partialBatchDidFlush` is unnecessarily expensive. We can cache the answer at the time that the module instance is actually initialized.
Reviewed By: tadeuzagallo
Differential Revision: D2717594
fb-gh-sync-id: 274a59ec2d6014ce18c93404ce6b9940c1dc9c32
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
Summary:
public
This causes a warning since propType not exist
Reviewed By: vjeux
Differential Revision: D2713358
fb-gh-sync-id: 58406d1dc969e6f1d40bee958c28cc87036b30c2
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
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
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
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
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
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
Summary:
public
When uploading images, RCTHTTPFormDataHelper was sometimes accessed on the wrong thread.
Reviewed By: helouree
Differential Revision: D2709186
fb-gh-sync-id: d0a14926927d1d41f602f78a9f6892dfbdfc6ff9
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
Summary: It hasn't been resumed yet when first constructed.
public
Reviewed By: astreet
Differential Revision: D2705635
fb-gh-sync-id: fa90a89524d56fd5e349ebad2820b42deba7f26f