Commit Graph

4764 Commits

Author SHA1 Message Date
Emil Sjölander 3453a60bf8 Escape directory path in packager.sh
Summary:
Previously could not handle directory paths with spaces.
Closes https://github.com/facebook/react-native/pull/5381

Reviewed By: svcscm

Differential Revision: D2839193

Pulled By: javache

fb-gh-sync-id: e95825a602c053761826255ac5254b97fadbe090
2016-01-18 12:42:33 -08:00
Martin Konicek f471be7380 Update Releases-publish.md 2016-01-18 20:41:11 +00:00
Martin Konicek daf0bd4cea Update Releases.md 2016-01-18 20:40:41 +00:00
Martin Konicek 2c6d9d8e14 Update Releases.md 2016-01-18 20:40:13 +00:00
Martin Konicek 9fea485138 Build React Native with Buck
Reviewed By: bestander

Differential Revision: D2834002

fb-gh-sync-id: ebd5303a05fe9a01545365e4205d4cb8724a77a8
2016-01-18 12:39:16 -08:00
Martin Konicek b6c1593d14 [docs] Split release docs into two files 2016-01-18 20:37:55 +00:00
Martin Konicek 2bc482257a Update Releases.md 2016-01-18 20:26:57 +00:00
Martin Konicek bd9ac0df48 Update Releases.md 2016-01-18 20:26:07 +00:00
Felix Oghină 58fc0f07bd add timeout param to remaining RCTNetworking implementations
Reviewed By: nicklockwood

Differential Revision: D2839041

fb-gh-sync-id: 374fca9ce0fdf5622f57a10456c99628ca7a1400
2016-01-18 10:04:36 -08:00
Connor McEwen b8ff6212f8 bind this in onreadystatechange call
Summary:
I ran into this problem that `this` is undefined in `onreadystatechange` function calls while using this github api library: https://github.com/michael/github/blob/master/github.js#L72

It seems that in the browser, the `onreadystatechange` function expects `this` to be bound. This example on the xhr spec website can be seen using `this` similarly: https://xhr.spec.whatwg.org/#the-getresponseheader()-method
Closes https://github.com/facebook/react-native/pull/5373

Reviewed By: svcscm

Differential Revision: D2838940

Pulled By: nicklockwood

fb-gh-sync-id: e42184887c7abb0af9c4358a5f33b8c97155624c
2016-01-18 08:55:35 -08:00
Martin Konicek 474b5e9b80 Update Releases.md 2016-01-18 16:19:56 +00:00
Alex Roman 1303e6d039 Implement XHR timeout for Android and IOS natively.
Summary:
Opening this in a separate PR but the discussion can be viewed on #4832.

Basically, this is a native implementation and is a bit more elegant. The consensus on my previous PR was that it should be done natively rather than in JS.

There's now no maximum valid timeout value and a timeout of 0 will never time out.

ontimeout isn't implemented (yet) in this PR.

cc nicklockwood ide philikon
Closes https://github.com/facebook/react-native/pull/5038

Reviewed By: svcscm

Differential Revision: D2838743

Pulled By: nicklockwood

fb-gh-sync-id: 774f864ac35082bf522f7665f4311bd3affbe82c
2016-01-18 08:10:59 -08:00
ahanriat a3706411ab Fix jest preprocessor script
Summary:
Related to #3999

