Commit Graph

4880 Commits

Author SHA1 Message Date
Gaëtan Renaudeau 4f9086f0e7 Fixes error when navigationBar is set back to null
Summary:
This fixes a regression introduced in df70005c12

If you set navigationBar props (on Navigator) and then later set it back to null, it will crashes.
(N.B. this should be possible as navigationBar is optional)

cc satya164
Closes https://github.com/facebook/react-native/pull/4941

Reviewed By: svcscm

Differential Revision: D2788889

Pulled By: bestander

fb-gh-sync-id: f8f1cd6cc2ce13b1b1b86fa76d3b22c26a8adb5b
2016-01-07 12:01:37 -08:00
pecheriere ac72611bb1 Add soundName config for UILocalNotification
Summary:
Current version wasn't triggering any sound when a local notification was fired. I added the possibility to provide a custom sound and fallback to the default iOS sound if not provided.
Closes https://github.com/facebook/react-native/pull/4836

Reviewed By: svcscm

Differential Revision: D2807381

Pulled By: bestander

fb-gh-sync-id: c25e8f3c30a0714a5d9558c0c1fe344d0e93321e
2016-01-07 12:01:26 -08:00
Martin Konicek 811079ede2 [global-cli] Bump version to 0.1.9
To release a new version with the fix for Windows:
https://github.com/facebook/react-native/pull/5171

Thanks a lot @tdzl2003!

Tweaked the platform check to use `process.platform`
as that's more common in the codebase. No strong preference,
just for consistency.
2016-01-07 17:03:56 +00:00
Martin Konicek 749f32b1e5 Merge pull request #5171 from tdzl2003/tdzl2003-pr-2
Fix 'Error: spawn npm ENOENT' on Windows
2016-01-07 16:56:30 +00:00
Nick Lockwood 571e646543 Improved null url handling
Summary:
public
Attempting to load an undefined URL via XMLHttpRequest produced a confusing error deep within the network layer. This diff improves the networking stack to catch such errors earlier, and also adds a helpful error in the JS layer.

Fixes https://github.com/facebook/react-native/issues/4558

Reviewed By: javache

Differential Revision: D2811080

fb-gh-sync-id: 1837427e1080a0308f2c4f9a8a42bce2e041fb48
2016-01-07 04:00:38 -08:00
Alexander Blom 57f6cbb3dc Add annotation processor for @ReactProp
Summary:
The annotation processor finds subclasses of ViewManager and ShadowNode and generates classes that can both provide a mapping of property names to their type as well as a way of setting these properties.

This avoids having to do reflection to find the properties.

The annotation processor is currently not working when building with Gradle.

public

Reviewed By: astreet

Differential Revision: D2748958

fb-gh-sync-id: ded5b072d236ebf19fb43eaf704fc7f221a82c26
2016-01-07 03:52:58 -08:00
Alexander Blom c1b7a369af Move UIManager annotations to separate package
Summary:
Moves ReactProp and ReactPropGroup to `com.facebook.react.uimanager.annotations`. This is needed
so that future annotation processor can run on code inside the com.facebook.react.uimanager package.

public

Reviewed By: astreet

Differential Revision: D2754842

fb-gh-sync-id: 3808c3e3f6c45e5897ecab88cd4175573c0c24e6
2016-01-07 03:52:50 -08:00
Nick Lockwood 23cd9febbc Fixed deadlock in RCTModuleData
Summary:
public
Fixed a potential deadlock issue if code attempted to access a module via [bridge moduleForName/Class:] while it was being initialized.

Reviewed By: lry

Differential Revision: D2807827

fb-gh-sync-id: 58cafe9b92c094dde632d17245fb9b342a0fe9e0
2016-01-07 01:30:30 -08:00
Martín Bigio 9037d374e1 Remove Hot Loading option from Dev Menu
Reviewed By: jingc

Differential Revision: D2810788

fb-gh-sync-id: cda3b802ee2b744b76253ec48bbd0c6e45c36d9f
2016-01-06 22:37:32 -08:00
Martín Bigio 7bb60449bd Bail internal transforms if there're no transforms to run
Reviewed By: sam-swarr

