62 Commits

Author SHA1 Message Date
Nick Lockwood
0b21df4a34 Improved logging and dev menu 2015-04-19 12:56:22 -08:00
Nick Lockwood
ead0f2e020 Implemented thread control for exported methods 2015-04-18 11:13:39 -08:00
Tadeu Zagallo
2b9aaac2ff [ReactNative] Guard against blocks being added to UIManager during dealloc 2015-04-18 06:36:25 -08:00
Tadeu Zagallo
1883ba535c [ReactNative] Send batched calls from objc to js every frame + add bridge profiling 2015-04-17 04:01:02 -08:00
Spencer Ahrens
915151c5d7 [ReactNative] verifyPropTypes against native exports 2015-04-16 18:15:36 -08:00
Spencer Ahrens
764854c04a [ReactNative] introduce requireNativeComponent 2015-04-16 17:12:12 -08:00
Tadeu Zagallo
50c9c616fb [ReactNative] Call invalidate when executor is deallocated 2015-04-16 08:45:42 -08:00
Nick Lockwood
0b505901ba Fixed map annotation crash 2015-04-16 04:29:35 -08:00
Tadeu Zagallo
75e4e124fa [ReactNative] Use a single DisplayLink held by the bridge 2015-04-15 07:07:48 -08:00
guru inamdar
7a68691686 MapView to support MKPointAnnotation using new attribute annotate in Map...
Summary:
### MapView to support Pin annotation

    var pinLocation = {
			latitude: property.latitude,
			longitude: property.longitude,
			title: property.title
    };
    this.state = {propertyPoint: pinLocation};
    <MapView style={styles.map} region={this.state.region} annotate={this.state.propertyPoint}>
    </MapView>