There is an issue with the `preprocessor` script when using node >=5 as it uses npm 3. ~~There are (at least) two solutions, (I'm submitting the first one):~~
- ~~specify min required node version to 5.x and modify [this the preprocessor script](https://github.com/facebook/react-native/blob/0.16-stable/jestSupport/preprocessor.js#L29) to match npm 3 requirements~~
- ~~specifify node version >= 4.x and < 5.x and let the preprocessor script as it is~~

**EDIT**:
Using `require.resolve` will do the trick !

--
Thank you guys for this amazing project by the way ;)
Closes https://github.com/facebook/react-native/pull/4903

Reviewed By: svcscm

Differential Revision: D2838759

Pulled By: androidtrunkagent

fb-gh-sync-id: ebb12f225a519ea23afc4f013bb063a920193719
2016-01-18 06:03:37 -08:00
Martin Konicek 4de8a4bc6d Update Animations.md
Remove extra whitespace
2016-01-18 13:20:29 +00:00
Maksim Ryzhikov 182e97a62c chore: remove extra require
Summary:
We already have require fs [here](https://github.com/maksimr/react-native/blob/patch-cli/local-cli/cli.js#L34)
Closes https://github.com/facebook/react-native/pull/5352

Reviewed By: svcscm

Differential Revision: D2838334

Pulled By: martinbigio

fb-gh-sync-id: 96942b862fee925006687cfba3ad9185a2377a8a
2016-01-17 18:17:39 -08:00
Satyajit Sahoo 63d222667a Merge pull request #4884 from qbig/doc-animation
[Doc][Animation guide][Minor]fix comment by shifting to seperate line
2016-01-17 18:09:07 +05:30
Satyajit Sahoo 4841c39eb6 Merge pull request #5363 from arjunkomath/patch-1
Add Honest Reviews Android App to Showcase
2016-01-17 17:29:05 +05:30
Arjun Komath 6411c0c9de Add Honest Reviews Android App to Showcase 2016-01-17 13:38:47 +05:30
Martin Konicek 4f390e652f Update breaking-changes.md 2016-01-16 21:56:57 +00:00
Martin Konicek d8825056fe Update breaking-changes.md 2016-01-16 21:56:26 +00:00
Satyajit Sahoo fa55ae3ccf Merge pull request #5290 from andrewsardone/ats-tweaks
Expand docs on App Transport Security
2016-01-16 20:36:31 +05:30
Håvard Fossli 0c53c6f7ed Notes about app transport security
The error message wasn't very helpful. I didn't understand the problem
until I debugged the `RCTJavaScriptLoader`. So this might be to help for
others.

Squashed commits by @andrewsardone into @hfossli’s [original
commit][oc]:

[oc]: 39fa5ca95b

- Expand App Transport Security docs w/ localhost tip
- Tweak ATS error note in EmbeddedAppIOS docs
    - Per @satya164’s [recommendation][r], using the exact copy he
      recommended.

[r]: https://github.com/facebook/react-native/pull/5290#discussion_r49843876
2016-01-16 10:03:57 -05:00
Janic Duplessis 5ac848cd7f Allow setting elevation on any type of View
Summary:
Moved setElevation from ReactViewManager to BaseViewManager. This allows
setting elevation on any type of view such as Toolbar for exemple.
Closes https://github.com/facebook/react-native/pull/5292

Reviewed By: svcscm

Differential Revision: D2837415

Pulled By: androidtrunkagent

fb-gh-sync-id: a5aa7abd95b99303d312cd9c2414539335540925
2016-01-16 02:33:31 -08:00
Martín Bigio c9f274c02d Send assets updates through HRM interface
Reviewed By: frantic

Differential Revision: D2832693

fb-gh-sync-id: 816a01fa2f1f7cc8ca218de86b3e2e847ee005c9
2016-01-15 10:52:31 -08:00
Martín Bigio 38486dcbba Throw if there's an error persisting the cache
Reviewed By: davidaurelio

Differential Revision: D2824116

fb-gh-sync-id: 46b3c51a11d22e2da750f9c5a4b431a88004cd81
2016-01-15 10:32:29 -08:00
Christoph Pojer dd06596595 Don't extract dependencies from .json files
Reviewed By: davidaurelio

Differential Revision: D2832417

fb-gh-sync-id: 8bf3705bf620f3cc6d713ca08dde52464185797a
2016-01-15 10:06:33 -08:00
Felix Oghina a10a510d96 support removeClippedSubviews in ReactHorizontalScrollView
Reviewed By: andreicoman11

Differential Revision: D2831013

fb-gh-sync-id: 2ac4eb8d748f2d66523992e8683c1b4d60198ba1
2016-01-15 09:47:31 -08:00
Horcrux 274a3e0585 add onLoading* prop for WebView
Summary:
add onLoadingStart,onLoadingError,onLoadingFinish prop for WebView
Closes https://github.com/facebook/react-native/pull/5335

Reviewed By: svcscm

Differential Revision: D2834003

Pulled By: nicklockwood

fb-gh-sync-id: bbe84297ebeb5a6c2bf1caaacee8c59e0bcef1db
2016-01-15 09:31:33 -08:00
Martin Konicek b68170a489 Update Releases.md 2016-01-15 16:47:45 +00:00
Chirag 76f1a35cb6 Merge pull request #5341 from tomauty/master
[Website] Add MoneyLion App
2016-01-15 11:37:53 -05:00
Dave Miller 2a02621e74 Fix incorrect size issue with inline image text
Reviewed By: andreicoman11

Differential Revision: D2834175

fb-gh-sync-id: 827d37e0128eb07f2e009479269b63c3a3549315
2016-01-15 08:34:34 -08:00
Tom Auty 1341f8bc8e [Website] Add MoneyLion App 2016-01-15 11:14:49 -05:00
Konstantin Raev 18437093f2 Open sourced spinner aka picker aka drop down for android
Reviewed By: mkonicek

Differential Revision: D2830803

fb-gh-sync-id: e6b6fcdbe33d942180cf2c1041076ad71d0473ce
2016-01-15 06:25:16 -08:00
Kyle Corbitt cd89016ee7 PixelRatio.pixel()
Summary:
This implements #5073. It adds a static method `PixelRatio.pixel()` which returns the smallest drawable line width, primarily for use in styles.

It also updates the example apps to use the new function.
Closes https://github.com/facebook/react-native/pull/5076

Reviewed By: svcscm

Differential Revision: D2799849

Pulled By: nicklockwood

fb-gh-sync-id: b83a77790601fe882affbf65531114e7c5cf4bdf
2016-01-15 05:15:31 -08:00
Kyle Corbitt 78c6e416ae Merge pull request #5300 from NZAOM/master
add nzaom app to showcase
2016-01-15 11:06:49 +00:00
scott 538307d179 add nzaom app
change the key to `link `

format code stuff

format code stuff
2016-01-15 15:34:48 +08:00
Martín Bigio bba35f0415 Make Hot Loading work on OSS
Summary:
public

- Tweak OSS server to enable the HMR connection
- Remove client gating code.
- Resolve internal transforms plugins

After this diff, Hot Loading should work on OSS.

Reviewed By: javache

Differential Revision: D2803620

fb-gh-sync-id: b678180c884d2bfaf454edf9e7abe6b3b3b32ebe
2016-01-14 19:33:42 -08:00
Martín Bigio 0185df57bd Tweak Hot Loading gating code
Reviewed By: mmahoney

Differential Revision: D2815537

fb-gh-sync-id: d0a4d5c2a831c52cf3be6051a348ae9ba996f545
2016-01-14 19:33:34 -08:00
Philipp von Weitershausen 66158ab2bf Make the RCTSRWebSocketDelegate protocol part of RCTWebSocketModule public
Summary:
This allows consumers to subclass and extend `RCTWebSocketModule` and make use of the `RCTSRWebSocketDelegate` methods.

The use case here is to do some pre-processing of WebSocket data before handing it off to JS. Consumers could that in the following way:

```

interface MyWebSocketModule : RCTWebSocketModule
end

implementation MyWebSocketModule

// Don't use RCT_EXPORT_MODULE macro for this so we replace the existing RCTWebSocketModule.
+ (NSString *)moduleName { return @"RCTWebSocketModule"; }

RCT_EXTERN_METHOD(connect:(NSURL *)URL socketID:(nonnull NSNumber *)socketID)
RCT_EXTERN_METHOD(send:(NSString *)message socketID:(nonnull NSNumber *)socketID)
RCT_EXTERN_METHOD(close:(nonnull NSNumber *)socketID)

- (void)webSocket:(RCTSRWebSocket *)webSocket didReceiveMessage:(id)message
{
  [super webSocket:webSocket didReceiveMessage:[DoSomethingWith message]];
}

end
```

... and then returning a `MyWebSocketModule` ins
Closes https://github.com/facebook/react-native/pull/5321

Reviewed By: svcscm

Differential Revision: D2832374

Pulled By: nicklockwood

fb-gh-sync-id: f208516b2b2f76276223ffc972871d96afe87e27
2016-01-14 16:13:33 -08:00
Nick Lockwood e4c53c28ae Improved shadow performance
Summary:
public
React Native currently exposes the iOS layer shadow properties more-or-less directly, however there are a number of problems with this:

1) Performance when using these properties is poor by default. That's because iOS calculates the shadow by getting the exact pixel mask of the view, including any tranlucent content, and all of its subviews, which is very CPU and GPU-intensive.
2) The iOS shadow properties do not match the syntax or semantics of the CSS box-shadow standard, and are unlikely to be possible to implement on Android.
3) We don't expose the `layer.shadowPath` property, which is crucial to getting good performance out of layer shadows.