Differential Revision: D2810474

fb-gh-sync-id: d5ba48922c91c3dbacfccb0d087cc1deac14fa1c
2016-01-06 20:04:27 -08:00
DengYun dee984d1dd Do some dirty for windows compatible 2016-01-07 11:43:01 +08:00
Olivier Notteghem b75c939d59 Fix corner case bug in ListView
Reviewed By: sahrens

Differential Revision: D2802885

fb-gh-sync-id: e4bb82e3c63ded2af46f5b078b712636d3afa156
2016-01-06 19:16:32 -08:00
Christopher Chedeau bd3ef4315f Merge pull request #5168 from jaysoo/updates-running-on-device-android
[Docs] Adds an alternative method of opening dev menu on Android devices
2016-01-06 18:59:46 -08:00
Jack Hsu 472fafa86c Adds alternative method of opening the dev menu using `adb shell input keyevent 82` 2016-01-06 21:28:16 -05:00
Martín Bigio 0b9f623cd0 babel-plugin-react-transform should be a regular dependency
Reviewed By: vjeux

Differential Revision: D2803782

fb-gh-sync-id: 58c3660dde226479dbfd180ce6a83f91b5a15465
2016-01-06 14:51:29 -08:00
Martín Bigio bdbadfd966 Make sure client is still connected while computing HMR update
Reviewed By: vjeux

Differential Revision: D2803506

fb-gh-sync-id: a182343947d52724e48709a8114fa48e8c97a7e2
2016-01-06 13:29:38 -08:00
Michael Lee 0b15418d92 snprintf off by one.
Summary:
According to `man snprintf`

    Upon successful return, these functions return the number of
    characters printed (not including the trailing '\0' used to end
    output to strings).

Or am I misunderstanding something about what's going on here?

public

Reviewed By: zlern2k, dcolascione

Differential Revision: D2805759

fb-gh-sync-id: f20908f80cdfff9677fe38c7c1cf733f0f5b1c5e
2016-01-06 13:02:34 -08:00
Martín Bigio 0f9c88514c Remove `hot` query string attribut when HL is disabled
Summary:
public

By doing this we fix 2 problems:

1. We use the same url, both the first time the simulator starts with Hot Loading disabled (no `hot` attribute), and after HL has been enabled and then disabled ('hot=false'). By doing so, the packager will rebuild more than one bundle as file changes. We could have ignored this attribute on the packager but I'd rather not contaminate the server with it and instead make the clients send only 2 types of URLs.

2. The code on `RCTBatchedBridge.m` that decides whether or not to enable HMR does so by looking at presence of the query string parameter `hot`. If the parameter is present, even when it's false, it will try to enable HL, which is wrong.

Reviewed By: nicklockwood

Differential Revision: D2807512

fb-gh-sync-id: 728b680c2383c328d8967d34c10e7a6288e455ac
2016-01-06 11:55:33 -08:00
Elliot Hesp d6513ca03f Add "Only supports one child" to TouchableWithoutFeedback
Summary: Closes https://github.com/facebook/react-native/pull/4985

Reviewed By: svcscm

Differential Revision: D2794384

Pulled By: bestander

fb-gh-sync-id: 7332a83df635619d1d6bfacbf6e9c71af90179d9
2016-01-06 11:52:30 -08:00
gitim 37b724eaa6 Fix missing keys in animation example
Summary:
There were two warnings about missing keys, fixed them.
Closes https://github.com/facebook/react-native/pull/5153

Reviewed By: svcscm

Differential Revision: D2807602

Pulled By: androidtrunkagent

fb-gh-sync-id: ef7a5eecd297e89b7338fdec65639785a1232f13
2016-01-06 11:12:30 -08:00
Henrik Kok Jørgensen 7ecb6936bc Dont call npm before node is available
Summary:
This fixes an error introduced in `0.18.0-rc`

`node` and `npm` isn't available if the developer is using `nvm` or `nodeenv`. XCode throws an error because of the call to `npm`. Simple move the line to after `node` and `npm` has been setup.
Closes https://github.com/facebook/react-native/pull/5156

