1495 Commits

Author SHA1 Message Date
Will Anderson
d3119a8fb1 Fix typo in LinkingLibraries.md
s/insed/inside
2015-05-07 15:05:28 -07:00
Brent Vatne
7141948a05 Bump fetch and add exports/globals for Headers, Request and Response
Summary:
Now on fetch 0.8.1, the latest tagged release. Previous version used was 0.7.0. See #1162 cc @vjeux @jtremback
Closes https://github.com/facebook/react-native/pull/1192
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: I arc patched and ran movies demo and storyline, they work fine
2015-05-07 13:24:16 -08:00
Spencer Ahrens
1ef4e00fba [ReactNative] Introduce onLayout events
Summary:
Simply add an `onLayout` callback to a native view component, and the callback
will be invoked with the current layout information when the view is mounted and
whenever the layout changes.

The only limitation is that scroll position and other stuff the layout system
isn't aware of is not taken into account.  This is because onLayout events
wouldn't be triggered for these changes and if they are desired they should be
tracked separately (e.g. with `onScroll`) and combined.

Also fixes some bugs with LayoutAnimation callbacks.

@public

Test Plan:
- Run new LayoutEventsExample in UIExplorer and see it work correctly.
- New integration test passes internally (IntegrationTest project seems busted).
- New jest test case passes.

{F22318433}

```
2015-05-06 15:45:05.848 [info][tid:com.facebook.React.JavaScript] "Running application "UIExplorerApp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF"
2015-05-06 15:45:05.881 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":123,"x":12.5,"width":140.5,"height":18}}
2015-05-06 15:45:05.882 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":122,"width":50,"height":50}}
2015-05-06 15:45:05.883 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":70.5,"x":20,"width":294,"height":204}}
2015-05-06 15:45:05.897 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":206.5,"x":12.5,"width":140.5,"height":18}}
2015-05-06 15:45:05.897 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":70.5,"x":20,"width":294,"height":287.5}}
2015-05-06 15:45:09.847 [info][tid:com.facebook.React.JavaScript] "layout animation done."
2015-05-06 15:45:09.847 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":82,"width":50,"height":50}}
2015-05-06 15:45:09.848 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":110.5,"x":60,"width":214,"height":287.5}}
2015-05-06 15:45:09.862 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":206.5,"x":12.5,"width":120,"height":68}}
2015-05-06 15:45:09.863 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":55,"width":50,"height":50}}
2015-05-06 15:45:09.863 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":128,"x":60,"width":160,"height":337.5}}
```
2015-05-07 12:27:44 -08:00
Brent Vatne
731d4a0610 Remove the deprecated transform propTypes 2015-05-07 12:50:41 -07:00
Christopher Chedeau
2f975516cf Merge pull request #1181 from brentvatne/transform-props-fix
Clarify transform for ViewStyleProps, include children in union prop docs
2015-05-07 12:21:43 -07:00
Brent Vatne
b8ca4e450b Add TransformPropTypes to docs 2015-05-07 12:16:48 -07:00
Brent Vatne
1c90a2dbcc Move updated propTypes into new TransformPropTypes 2015-05-07 12:14:15 -07:00
Brent Vatne
0bccc33dff Change rotation to rotate 2015-05-07 11:56:42 -07:00
Brent Vatne
42d4de9ce0 Remove unnecessary newline 2015-05-07 11:56:42 -07:00
Brent Vatne
f878be84e6 Clarify transform for ViewStyleProps, generate union docs properly 2015-05-07 11:56:42 -07:00
Siddharth Agarwal
f251b0ddb8 [react] fix line endings 2015-05-07 10:08:12 -08:00
Tadeu Zagallo
6b38fad219 [ReactNative] Fix ref to eventDispatcher on RCTBridge 2015-05-07 09:05:29 -08:00
James Ide
b97ce93cea [Nav] Add support for bar button icons and left buttons
Summary:
NavigatorIOS supports four new properties:

  - **rightButtonImageSource:** The source of an image to display in the top right. This must be a static image since UINavigationController only supports UIImages. Adding support for UIImageViews (or arbitrary views) is more complicated because custom views do not fade on touch and do not have hit slop the same way that UIImage buttons do. Usage: `rightButtonImageSource: ix('ImageName')`
  - **backButtonImageSource:** Use a custom image for the back button. This does not replace the back caret (`<`) but instead replaces the text next to it.
  - **leftButtonTitle**: Text for the left nav button, which supersedes the previous nav item's back button when specified. The main use case for this is your initial screen/UIVC which has nothing to go back to (since it is the first VC on the stack) but need to display a left button. This does hide the back button if there would have been one otherwise.
  - **leftButtonImageSource:** Image source for the left button, super