This diff solves problem number 1) by implementing a default `shadowPath` that matches the view border for views with an opaque background. This improves the performance of shadows by optimizing for the common usage case. I've also reinstated background color propagation for views which have shadow props - this should help ensure that this best-case scenario occurs more often.

For views with an explicit transparent background, the shadow will continue to work as it did before ( `shadowPath` will be left unset, and the shadow will be derived exactly from the pixels of the view and its subviews). This is the worst-case path for performance, however, so you should avoid it unless absolutely necessary. **Support for this may be disabled by default in future, or dropped altogether.**

For translucent images, it is suggested that you bake the shadow into the image itself, or use another mechanism to pre-generate the shadow. For text shadows, you should use the textShadow properties, which work cross-platform and have much better performance.

Problem number 2) will be solved in a future diff, possibly by renaming the iOS shadowXXX properties to boxShadowXXX, and changing the syntax and semantics to match the CSS standards.

Problem number 3) is now mostly moot, since we generate the shadowPath automatically. In future, we may provide an iOS-specific prop to set the path explicitly if there's a demand for more precise control of the shadow.

Reviewed By: weicool

Differential Revision: D2827581

fb-gh-sync-id: 853aa018e1d61d5f88304c6fc1b78f9d7e739804
2016-01-14 14:04:34 -08:00
Christoph Pojer 4074b7980e Cache all module data
Summary:
We used to only cache the `dependencies` and `name` of a Module but we were actually accessing two more fields (async dependencies and the `isHaste` field) which meant we were always reading every single file from disk. In D2644383 I noticed that but realized that the Promise was cached, meaning we would read every file once *per instance* and I didn't think about cross-instance reads over time. My initial version added more caching (but also missed the `isHaste` field) but then I got rid of the cache call for `dependencies`. So my change from before didn't make anything worse but it also didn't make anything better. This change now caches everything until the contents of the file actually changes.