Reviewed By: svcscm

Differential Revision: D2807589

Pulled By: androidtrunkagent

fb-gh-sync-id: 30c33145b2cb6f30ff67f6648153d5aa67fb74ed
2016-01-06 11:03:34 -08:00
Quentin Valmori 3d0ff69e40 Map follow user location
Summary:
Fix #3105

It's the same PR as #3119 but as I force-pushed in my branch, I can't reopen the PR. I added an example.
![capture d ecran 2016-01-05 a 07 15 37](https://cloud.githubusercontent.com/assets/1107936/12108841/2727f504-b37c-11e5-8250-b53785930aba.png)
Closes https://github.com/facebook/react-native/pull/5126

Reviewed By: svcscm

Differential Revision: D2803052

Pulled By: nicklockwood

fb-gh-sync-id: 2e8978ff1b293d699462a8290b45fa74cc16b4dd
2016-01-06 11:00:34 -08:00
Ognen Ivanovski 61025a9b33 bugfix: NavigatoriOS doesn't update any scenes when 0th scene is replaced
Summary:
Calling navigator.replace(0, scene) has no effect.

This is because 0 is false in Javascript so when

    this.state.updatingAllIndicesAtOrBeyond == 0

(meaning update all indices starting with 0)

The whole expression evaluates to 0, i.e. false ->  therefore no update
happens.

Explicitly checking for not-equal to null (!= will convert undefined to null automatically) fixes the issue.
Closes https://github.com/facebook/react-native/pull/5155

Reviewed By: svcscm

Differential Revision: D2807397

Pulled By: nicklockwood

fb-gh-sync-id: 519a4ab35c86b0b608808b36593f5f8c2ecd1561
2016-01-06 10:33:36 -08:00
sunnylqm 7b63b225a5 remove a typo
Summary:
I can't guess the point. Just simply removed this typo.
Closes https://github.com/facebook/react-native/pull/4943

Reviewed By: svcscm

Differential Revision: D2786863

Pulled By: bestander

fb-gh-sync-id: 0f36f796cae23bacb86ffe224b6b05915e228f47
2016-01-06 10:33:29 -08:00
Emilio Rodriguez 33e05a11f0 Added scrollTo method to ListView
Summary: Closes https://github.com/facebook/react-native/pull/4781

Reviewed By: svcscm

Differential Revision: D2803479

Pulled By: mkonicek

fb-gh-sync-id: 7da41eb0bdfb0f90b4f81d1006eaf00446820827
2016-01-06 10:25:34 -08:00
Noah Jorgenson 385fa00af8 Docs for manual linking in PushNotificationsIOS
Summary:
close #3831
Closes https://github.com/facebook/react-native/pull/5008

Reviewed By: svcscm

Differential Revision: D2794281

Pulled By: bestander

fb-gh-sync-id: 7bf367233fa562b5772fae51511b47cd29030ba2
2016-01-06 10:19:31 -08:00
Adam Miskiewicz 78349d6125 Merge pull request #5137 from niftylettuce/master
Added reference to Frappé (for OS X Android)
2016-01-06 12:53:24 -05:00
Martín Bigio 51d8ed92d5 Move HMR to internal transform
Summary:
public

We want to support Hot Loading on the packager itself instead of on the transformer. This will allow us to enable it on OSS (and for any scripting language, yay!).

For now to enable Hot Loading the packager's internals transforms need to be manually enabled (start packager with `--enable-internal-transforms`). I think the internal pipeline should always be enabled as it doesn't affect performance if there're no transforms and the user can disable Hot Loading through the setting on the app though. I'll tweak this on a follow up commit.

Reviewed By: vjeux

Differential Revision: D2801343

fb-gh-sync-id: 563984d77b10c3925fda6fd5616b814cdbea2c66
2016-01-06 09:47:39 -08:00
Martín Bigio d875aac3c8 Resolve requires on HMR
Summary:
public

Requires are transformed when building the bundle but we forgot doing so when building the HMR one.

Reviewed By: vjeux

Differential Revision: D2801319

fb-gh-sync-id: ae70612945ab81a05154b14d6b756ef390770542
2016-01-06 09:47:31 -08:00
Nick Baugh 49b020a776 Added reference to Frappe, a tool for OS X that easily lets you reload developer tools menu with menubar/tray and hotkey
Adjusted sentence per https://github.com/facebook/react-native/pull/5137#discussion_r48966919
2016-01-06 12:42:55 -05:00
Pieter De Baets a5c1f0303c Merge pull request #5150 from javache/ios9.2
Move tests to Xcode 7.2
2016-01-06 17:35:59 +00:00
Alex Rothberg 4bc425c521 Added stickyHeaderIndices to ListView
Summary:
Closes #3870

Alternatively I could make this a bool `stickyheader` that just adds `0` to  the `stickyHeaderIndices` passed down to the ScrollView.
Closes https://github.com/facebook/react-native/pull/4213

Reviewed By: svcscm

Differential Revision: D2807414

Pulled By: androidtrunkagent

fb-gh-sync-id: 091b6c6c91cebe175181f57b5c2785395b5db19b
2016-01-06 09:21:47 -08:00
Pieter De Baets adfc573a75 Move tests to iOS9.2 2016-01-06 17:12:02 +00:00
Pieter De Baets 435efadbba Re-enable testUnderlyingBridgeIsDeallocated
Reviewed By: jspahrsummers

Differential Revision: D2803543

fb-gh-sync-id: d62b68b1e23fad2a0b3d4e490459b1f38ca2dca1
2016-01-06 09:03:33 -08:00
Geoffrey Goh e730a9fdd0 Load assets from same folder as JSbundle (Android)
Summary:
https://github.com/facebook/react-native/issues/3679 was only partially fixed as the behaviour only works on iOS. This implements the same behaviour for Android. If the JSBundle was loaded from the assets folder, this will load images from the built-in resources. Else, load the image from the same folder as the JS bundle.

EDIT: For added clarity:

On iOS,
Bundle Location: 'file:///Path/To/Sample.app/main.bundle'
httpServerLocation: '/assets/module/a/'
Name: 'logo'
type: 'png'
**Resolved Asset location: '/Path/To/Sample.app/assets/module/a/logo.png'**

On Android,
Bundle Location: 'file:///sdcard/Path/To/main.bundle'
httpServerLocation: '/assets/module/a/',
name: 'logo'
type: 'png'
**Resolved Asset location: 'file:///sdcard/Path/To/drawable_mdpi/module_a_logo.png'**
Closes https://github.com/facebook/react-native/pull/4527

Reviewed By: svcscm

Differential Revision: D2788005

Pulled By: mkonicek

fb-gh-sync-id: 3f6462a7ee6370a92dd6727ac422c5de346c3ff1
2016-01-06 08:46:35 -08:00
Milen Dzhumerov ffd4f991f5 Merge pull request #5056 from sunnylqm/patch-6
remove broken link
2016-01-06 16:06:29 +00:00
Konstantin Raev fd5d298303 Merge pull request #5129 from bestander/gh-pages-circle
small hack to have circle.yml in gh-pages generated branch
2016-01-06 15:57:21 +00:00
Chirag 2833553617 Merge pull request #5144 from dobbit/showcase
added ShareHows app to showcase
2016-01-06 10:51:03 -05:00
Christopher Dro a3d9fadc78 Remove fixed size for Android. Fixes #3785
Summary:
Fixed #3785
Closes https://github.com/facebook/react-native/pull/4298

Reviewed By: svcscm

Differential Revision: D2807289

Pulled By: mkonicek

fb-gh-sync-id: 6f161e4f8b04597726183fdcf8bc22c682557958
2016-01-06 07:42:28 -08:00
Martin Bigio 0d4cfa00f9 Increase worker-farm timeout
Reviewed By: davidaurelio

Differential Revision: D2806738

fb-gh-sync-id: a165578002415388af830f77bd96f4888143028f
2016-01-06 07:15:29 -08:00
Satyajit Sahoo 5b3cb05fa8 Add a menu item for HMR
Summary:
cc martinbigio
Closes https://github.com/facebook/react-native/pull/5092

Reviewed By: svcscm

Differential Revision: D2807241

Pulled By: mkonicek

fb-gh-sync-id: e4418eeb4944d795f30f94be94b80648b4d7034c
2016-01-06 07:05:33 -08:00
SangYeob Bono Yu daa93a6222 Change the signature of onDropViewInstance. issue #5053
Summary:
https://github.com/facebook/react-native/issues/5053
Closes https://github.com/facebook/react-native/pull/5125

Reviewed By: svcscm

Differential Revision: D2807202

Pulled By: foghina

fb-gh-sync-id: 1e268c940a08aa7bf243971ba91d4595973f12af
2016-01-06 06:57:30 -08:00
Andy Street 1bfd267acb Resubmit: [react_native] WebWorkers: Add JSLoader API for loading script from assets with AssetLoader reference
Summary:
public

Adds the ability to load files from assets without threading through an AssetManager. After the bridge is unforked, we should move to passing through an Environment object instead.

Resubmit: previous version was reverted due to adsmanager crash

Reviewed By: foghina

Differential Revision: D2802899

fb-gh-sync-id: 3d850256fc22f7e9eb21fa71f6adb09cacc839c4
2016-01-06 06:30:31 -08:00
Nick Lockwood 17df595e32 Implement Android's dispatchViewManagerCommand interface on iOS
Summary:
public
Android implement ViewManager methods via a dispatch method on UIManager, whereas iOS implements them by exposing the methods on the view manager modules directly.

This diff polyfills Android's implementation on top of the iOS implementation, allowing the same JS API to be used for both.

Reviewed By: javache

Differential Revision: D2803020

fb-gh-sync-id: 0da0544e593dc936467d16ce957a77f7ca41355b
2016-01-06 05:58:37 -08:00
Alex Kotliarskyi 28c0240361 Fix `background` warning in TouchableNativeFeedback
Summary:
The problem: no matter what value `background` prop has, it always triggers a warning

![screen shot 2016-01-05 at 1 20 35 pm](https://cloud.githubusercontent.com/assets/192222/12128053/c0a8754a-b3af-11e5-92c6-921e2e0c7cc4.png)

Looks like this happens because we use `createStrictShapeTypeChecker` prop types inside `PropTypes.oneOfType` instead of `PropTypes.shape`.
Closes https://github.com/facebook/react-native/pull/5132

Reviewed By: svcscm

Differential Revision: D2804478

Pulled By: mkonicek

fb-gh-sync-id: 32ce964047bddd9d92c214baaff5422dbcfd7e90
2016-01-06 05:58:31 -08:00
Andy Street cf350a69de WebWorkers: New c++ interface for NativeRunnable
Reviewed By: mhorowitz, lexs

Differential Revision: D2779083

fb-gh-sync-id: dc36b71504b4e74b1671bb48f72d001c9c87721b
2016-01-06 04:17:28 -08:00
Milen Dzhumerov 7d70b86a7b RCTImageUtils Obj-C nullability annotations
Summary:
Add Objective-C nullability annotations to RCTImageUtils

public

Reviewed By: nicklockwood

Differential Revision: D2797310

fb-gh-sync-id: 08329f70d1a09bf47865c9e7e76d7b4340eb6e80
2016-01-06 03:55:30 -08:00
SangYeob Bono Yu 216725e565 added ShareHows app to showcase 2016-01-06 18:18:43 +09:00
Martín Bigio f421d2b056 Fix cache errors
Reviewed By: yungsters

Differential Revision: D2806495

fb-gh-sync-id: 4c1088cde8f0b88070f31b3a130b66f20a2a07cb
2016-01-05 22:04:39 -08:00
Martín Bigio 5a4ee0bfaa Pipe transforms errors through transformation pipelines
Summary:
public

Fixes an issue on the transforms pipeline which caused not to pipe errors that occured on the external transformer to JSTransformer.

Reviewed By: yungsters

Differential Revision: D2806498

fb-gh-sync-id: c9347d1957a3a9320b3f177ff9b19bf3802087a0
2016-01-05 21:57:31 -08:00