986 Commits

Author SHA1 Message Date
Spencer Ahrens
d7b13fb32b Updates from Thu Sep 3rd. 2015-09-03 12:55:40 -07:00
Alex Akers
8187d1f0ec Update image loader plugins 2015-09-03 06:06:19 -08:00
Nick Lockwood
aa62a5e4e0 Send layout events on shadow queue
Summary:
We currently wait until after views have been updated on the main thread before sending layout events. This means that any code that relies on those events to update the UI will lag the atual layout by at least one frame.

This changes the RCTUIManager to send the event immediately after layout has occured on the shadow thread. This noticably improves the respinsiveness of the layout example in UIExplorer, which now updates the dimension labels immediately instead of waiting until after the layout animation has completed.
2015-09-03 03:42:26 -08:00
Oliver (Cunpu) Bo
f28255ea3e Support "file://" in RCTImageLoader 2015-09-02 16:37:33 -08:00
Alex Akers
36444a65c7 Add pluggable image processing system 2015-09-02 08:31:34 -08:00
Nick Lockwood
848839858b Added mechanism for directly mapping JS event handlers to blocks
Summary:
Currently, the system for mapping JS event handlers to blocks is quite clean on the JS side, but is clunky on the native side. The event property is passed as a boolean, which can then be checked by the native side, and if true, the native side is supposed to send an event via the event dispatcher.

This diff adds the facility to declare the property as a block instead. This means that the event side can simply call the block, and it will automatically send the event. Because the blocks for bubbling and direct events are named differently, we can also use this to generate the event registration data and get rid of the arrays of event names.

The name of the event is inferred from the property name, which means that the property for an event called "load" must be called `onLoad` or the mapping won't work. This can be optionally remapped to a different property name on the view itself if necessary, e.g.

  RCT_REMAP_VIEW_PROPERTY(onLoad, loadEventBlock, RCTDirectEventBlock)

