Commit Graph

1456 Commits

Author SHA1 Message Date
Andy Street c6670658f4 [react_native] JS files from D2087892: [react_native] Implement setInterval in JS 2015-05-21 04:24:04 -08:00
Hedger Wang b46c94aaf9 Unbreak RN JS server for Android. 2015-05-20 18:38:34 -08:00
Tadeu Zagallo 08844e3ddc [ReactNative] Add fps monitor
Summary:
@public

Add basic JS and UI thread FPS monitor

Test Plan: Launch the UIExplorer, open the Dev Menu with cmd+D, and select `Show FPS Monitor`
2015-05-20 18:26:36 -08:00
Joe Savona 1d5d01c3c9 InteractionManager: DEV warning for possibly unclosed handles 2015-05-20 16:54:03 -08:00
Amjad Masad 9a76f224af [react-packager] Add first class support to popular image formats
Summary:
@public
1. Default to first class support of popular image formats
2. Add tests to make sure we support other than png

Test Plan:
1. ./runJestTests.sh
2. Add test.png and test.jpg images in the Playground app dir
3. require both images and render then in the playground app
4. they render
2015-05-20 15:28:29 -08:00
Amjad Masad 8bb65215b1 [react-packager] Implement getJSModulePaths API 2015-05-20 13:38:46 -08:00
Nick Lockwood 0d227c0eb2 Eliminated redundant border drawing 2015-05-20 12:19:24 -08:00
Alex Kotliarskyi 1b2975803b [ReactNative] Cleanup _build_bundle script 2015-05-20 10:31:28 -08:00
Georgiy Kassabli d211359aeb Added ability to set custom accessibility tap handler to React Native 2015-05-20 08:32:15 -08:00
Spencer Ahrens 32666f0aa2 [ReactNative] Add AppEventsTest 2015-05-20 00:31:50 -08:00
Eric Vicenti c1609bcab8 [ReactNative] Navigator fix for sceneStyle
Summary:
Fixes https://github.com/facebook/react-native/issues/1332

When the absolute left position is not set to zero on a provided sceneStyle, scene enabling is broken and no scene will be visible when it is pushed. This was broken recently when the scene disabling was modified to push the scenes offscreen.

Closes https://github.com/facebook/react-native/pull/1347
Github Author: Eric Vicenti <evv@fb.com>

@public

Test Plan:  Tested when pushing a scene Navigator in the UIExplorer example while sceneStyle is set on the Navigator
2015-05-19 18:54:15 -08:00
Eric Vicenti 97137e8bcc [ReactNative] Navigator clean scenes popped with gesture
Summary:
Fixes https://github.com/facebook/react-native/issues/1252

Scenes dismissed/popped via a gesture were not being removed. This is probably a regression from an earlier refactor.

Test plan: log statements after scene focusing now reports that `navigator.getCurrentRoutes().length` lowers after gesture. Tested on UIExplorer Navigator example
Closes https://github.com/facebook/react-native/pull/1346
Github Author: Eric Vicenti <evv@fb.com>

@public

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-19 18:45:42 -08:00
Spencer Ahrens 11b515b1b0 [ReactNative] clean lint in all of Libraries/ 2015-05-19 13:47:04 -08:00
Alex Akers a4f92ba3db [React Native] Add magic tap accessibility gesture 2015-05-19 06:28:01 -08:00
Spencer Ahrens 1c70f33511 [ReactNative] clean lint for Libraries/Components 2015-05-18 15:54:07 -08:00
Premasagar Rose 33ac55b2bd Fix typo in image documentation
Summary:
Closes https://github.com/facebook/react-native/pull/970
Github Author: Premasagar Rose <p@dharmafly.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-18 13:01:20 -08:00
Luke de27f1db54 fix exception when ES6 class with no propTypes defined before calling requireNativeComponent
Summary:
Closes https://github.com/facebook/react-native/pull/1260
Github Author: Luke <kejinlu@gmail.com>

Test Plan: Created `class Foo extends React.Component` and made sure error messages were good.
2015-05-18 11:47:42 -08:00
Andrei Coman 03905e69f4 [react_native] JS files from D2079609: [react_native] Use email type for login field 2015-05-18 07:36:39 -08:00
Georgiy Kassabli 6ef7eaf663 Added accessibility traits support to View class 2015-05-18 07:30:29 -08:00
Tadeu Zagallo eedb880f6e [ReactNative] Bump package.json version to 0.4.4 2015-05-17 19:05:14 -08:00
Tadeu Zagallo a4e89d71a3 [ReactNative] Fix RCTBatchedBridge main thread invalidation
Summary:
D2052669 introduced a block for objects that had to be invalidated on the main
thread, but after the JS thread objects, but the block was being dispatched on
the JS thread.