Closes https://github.com/facebook/react-native/pull/263
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-07 08:03:21 -08:00
James Ide
b8bf4d0957 [Loader] Post a notification when the JS fails to load
Summary:
This provides a way to get notified when a bridge fails to load JS, allowing apps to handle the error.

Closes https://github.com/facebook/react-native/pull/1085
Github Author: James Ide <ide@jameside.com>

Test Plan: run the UIExplorer app with the packager server not running, and verify that the notification is posted.
2015-05-07 04:26:24 -08:00
Nick Lockwood
205c22b915 Fixed dev menu loop 2015-05-07 03:55:43 -08:00
Brent Vatne
f05494c96f Fix scrollview doc type - canimprove -> can improve
Summary:
Simple one character change - add a missing space
Closes https://github.com/facebook/react-native/pull/1112
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-06 21:19:25 -08:00
Tadeu Zagallo
e5b9eb5900 Merge pull request #1129 from umhan35/make-website-github-header-link-use-HTTPs
Update website header link github url: use HTTPS
2015-05-07 03:59:09 +01:00
Tadeu Zagallo
6899676bea Merge pull request #665 from yangguang2009/bugfix 2015-05-07 03:39:04 +01:00
Tadeu Zagallo
8d1fcfd615 Merge pull request #1112 from brentvatne/fix-scrollview-doc-typo
Fix scrollview doc type - canimprove -> can improve
2015-05-07 02:57:44 +01:00
Brent Vatne
0b844feedb [TouchableOpacity] Reset opacity to the inactiveValue rather than always 1.0
Summary:
As per #941 - fixes bug with `TouchabeOpacity` always reseting child opacity to `1.0` after press.

A note about the code: we could probably use a general `getNativeProp(propName, callback)` function rather than `getOpacity` but just used that as it was simpler for this specific PR, perhaps that refactor could be left to another - or maybe there is a way to do this already that I missed.

