Commit Graph

1570 Commits

Author SHA1 Message Date
Christopher Chedeau b5de997166 Updates from Fri 15 May 2015-05-15 15:23:28 -07: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
Christopher Chedeau e33fef8e42 Merge pull request #405 from JoeStanton/new-library-cmd
[CLI] New Library Generator
2015-05-15 10:58:40 -07:00
Joe Stanton 857c30b502 Stylistic cleanup 2015-05-15 17:08:21 +01:00
Joe Stanton 243ef68199 Update search paths to reflect new project structure 2015-05-15 14:10:06 +01:00
Joe Stanton ea8447e1c5 Upgrade sample to the new macros 2015-05-15 13:59:46 +01:00
Joe Stanton 0312c30a73 Duplicate the name validation for now 2015-05-15 09:21:38 +01:00
Joe Stanton 396439bf86 Added react-native new-library command 2015-05-15 09:17:27 +01:00
James Ide 80814f643f Merge pull request #1289 from umhan35/patch-4
Add SegmentedControlIOS documentation to website
2015-05-14 20:35:16 -07:00
Zhao Han 1c05aff424 Add SegmentedControlIOS documentation to website 2015-05-14 22:22:31 -05: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
Christopher Chedeau aa439b7e39 Merge pull request #1286 from hansonw/master
Fix jsdocs for multi-line ES6-style methods
2015-05-14 16:51:17 -07:00
Christopher Chedeau 623eb05bf6 0.4.3 2015-05-14 16:44:16 -07:00
Christopher Chedeau d2eaa51509 0.4.2 2015-05-14 16:42:26 -07:00
hansonw 97aad167a6 Fix jsdocs for multi-line ES6-style methods
Summary:
The function definition and body can be in different places for multi-line declarations, so the docblock might not get pulled in. None of the existing docs seem to be affected, but putting up the fix for posterity.

Test Plan:
I modified `AlertIOS.alert` (in Libraries/Utilties/AlertIOS.js) to actually have a docblock, and ran `website/publish.sh` (with the push bit commented out). The added doc doesn't get picked up with the current code, but it does with the fix.
2015-05-14 16:34:55 -07:00
Christopher Chedeau 1f8b97aeff Merge pull request #1283 from vjeux/Updates_Thu_14_May_3
Updates Thu 14 May
2015-05-14 15:39:25 -07:00
Christopher Chedeau da1aa962e2 Updates from Thu 14 May 2015-05-14 15:21:03 -07: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 b2d1d6f3e9 Merge pull request #440 from JoeStanton/init-to-nodejs
[CLI] Remove dependency on Ruby
2015-05-14 12:21:30 -07:00
Joe Stanton 04832e5aa4 Fixed stylistic issues 2015-05-14 20:19:29 +01: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
Joe Stanton 29325d7cb3 Move init into local-cli 2015-05-14 18:08:56 +01: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
Joe Stanton 9caee3248b Linked with new local-cli, refactored 2015-05-14 16:11:05 +01:00
Joe Stanton 2e2e577a09 Require directly, don't spawn 2015-05-14 15:25:35 +01:00
Joe Stanton 132f8fa3ce 1-1 port of init script to Nodejs
This will remove the dependency on Ruby.
2015-05-14 15:23:25 +01:00
Alex Akers e84e5710e4 [React Native] Update podspec for 0.4.2 2015-05-14 04:10:47 -08:00
Spencer Ahrens 425711927a Merge pull request #1271 from ide/map-docs
Move requireNativeComponent call below the complete MapView definition
2015-05-13 21:13:19 -07:00
James Ide 69db752067 Move requireNativeComponent call below the complete MapView definition
requireNativeComponent should be called after the wrapper component is fully defined, including its static properties.
2015-05-13 21:05:50 -07:00
Christopher Chedeau ec6aebabff Merge pull request #1124 from enaqx/patch-1
Update .gitignore with *.log
2015-05-13 19:52:41 -07:00
Spencer Ahrens 6e179fb7cd [ReactNative] introduce mountSafeCallback
Summary:
`mountSafeCallback` simply wraps a callback in an `isMounted()` check to prevent crashes when old callbacks are called on unmounted components.

@public

Test Plan:
Added logging and made sure callbacks were getting called through
`mountSafeCallback` and that things worked (e.g. photo viewer rotation etc).
2015-05-13 18:36:53 -08:00
Christopher Chedeau 71ce49b7a5 Fix failing snapshot test 2015-05-13 19:04:50 -07:00
Amjad Masad a6b29a0b1a [react-packager] Update worker farm 2015-05-13 17:54:19 -08:00