If you don't want to use this mechanism then for now it is still possible to declare the property as a BOOL instead and use the old mechanism (this approach is now deprecated however, and may eventually be removed altogether).
2015-09-02 06:11:24 -08:00
Spencer Ahrens
4379aa00de [RN] Use default param for elastic bounciness 2015-09-01 20:38:50 -08:00
Hedger Wang
36dfd402b2 [madman] Supports onLayout for AdsManagerTouchableHighlight.
Summary:
Supports `onLayout` for Touchable*` by piping onLayout
through to the native component inside since only native components support
it by default.
2015-09-01 10:22:47 -08:00
Marius Butuc
3cd9187a26 Fix LinkingIOS docs typo
Summary:
And yes, just agreed to the Contributor License Agreement (CLA). 👍
Closes https://github.com/facebook/react-native/pull/2483
Github Author: Marius Butuc <marius@shopify.com>
2015-09-01 08:09:45 -08:00
James Ide
853d5b2221 [TextInput] Set scrollsToTop = NO for UITextViews
Summary:
Now that UITextViews have a delegate, they consume the "tap to scroll to top" gesture. This diff restores the original behavior of letting the top-level scroll view (if any) scroll to top instead.

I tried exposing scrollsToTop as a prop and was semi-successful in that I could turn scroll-to-top on and off for the top-level scroll view scroll, but the text view itself would never scroll to top. So instead of exposing it as a prop, this diff sets scrollsToTop always to NO, which is how TextInput behaved previously.

Closes https://github.com/facebook/react-native/pull/2333
Github Author: James Ide <ide@jameside.com>
2015-09-01 02:40:15 -08:00
Nathan Spaun
1ff22b7b9c Adding jest tests to groups rn 2015-08-31 17:35:47 -08:00
Spencer Ahrens
465f539057 Updates from Mon Aug 31st. 2015-08-31 16:31:41 -07:00
Spencer Ahrens
9ad2c322c0 [RN] improve elastic easing
Summary:
1) Makes params more intuitive (only one now, bounciness, which maps intuitively to number of oscillations).
2) Satisfies boundary conditions (f(0) = 0, f(1) = 1) so animation actually goes where you tell it (before it would finish at a random location depending on the input params).
3) Simple test to verify boundary conditions.
2015-08-31 13:39:00 -08:00
Spencer Ahrens
94ae886060 [RN] add clarifying Android-only comment to Portal 2015-08-31 11:10:45 -08:00
Felix Oghina
53fc5624e4 [reactnative] send platform arg with all packager requests 2015-08-29 06:36:18 -08:00
Nick Lockwood
fa6bc1c3cd Fixed WebView example 2015-08-27 14:08:17 -08:00
Eric Vicenti
99bd57aef2 [ReactNative] Improve error handling with missing bridge callback
Summary:
This will throw an error message with the problematic callback module/method. Previously we would get an invariant in this case when we try to access `callback.apply` later in the method.
2015-08-27 11:02:58 -08:00
Andrei Coman
8ec1a180df [ReactNative][SyncDiff] Add more items to react-native target 2015-08-27 06:31:30 -08:00
Alex Kotliarskyi
c7b1509615 [react-native] Fix tests and re-enable CI 2015-08-26 20:58:24 -08:00
Alex Kotliarskyi
5b25f208c5 [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
Andy Street
a9115bcbb3 [ReactNative][SyncDiff] Add parameter to allow turning on/off off screen rendering for alpha compositing 2015-08-26 15:15:36 -08:00
Martin Konicek
590156a360 More updates from Wed 26 Aug 2015-08-26 18:52:03 +01:00
Andrei Coman
f2da308928 [ReactNative] Add unimplemented views for some components 2015-08-26 05:47:12 -08:00
Martin Konicek
5526533f51 Updates from Wed 26 Aug 2015-08-26 14:04:01 +01:00
Andrei Coman
a8f11d7115 [ReactNative] Add TouchableNativeFeedback to OSS 2015-08-26 01:31:52 -08:00
Andy Street
162d12cfa4 [ReactNative][SyncDiff] Allow renderToHardwareTextureAndroid to be used outside of setNativeProps 2015-08-25 16:55:51 -08:00
Andy Street
504fa60168 [ReactNative][SyncDiff] AutoSync 2015-08-25 14:54:10 -08:00
Martin Konicek
da7ac11c53 Updates from Tue 25 Aug 2015-08-25 19:21:59 +01:00
Alexey Lang
2d2252cd50 Use native initialAppState to init app_state for AppStateIOS. 2015-08-25 09:32:28 -08:00
Martin Konicek
5f8c0613fe [ReactNative] Temporarily disable flow in TabBarItemIOS 2015-08-25 07:16:35 -08:00
Nick Lockwood
65a3c07cfe Fixed tab bar icon scale
Summary:
TabBarItemIOS supports setting the scale for base64-encoded images using an optional scale parameter, however this was broken due to the JS code only passing the uri, not the whole source object, to the native side.

(See: https://github.com/facebook/react-native/issues/2413)
2015-08-25 05:26:14 -08:00
Tadeu Zagallo
fe0143eb20 [ReactNative] Update JS profiler to be compatible with Android
Summary:
Use nativeTraceBeginSection and nativeTraceEndSection with a more dynamic signature
to be compatible with Android.
2015-08-25 02:25:29 -08:00
Nick Lockwood
88e0bbc469 Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
Tim Yung
af8a6a44b2 RN: Expose React.unstable_batchedUpdates
Summary:
Per @spicyj in facebook/relay#127, this exposes `unstable_batchedUpdates` in React Native the same way it is exposed in `ReactDOM`.
2015-08-21 15:24:56 -08:00
Alex Kotliarskyi
8d07df4a22 [ReactNative] Unbreak debugger 2015-08-21 11:20:17 -07:00
Dorota Kapturkiewicz
f128269da7 [ReactNative] make radiobutton work with accessibility 2015-08-21 07:23:04 -07:00
Bill Fisher
debca6d24f [ReactNative] Pass events through to touchable handlers
Summary:
We want to be able to access the touch data within our components' event handlers, so we need to thread the event object all the way through to them.
2015-08-21 03:03:32 -07:00
Harrison Harnisch
46c6cde947 UI CPU and memory utilization graphs in Chrome debugging mode
Summary:
Chrome debugging UI is currently only showing connection state and logs in the console, leaving room for plenty of interesting information.

I've pushed the UI (using the same convention set by FPS -- UI/JS) CPU and memory utilization data over the debug Websocket and tapped into the existing stream of JS calls that get ran in V8.

The number of JS calls in a time interval is counted for all sub calls in a batch
https://github.com/hharnisc/react-native/blob/master/packager/debugger.html#L150

The last 5 batches of JS calls are displayed in a list format.

<img width="951" alt="screen shot 2015-07-19 at 7 34 00 pm" src="https://cloud.githubusercontent.com/assets/1388079/8769257/edc42f70-2e4d-11e5-8813-e86ef530a446.png">

Charts are created with [Chart.JS](https://github.com/nnnick/Chart.js) (MIT licensed).
Closes https://github.com/facebook/react-native/pull/2050
Github Author: Harrison Harnisch <hharnisc@gmail.com>
2015-08-21 02:11:45 -07:00
Eric Vicenti
6f17dba39b [ReactNative] Remove POPAnimation
Summary:
Thanks to @vjeux' work on Animated, we have transitioned away from POPAnimation entirely
2015-08-20 22:24:28 -07:00
Emily Janzer
4b28a847e6 [android] fix crash if breadcrumb refs don't exist 2015-08-20 19:08:16 -07:00
Andy Street
a0168a8c62 [ReactNative] [SyncDiff] Create new non-coalesceable event for when native should take the responder lock 2015-08-20 13:56:23 -07:00
Spencer Ahrens
5f91d404e1 [RN] Fix Animated tests 2015-08-20 10:28:49 -07:00
Dorota Kapturkiewicz
ed9b8c8b3b [ReactNative] Disable accessibility of RootView when dialog appears. Apply it for AdsManager. 2015-08-20 10:16:13 -07:00
Dorota Kapturkiewicz
b888e8db40 [ReactNative] make sending accessibility events from JS possible and fix dialog 2015-08-20 08:41:22 -07:00
Tadeu Zagallo
81fdf3e532 [ReactNative] Change RCTProfile API to be compatible with systrace 2015-08-20 00:47:23 -07:00
Christopher Chedeau
16ddb1962a [ReactNative] Remove warning for <Image source={require('./image.jpg')} />
Summary:
require('./image.jpg') returns a number and therefore the propType is wrong. Adding it to the propType to fix the warning and dealing with flow which is completely broken for this.
2015-08-19 22:53:25 -07:00
Spencer Ahrens
059e605e49 [RN] Mark some internal animated stuff as protected 2015-08-19 21:16:38 -07:00
Ben Alpert
0f3ea9fb8c [ReactNative] Fix switching to null event listener 2015-08-19 15:02:25 -07:00
Nick Lockwood
26c4be62c8 Fixed test flakiness due to a race condition with RCTRedBox
Summary:
The test runner relied on checking the current error message in the RCTRedbox, which is a singleton (yay, shared mutable state!). This lead to some tests that worked individually but failed when run together due to error messages in RCTRedBox left over from previous tests.

I've replaced the call to -[RCTRedBox currentErrorMessage] by injecting a custom logging function to intercept the errors at source, which is a much more reliable solution.
2015-08-19 03:41:31 -07:00
Krzysztof Magiera
67746fea2f [ReactNative] Use FbHttp for handling http requests from React Native. 2015-08-18 09:12:40 -07:00