Before:
![bug](https://cloud.githubusercontent.com/assets/90494/7287207/52d6a686-e907-11e4-8e16-04b2ddd0582c.gif)

After:
![after](https://cloud.githubusercontent.com/assets/90494/7287689/5aca4776-e90c-11e4-8c40-aa6bd3e822d8.gif)

Example code:
```javascript
'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TouchableOpacity,
} = React;

var TestIt = React.createClass({
  render() {
    return (
      <View style={styles.container}>
        <TouchableOpacity activeOpacity={0.3}>
          <View style={styles.searchButton}>
            <Text>
Closes https://github.com/facebook/react-native/pull/977
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-06 17:27:12 -08:00
Nick Lockwood
47164baaec Fixed redbox error loop when camera access is disabled 2015-05-06 17:21:10 -08:00
Tadeu Zagallo
8d83b7ff63 [ReactNative] RCTWebViewExecutor - Fix string containing script tag support 2015-05-06 17:08:33 -08:00
Alexander Kotliarskyi
07937620c0 Merge pull request #1184 from frantic/sync-2015-05-06
Updates from Wed 6 May
2015-05-06 18:01:01 -07:00
Alex Kotliarskyi
d3c0029cef [ReactNative] Do not throw when Image.source is null 2015-05-06 16:16:49 -08:00
Alex Kotliarskyi
cad5cdef42 Updates from Wed 6 May 2015-05-06 16:08:10 -07:00
Alex Kotliarskyi
ee449301b6 [ReactNative] Fail faster in OSS tests 2015-05-06 14:28:30 -08:00
Peter Zich
d177a45bdc [ReactNative] Pull transform properties out into TransformPropTypes 2015-05-06 14:24:10 -08:00
Alexander Kotliarskyi
4eece85b6b Merge pull request #1165 from frantic/sync-2015-05-05
Sync updates from May 5th, 2015
2015-05-06 13:44:35 -07:00
Eric Vicenti
40e3f6ea8c [ReactNative] Navigator initialRoute default change
Summary:
The default initialRoute was the first route, but it makes more sense for the default initialRoute to be the last route in the initialRouteStack.

Updated the docs to reflect that.

@public

Test Plan: Updated call sites and checked that they work. Not many places use initialRouteStack yet.
2015-05-06 11:18:55 -08:00
Nick Lockwood
790cee6e26 Fixed broken listview header alignment 2015-05-06 10:48:24 -08:00
Alex Kotliarskyi
8c95de11e1 [ReactNative] Re-record OSS snapshot tests 2015-05-06 09:54:17 -08:00
Alex Kotliarskyi
735f67337a [ReactNative] Fail faster in OSS tests 2015-05-06 09:33:20 -07:00
Alex Kotliarskyi
286e1b0ae9 [ReactNative] Re-record OSS snapshot tests 2015-05-06 09:31:39 -07:00
Christopher Chedeau
4a9e1b6de6 Merge pull request #1177 from qmoya/patch-1
Fix grammatical error
2015-05-06 09:20:53 -07:00
Tadeu Zagallo
ea470408e2 [ReactNative] Allow JSON fragments on RCTJSONStringify 2015-05-06 05:44:40 -08:00
Quico Moya
c88b1d2c88 Fix grammatical error 2015-05-06 12:29:25 +02:00
Nick Lockwood
88a83084e4 Fixed UIExplorer in Catalyst shell 2015-05-06 00:08:08 -08:00
Brent Vatne
77a3190606 [Docs] Remove deprecated styleProps
- rotation, scaleX/Y, translateX/Y all belong under transform from
  ViewStylePropTypes
2015-05-05 19:36:23 -07:00
Nick Lockwood
54974d6333 +[RCTConvert UIFont:] tests 2015-05-05 17:37:59 -08:00
Amjad Masad
7362f11c22 [react-packager] Use gracful-fs to avoid EMFILE errors
Summary:
@public
Currently, every time we call into the packager we have to change the ulimit to make sure
we don't hit the EMFILE error (the packager uses as much concurrency as possible).

Using graceful-fs, the fs module -- with monkey patching -- becomes intelligent enough to recover
from EMFILE errors.

Test Plan:
* set `ulimit -n 256*
* start server
* request from your browser: http://localhost:8081/RKJSModules/MainBundle/CatalystBundle.includeRequire.bundle
* it works
2015-05-05 14:30:43 -08:00
Eric Vicenti
86cfcbc77e [ReactNative] Navigator fix opacity reset for presented scene
Summary:
jumpN will call enableScene for the dest scene, which makes sure the scene can be made visible, but we need to avoid resetting the opacity for it when it is already the presented scene. There is already a check to make sure we don't reset opacity for the transitioningFrom scene.

@public

Test Plan: Fixes the issue on Android device when jumping to a scene that is already presented
2015-05-05 14:30:29 -08:00
Evgen Filatov
57348a4028 Fixed name of Chome window, Connects to #297
Summary:
Hi!

I have the same problem as described here https://github.com/facebook/react-native/issues/297
It could occurs after restarting `packager.sh` or `debuger-ui` page.

I found simple solution that works for me, but I am not 100% sure it will works for any user with this problem.

How could this be tested automatically?
Closes https://github.com/facebook/react-native/pull/1101
Github Author: Evgen Filatov <evgen.filatov@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-05 14:10:13 -08:00
Ryan Pastorelle
8a74a9f7c3 Force responseHeaders to lower case to respect case-insensitivity
Summary:
`XMLHttpRequest.getResponseHeader` is case-insensitive, therefor the React-Native implementation needs to mimic this behavior as to not break libraries that are dependent on this.

There is a corresponding issue in `superagent` but this is the root cause (https://github.com/visionmedia/superagent/issues/636).
Closes https://github.com/facebook/react-native/pull/1138
Github Author: Ryan Pastorelle <rpastorelle@yahoo.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-05 14:09:40 -08:00
Alex Kotliarskyi
5df5602f1a Updates from Tue 5 May 2015-05-05 14:15:51 -07:00
Amjad Masad
bd591505f1 [react-packager] update sane 2015-05-05 10:37:59 -08:00
Amjad Masad
79e33502fc [react-packager] check in graceful-fs 2015-05-05 10:30:28 -08:00
Iragne
88715e5c93 Update RCTNavigator.m
Summary:
Related to this issue
I created the PR.
Feel free to talk about it.

https://github.com/facebook/react-native/issues/65#issuecomment-93240332

Thanks
Closes https://github.com/facebook/react-native/pull/1131
Github Author: Iragne <adelskott@gmail.com>

Test Plan: Open NavigatorIOS example in UIExplorer, push recurse navigation several times. Press back and observe that it no longer breaks.
2015-05-05 08:32:14 -08:00
Tadeu Zagallo
3ab4d32538 [ReactNative] Fix DevMenu crash when launching the app with WebView executor 2015-05-05 07:30:55 -08:00
Alex Akers
08246b77df [React Native] Fix immediate animation crash 2015-05-05 07:21:43 -08:00
jmstout
929b2999c4 Fix a bug in the Navigator's gesture.edgeHitWidth implementation
Summary:
Should resolve #1081

cc @ericvicenti
Closes https://github.com/facebook/react-native/pull/1082
Github Author: jmstout <git@jmstout.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Revert Plan: This seems legit, but I'm not qualified to review.
2015-05-05 06:26:51 -08:00