public

Reviewed By: martinbigio

Differential Revision: D2831569

fb-gh-sync-id: 74081abc0ce3ca96b4e56c3c9b6d24aa84f7496c
2016-01-14 13:48:33 -08:00
Andrei Coman 25c3dd140f Add phone-pad keyboard
Summary:
With the numeric keyboard now being an actual numeric keyboard (before
it was actually phone-pad), we need a proper phone-pad keyboard as well.

public

Reviewed By: dmmiller

Differential Revision: D2830707

fb-gh-sync-id: 80a1d314eac730e691de73a31342c014a2fa5ba6
2016-01-14 11:42:34 -08:00
James Ide ebf42d9813 Merge pull request #5317 from jamesfzhang/patch-2
Add Jukebox app to showcase
2016-01-14 10:49:25 -08:00
James Zhang aeec3f3b81 Add Jukebox app to showcase 2016-01-14 10:47:50 -08:00
Martín Bigio 469bb7fbfd Improve error wording when fail to launch debugger
Reviewed By: javache

Differential Revision: D2829484

fb-gh-sync-id: a3402ece1f5cd19e8408fa3ab89adf7a26c66de9
2016-01-14 10:02:34 -08:00
Nick Lockwood e5381072dd Fixed transparent border around UIExplorer headers
Summary:
public

This was caused by the change to background color propagation, but was actually due to having an unnecessary wrapper view around the headers, which was itself a workaround for a padding bug that was fixed some time ago :-)

Reviewed By: tadeuzagallo

Differential Revision: D2830890

fb-gh-sync-id: b64e701dedb90b357ed7c463b745de021f38637b
2016-01-14 09:56:35 -08:00
Nick Lockwood ff6a2c3998 Deprecated `scrollResponderScrollWithoutAnimationTo`
Summary:
public

This diff deprecates `scrollResponderScrollWithoutAnimationTo` and replaces it with an optional `animated` param in `scrollResponderScrollTo`. This is more consistent with our other APIs.

Using the old `ScrollResponder.scrollResponderScrollWithoutAnimationTo` or  `ScrollView.scrollWithoutAnimationTo` functions will still work, but will trigger a warning.

Reviewed By: javache

Differential Revision: D2823479

fb-gh-sync-id: 259966512104ca7b3995c9586144812a91b8d3e9
2016-01-14 07:42:34 -08:00
Chirag 90d2787aef Merge pull request #5301 from sunnylqm/patch-10
Update React Native dependency version
2016-01-14 09:37:15 -05:00
Konstantin Raev 892497408c Open sourced Camera Roll module
Reviewed By: mkonicek

Differential Revision: D2827804

fb-gh-sync-id: c1f06f148855bc4f69da8e19b8445988f1b022b3
2016-01-14 04:33:11 -08:00
Dave Miller f8c384ffdd Consolidate event dispatch to one method that gets the context and event dispatcher
Reviewed By: andreicoman11

Differential Revision: D2827596

fb-gh-sync-id: 3971237aa5eb08934a341e1486c7130381252c99
2016-01-14 04:30:36 -08:00