@public

Test Plan:
I added `RCTAssertMainThread()` to the `mainThreadInvalidate` block, it was
crashing on reload, but now it should work as expected.
2015-05-17 18:27:20 -08:00
Amjad Masad 407d8d4cf6 [react-native] Update jest to get perf bugfix 2015-05-17 02:51:35 -08:00
Dmitry Soshnikov 545edba913 [jest] Update to v0.4.4 2015-05-17 00:20:42 -08:00
James Ide 08d30e751b [ActivityIndicator] Add the onLayout prop to the outer container view
Summary:
ActivityIndicator was forwarding all of its props except `style` to the inner native view. This meant that onLayout would report a zero-sized frame that was relative to the wrapper view instead of the parent of the ActivityIndicator.

This diff adds `onLayout` to the wrapper view instead of the native view.

In general, all components that forward props need to be audited in this manner.

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

Test Plan: `<ActivityIndicator onLayout={...} />` reports the size of the spinner plus a position relative to its parent view.
2015-05-15 18:08:32 -08:00
Brent Vatne c668fd5be0 [ReactNative] Add "RCTNativeAppEventEmitter"
Summary:
As mentioned in #906, [in the docs it mentions sending native app events](http://facebook.github.io/react-native/docs/nativemodulesios.html#sending-events-to-javascript) eg: calendar event reminder received, through the `RCTNativeAppEventEmitter`, but the JS module for that is missing. This adds it - it's nothing more than an instance of `EventEmitter`, just like [RCTDeviceEventEmitter](https://github.com/facebook/react-native/blob/master/Libraries/Device/RCTDeviceEventEmitter.js).
Closes https://github.com/facebook/react-native/pull/918
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-15 16:57:18 -08:00
James Ide 5f841a950e [Setup] Remove AdSupport from the list of libraries linked by default
Summary:
Many apps don't need AdSupport, especially not when people are making a sample app to learn React. Apps that do want it can link it in like any other library.

Fixes #1303, see the discussion there.
Closes https://github.com/facebook/react-native/pull/1305
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-15 15:53:23 -08:00
Amjad Masad 64c0bb0bd4 [react-native] Fix source map issue with virtual modules 2015-05-15 15:49:11 -08:00
Christopher Chedeau 723e988416 [ReactNative] Redbox if JSC syntax errors 2015-05-15 15:33:17 -08:00
Amjad Masad d9b7e63e47 [react-native] Use trailing commas transform
Summary:
@public
Apparently trailing commas transform isn't exported by react-tools. We need to pull it out manually. This is not so clean but we're swtching to babel very shortly.

Test Plan:
* npm start
* write `foo(a,b,c,)` in some file
* request that file in the browser and make sure that trailing comma is gone
2015-05-15 14:11:55 -08:00
Zhao Han 40da7bb835 Add more documentation in ListViewDataSource
Summary:
ListViewDataSource's default data extractor can actually expect another data form:

`{ sectionID_1: [ <rowData1>, <rowData2>, ... ], ... }`
Closes https://github.com/facebook/react-native/pull/1285
Github Author: Zhao Han <cx.chenghai+github@gmail.com>

Test Plan: Changed the ListViewExample to make sure all three formats work.
2015-05-15 13:47:43 -08:00
James Ide d72045932e [TextInput] Add `onLayout` to TextInput, forwarding it to the native views
Summary:
`TextInput` does not automatically forward all props using the spread operator so we need to explicitly forward the `onLayout` prop.

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

Test Plan:
 Mount a TextInput component with an `onLayout` prop and see that the callback handler is invoked with the TextInput's frame.
2015-05-15 11:52:23 -08:00
Nick Lockwood d27e6fa7f8 Fixed RCTWebSocket and chrome debugging in OSS 2015-05-15 11:37:07 -08:00
Christopher Chedeau 2d9990ca2a [ReactNative] Better error message when passing an Animated to a View 2015-05-15 11:01:46 -08:00
Spencer Ahrens 4771806c44 [ReactNative] Fix some mount callback issues 2015-05-15 10:59:09 -08:00
James Ide 2497c02e38 [RCTBridge] Have RCTBridge.loading return RCTBatchedBridge.loading
Summary:
The parent RCTBridge no longer tracks the JS loading since that has been handed off to the RCTBatchedBridge. To make the `loading` property accurate again, just expose the batch bridge's loading property from the parent bridge (note: I didn't make it KVO-compliant).

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

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-14 16:00:18 -08:00
Tadeu Zagallo e467fb7202 [ReactNative] Add console.profile hooks to systrace
Summary:
Add console.profile sync hooks compliant with the chrome API
https://developer.chrome.com/devtools/docs/console-api#consoleprofilelabel