![mapview-pinannotation](https://cloud.githubusercontent.com/assets/845379/7100280/6c1ffc08-dfe5-11e4-9d1b-8da6a65da1bc.png)

Closes https://github.com/facebook/react-native/pull/810
Github Author: guru inamdar <guru.inamdar@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-14 18:03:37 -08:00
James Ide
e193a13ef7 [Bridge] RCT_REMAP_METHOD(js_name, selector)
Summary:
cc @a2 @nicklockwood

This diff introduces a new macro called `RCT_EXPORT_NAMED_METHOD`, which is like `RCT_EXPORT_METHOD` but lets you choose the name of the method in JS. This diff is backwards compatible with the `RCT_EXPORT_METHOD` and legacy `RCT_EXPORT` macros.

The entries in the data segment now contain `__func__`, the Obj-C selector signature, and the JS name. If the JS name is `NULL`, we take the legacy `RCT_EXPORT` code path. If the JS name is an empty string, we use the Obj-C selector's name up to the first colon (that is, the behavior of `RCT_EXPORT_METHOD`).

Since there are three values in each data segment entry, the macros now specify 1-byte alignment. Without the byte alignment, the compiler defaults to 2-byte alignment meaning that each entry takes up 4 bytes instead of 3. The extra byte isn't a concern but being explicit about the alignment should reduce compiler surprises.
Closes https://github.com/facebook/react-native/pull/802
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-14 12:55:19 -08:00
Alex Kotliarskyi
b8d44d3f36 [ReactNative] Fix logging 2015-04-13 12:51:20 -08:00
Scott Wolchok
db45ed4a53 [ipasize][ReactKit] Begin to ensmallen RCTConvert 2015-04-13 10:25:13 -08:00
Kevin Gozali
03a54c56f9 [ReactNative] Reverted D1986572 2015-04-13 09:43:26 -08:00
Tadeu Zagallo
f8beaa5dde [ReactNative] Make RCTRootView propage motions 2015-04-13 08:14:39 -08:00
Blair Vanderhoof
ac94a7fe77 Escape URL string before creating an NSURL
Summary:
If we make a request that contains a pipe character, URLWithString will return null.  This fix escapes these and other characters before creating the NSURL.
Closes https://github.com/facebook/react-native/pull/786
Github Author: Blair Vanderhoof <blairv@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-12 10:17:16 -08:00
Nick Lockwood
26fd24dc50 Cleanup 2015-04-11 14:19:49 -08:00
Alex Kotliarskyi
7cd732d0e7 [ReactNative] Pipe logs to server window 2015-04-10 12:09:10 -08:00
Tadeu Zagallo
f5f80da80c [ReactNative] Remove bridge retaining cycles 2015-04-10 07:20:37 -08:00
Mike Driver
b1850f8fca Implemented response headers when using XMLHttpRequest
Summary:
I think perhaps these were left out by mistake?
Closes https://github.com/facebook/react-native/pull/382
Github Author: Mike Driver <mikedriver@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-09 19:31:57 -08:00
Spencer Ahrens
89f5ff4d04 [ReactNative] Fix suggestions in TextInput when setting value prop 2015-04-09 17:35:39 -08:00
Bryce Redd
c29c595126 Added random js queue+execution time sampling in react native 2015-04-09 17:04:26 -08:00
Alex Kotliarskyi
bbddd0262d [ReactNative] Bring back crash reporting 2015-04-09 10:44:26 -08:00
Kureev Alexey
50309c984d NavigatorIOS navigationBarHidden property support
Summary:
Usage example:
```javascript
var AwesomeProject = React.createClass({
  render: function() {
    return (
      <NavigatorIOS
        style={styles.navigator}
        navigationBarHidden={true}
        initialRoute={{
          component: Example,
          title: 'Test'
        }}
      />
    );
  }
});
```
Closes https://github.com/facebook/react-native/pull/374
Github Author: Kureev Alexey <kureev-mail@ya.ru>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-09 08:46:14 -08:00
James Ide
20d95ed129 [Scroll] Include content insets in scroll events
Summary:
When calculating how far the user has scrolled, it is necessary to know the content insets where:

    number of pixels scrolled = content offset + leading content inset for the scroll axis

This diff adds the contentInset field to native scroll events.
Closes https://github.com/facebook/react-native/pull/737
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-09 08:45:58 -08:00
Spencer Ahrens
4a781dd8f2 [ReactNative] fix exception handler method name 2015-04-08 21:13:50 -08:00
Kevin Gozali
e5aeb31d6f [ReactNative] <Text>: apply the fontWeight correctly if fontFamily style is also present 2015-04-08 19:52:11 -08:00
Alex Akers
8a57c4e980 [React Native] RCT_EXPORT lvl.2 2015-04-08 08:34:10 -08:00
Nick Lockwood
bf4868edda Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
Spencer Ahrens
a1ec752019 [ReactNative] Do flow check when running packager 2015-04-07 21:40:05 -08:00
Ben Hiller
220e116dce [fbobjc] revert rFBOBJCdba3daf9a595f452d069f2a74a9a11f251999b2e 2015-04-07 20:44:11 -08:00
Tadeu Zagallo
6854da9b86 [ReactNative] Remove bridge retaining cycles 2015-04-07 19:42:46 -08:00
Tadeu Zagallo
72390239be [ReactNative] Fix and re-add WebView executor 2015-04-07 18:25:38 -08:00
Nick Lockwood
60a6533422 Removed redundant views and shadow views 2015-04-07 14:08:03 -08:00
Nick Lockwood
80cd687e95 Refactored RCTLog and added facility to prepend extra data to the log message 2015-04-07 07:35:57 -08:00
Kevin Gozali
e14b5a13c1 [ReactNative] wrong deprecated prop check in RCTConvert 2015-04-06 14:01:12 -08:00
Christopher Chedeau
df851b38fc [ReactNative] Workaround double cmd+r bug 2015-04-02 16:44:04 -08:00
Tadeu Zagallo
9df3e889ad [ReactNative] Fix script load from local files 2015-04-02 15:57:01 -08:00
Christopher Chedeau
4d44d9cca2 [ReactNative] Cleanup TabBar and its example 2015-04-02 13:51:59 -08:00
Tadeu Zagallo
5be7fae286 [ReactNative] Allow recover from debugger error 2015-04-02 13:43:09 -08:00
Sumeet Vaidya
36098a8b0d Fixed tap-to-zoom in Groups photo viewer 2015-04-02 10:42:22 -08:00
Boopathi Rajaa
087c609121 Fix hitTest for auto
Summary:
- Returns matching subview hitTest or super hitTest if no match found. Should fix #99 .

Closes https://github.com/facebook/react-native/pull/501
Github Author: Boopathi Rajaa <me@boopathi.in>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-02 09:30:29 -08:00
Tadeu Zagallo
f370f9cbc4 [ReactNative] Unfork RKRootView 2015-04-02 07:12:42 -08:00
laiso
e35521300a (Xcode) Set indent=2 in all xcodeproj files.
Summary:
These are default settings now.
I saw my Xcode be configured indent=4.

![2015-03-30 12 16 11 pm](https://cloud.githubusercontent.com/assets/39830/6889697/98f8b930-d6d6-11e4-81c8-d2146855d127.png)

Closes https://github.com/facebook/react-native/pull/472
Github Author: laiso <laiso@lai.so>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-01 17:14:45 -08:00
Colin Ramsay
4838d5921f Add support for web-style data-uris
Summary:
This implements base64-encoded data-uris for the Image component.
Closes https://github.com/facebook/react-native/pull/576
Github Author: Colin Ramsay <colinramsay@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-01 10:01:37 -08:00
Justin Carmony
b6503ba431 Packager status page & build validating against it.
Summary:
Creating a packager status page so React can validate a proper packager instance is running on 8081.

See #257 for details on this bug.

The biggest thing in this PR is I have it perform an exit 2 in the build script if the check fails. This will cause the build to fail, they can click on the error and see a nice message. Not sure if there is a way to throw a warning instead.

Also, I broke the bash script into several lines, in the Xcode editor it looks fine but in the source code it looks less than ideal. We might want to break that out into it's own bash script that is called. Let me know if you want to do that.
Closes https://github.com/facebook/react-native/pull/308
Github Author: Justin Carmony <justin@justincarmony.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-31 23:01:04 -08:00
Arthur Lee
2d42c9eb4a [ReactNative] Added support for 3 digit hex colors | Arthur Lee
Summary:
This addition adds a check for whether a hex color is 3 or 6 digits. If it is 3 digits, it will expand the short form into 6 digits, just like in CSS. The additional benefit of having the length check is that hex colors of invalid lengths (like 4 digits) will be considered invalid. In CSS, invalid length hex colors returns white, but here I have logged an error through `RCTLogError`.
Closes https://github.com/facebook/react-native/pull/455
Github Author: Arthur Lee <arthur@arthurlee.me>

Test Plan: Tried a couple of colors in the sample app, like `#FACEB0`, `#F00`, etc.
2015-03-31 20:05:14 -08:00
Kevin Gozali
bb9c647c2b [ReactNative] RCTView's shadowOffset is of float type, not CGFloat 2015-03-31 17:18:20 -08:00
Jordanna Kwok
6870c27283 Fix WebView automaticallyAdjustContentInsets error
Summary:
WebView component's automaticallyAdjustContentInsets prop should be type BOOL. Fixes #251.
Closes https://github.com/facebook/react-native/pull/314
Github Author: Jordanna Kwok <jordannakwok@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-31 17:17:49 -08:00
Charlie Cheever
774442efd2 Adding scrollWithoutAnimationTo method for ScrollViews
Summary:
Implementing the consensus approach from the comments on
this PR:
https://github.com/facebook/react-native/pull/486

We use a boolean flag in the Obj-C code to determine whether
to animate or not, and then provide two public JS functions
that call the Obj-C with or without the flag.
Closes https://github.com/facebook/react-native/pull/509
Github Author: Charlie Cheever <ccheever@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-31 16:11:40 -08:00