@public

Test Plan:
Add a `console.profile()` and a `console.profileEnd()` in the JavaScript,
and record a systrace-like profile via DevMenu
2015-05-14 15:59:20 -08:00
Tadeu Zagallo 22fb03d7e0 [ReactNative] Fix UIExplorer missing reference to RCTWebSocket 2015-05-14 14:18:13 -08:00
Tadeu Zagallo 9c8e085677 [ReactNative] Fix Movies and SampleApp missing reference to RCTWebSocket 2015-05-14 14:15:23 -08:00
Georgiy Kassabli d2f79d835d Fixing misprint in RCText.m 2015-05-14 13:02:47 -08:00
Nick Lockwood 7c3070628a Fixed infinite #clowntown error loop 2015-05-14 12:19:15 -08:00
Christopher Chedeau 766983f69b [react native] Bump jest-cli version to 0.4.3 in RN packages 2015-05-14 10:32:44 -08:00
Yuta Okazaki 75ed1dd49e Fix typo of function name in ListView documentation
Summary:
When I read documents, I usually 'search within page' to see where they talk about specific things.
So I found this fix to be pretty useful. Hope it'll be merged!
Closes https://github.com/facebook/react-native/pull/1146
Github Author: Yuta Okazaki <s04155yo@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-14 09:52:19 -08:00
James Ide 4e412381f2 [TextView] Define missing properties and add getters
Summary:
Some of the RCTTextView properties weren't set up correctly which would cause bugs when you'd set a property and then unset it, trying to revert to the default. This requires reading the default value from the dummy view instance, but some of these properties didn't have getters which was causing issues.

Fixes #1174

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

Test Plan:  Create a `<TextInput multiline={true}>` component. Give it a style with `color: 'blue'`, and then on the next render pass remove the style. No more red box.
2015-05-14 09:45:12 -08:00
Alex Akers e9db0338d2 [React Native] Enable accessibility on RCTText 2015-05-14 09:41:21 -08:00
Eric Sauter 711dd6602e Fix lint errors and warnings
Summary:
Fix the following problems resulting from running `npm run lint`:

```
Examples/Movies/SearchScreen.js
  118:4  error  'fetch' is not defined  no-undef
  177:4  error  'fetch' is not defined  no-undef

Examples/UIExplorer/MapViewExample.js
  32:1  warning  Missing semicolon  semi

Examples/UIExplorer/NavigatorIOSColorsExample.js
  48:26  warning  ['lightContent'] is better written in dot notation  dot-notation

Examples/UIExplorer/TabBarIOSExample.js
  81:16  warning  Trailing spaces not allowed  no-trailing-spaces

Examples/UIExplorer/TextInputExample.js
  390:7  warning  Missing semicolon  semi

✖ 6 problems
```
Closes https://github.com/facebook/react-native/pull/1254
Github Author: Eric Sauter <esauter@lgscout.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-14 09:39:52 -08:00
Harrison Harnisch babdc21614 WebSocket polyfill
Summary:
- Added as a library in /Libraries/WebSocket
- Drag and drop to add to project (similar to adding Geolocation polyfill)
- Exposed as `window.WebSocket` which conforms with https://developer.mozilla.org/en-US/docs/Web/API/WebSocket specs
Closes https://github.com/facebook/react-native/pull/890
Github Author: Harrison Harnisch <hharnisc@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-14 09:37:02 -08:00
James Ide 55e280d200 [UIExplorer] Fix app icon so it actually shows up on the home screen
Summary:
Generated icons of the proper sizes so they show up on the home screen. It's not beautiful since the images have a transparent background but this also makes build warnings go away.

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

Test Plan:  Run app, see icon on simulator home screen
2015-05-14 09:16:15 -08:00
Dave Sibiski f865da26ba [NavigatorIOS] Fixes #1268 - Bug causing the leftButtonIcon to not appear
Summary:
Closes https://github.com/facebook/react-native/pull/1269
Github Author: Dave Sibiski <dsibiski@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-14 09:01:57 -08:00
James Ide b1c93bb9fc [Haste] @provides -> @providesModule StaticRenderer
Summary:
Pretty sure this shouldn't be @provides
Closes https://github.com/facebook/react-native/pull/837
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-14 08:42:13 -08:00
Martin Konicek 661321fda7 [ReactNative] Remove ReactNativeComponentMixin 2015-05-14 08:17:20 -08:00