Commit Graph

3234 Commits

Author SHA1 Message Date
Nick Lockwood 799168929c Unify XCAsset handling logic
Summary: @​public

This diff unifies the logic for detecting when images refer to XCAsset files into a single function (RCTXCAssetNameForURL) and uses it for both +[RCTConvert UIImage:] and RCTImageLoader.

I've also tightened the definition of XCAssets so that it only applies to images inside .car files, not any image inside the main bundle. This avoids using the +[UIImage imageNamed:] when not strictly necessary, which is desirable since that method is not thread-safe, and has undocumented caching behavior that is difficult to reason about.

Reviewed By: @javache

Differential Revision: D2526400

fb-gh-sync-id: 7199c2a44f1d55ff236d2c38a0a9368739b993d5
2015-10-12 04:15:27 -07:00
Emmanouil Konstantinidis c16c3f9814 Fix typo - Remove duplicated "to have"
Summary: Closes https://github.com/facebook/react-native/pull/3015

Reviewed By: @​svcscm

Differential Revision: D2530576

Pulled By: @vjeux

fb-gh-sync-id: e7df3706f3c733e8de32c1f123d951b488133e8a
2015-10-11 21:14:54 -07:00
Christopher 53403423ca - Fix response variable from getCurrentReachability
Summary: Fixes #3333 and #2802
Closes https://github.com/facebook/react-native/pull/3345

Reviewed By: @​svcscm

Differential Revision: D2530744

Pulled By: @vjeux

fb-gh-sync-id: 521cbe482f3811339b21cf68ba2269d2b5286e82
2015-10-11 19:42:24 -07:00
James Ide 720228825b Merge pull request #3327 from gabro/patch-1
Update list of babel transformations in JavascriptEnvironment doc
2015-10-10 15:57:00 -07:00
Gabriele Petronella df1a6d5bed Add missing semicolon in example and remove extra one 2015-10-11 00:47:12 +02:00
Gabriele Petronella 72ac2f3c27 move await inside async function in async/await example 2015-10-11 00:45:27 +02:00
James Ide 2c7de35dee Export per-platform NavigatorNavigationBarStyles for consistent styling
Summary: This allows for the iOS-style navigation bar on Android and vice versa in order to simplify design. It is entirely optional in that NavigationBars will continue to defauly to their platform-specific style, but you can override it with the `navigationStyles` prop:

```js
<Navigator.NavigationBar
  navigationStyles={Navigator.NavigationBar.StylesIOS}
/>
```

Fixes #2995.
Closes https://github.com/facebook/react-native/pull/3028

Reviewed By: @​svcscm

Differential Revision: D2527902

Pulled By: @ericvicenti

fb-gh-sync-id: c7b1bfac200b5e03fc0d9dfb8acc8b916c825595
2015-10-10 15:32:46 -07:00
Gabriele Petronella cee9c6fe80 Update list of babel transformations in JavascriptEnvironment documentation
Re-sync the documentation with https://github.com/facebook/react-native/blob/master/packager/transformer.js#L35-L48
2015-10-10 15:18:07 +02:00
Andrei Coman 9f1dab69c1 Use correct spans in shadow nodes
Differential Revision: D2529951

fb-gh-sync-id: d3bfbe9ea4b9c0cd405a2e0fb9a3176274f0c9fa
2015-10-10 02:17:25 -07:00
Jiajie Zhu c86966c150 fix breadcrumb icon offset
Reviewed By: @fkgozali

Differential Revision: D2528804

fb-gh-sync-id: 6ed9e9ce330ecc147c3fb8217c7b1b0986c862fe
2015-10-09 17:53:26 -07:00
Atticus White 7abf8ba631 PanResponderExample fix for responding to events
Summary: Fixes #3312.

The example was no longer reacting to touch/drag events.

It looks like `setNativeProps` requires the `style` property to contain the style rules. It appears that this warning is [only in development mode](381e2acd18/Libraries/ReactIOS/NativeMethodsMixin.js (L115-L117)), but after fixing it I am seeing the gestures recognized and properly handled. Running outside of the dev environment yielded the circle to be positioned at the top left of the screen, below the navigation bar, and inaccessible.

<img src="https://cloud.githubusercontent.com/assets/656630/10407224/1449b1b2-6eb6-11e5-8116-20d08f7721ec.png" width="350" />

![after](http://g.recordit.co/UIbeHcKZUg.gif)
Closes https://github.com/facebook/react-native/pull/3315

Reviewed By: @​svcscm

Differential Revision: D2529010

Pulled By: @vjeux

fb-gh-sync-id: 6b79573f42a2520197f77dcb76cd640ea614477f
2015-10-09 17:31:25 -07:00
Brent Vatne 05c08a472c Merge pull request #3314 from brentvatne/docs/add-dimensions
[Docs] Add Dimensions to API docs
2015-10-09 14:46:43 -07:00
Brent Vatne 36f015c0dd [Docs] Add Dimensions to API docs 2015-10-09 14:44:36 -07:00
James Ide 4f0a7250cc Add Node >= 4 requirement to package.json and packager/package.json
Summary: When you try to install these with old Node you'll now get a message from npm telling you that your version of Node is old. This makes it more obvious what's going on and hopefully reduces the number of issues we get due to people using an old version of Node.
Closes https://github.com/facebook/react-native/pull/3296

Reviewed By: @​svcscm

Differential Revision: D2526500

Pulled By: @vjeux

fb-gh-sync-id: 036e10a8d1819ea082e419cd328a458202f0e071
2015-10-09 14:44:23 -07:00
Ian MacLeod c612d830bb Preserve original global properties when polyfilling them
Summary: Fixes #934.
Closes https://github.com/facebook/react-native/pull/3293

Reviewed By: @​svcscm

Differential Revision: D2525598

Pulled By: @vjeux

fb-gh-sync-id: 90672550f723a183897456dc9512851bfa34807a
2015-10-09 14:41:23 -07:00
Mikhail Chinyakov aa8ead7cd6 Fix build process for react-native-fbsdk libraries.
Summary: I found the problem with building react-native-fbsdk (https://github.com/facebook/react-native-fbsdk) libraries when I used cocoapods.
When we use the option 'header_mappings_dir = "."' , header files of React will be copied with subfolders structures, not into one folder "${PODS_ROOT}/Headers/Public/React". And we should add recursive search and write "${PODS_ROOT}/Headers/Public/React/**". However writing code in auto-generated files is not good idea.
Closes https://github.com/facebook/react-native/pull/3248

Reviewed By: @​svcscm

Differential Revision: D2528021

Pulled By: @vjeux

fb-gh-sync-id: 4ea76eac4035f0bd7c5894f604f84f903714a4e3
2015-10-09 14:40:43 -07:00
Sebastian Markbage 17da325bb4 Add List of Common Cases to AttributePayload Benchmark
Summary: The most common cases is either that nothing changed or that only one part of
an array changed.

@​public

Reviewed By: @spicyj

Differential Revision: D2516385

fb-gh-sync-id: 0cd09b95ebac37ee1b575025d23ae2f2e6e2fb47
2015-10-09 14:31:23 -07:00
Christopher Chedeau 5369ccd3e6 Merge pull request #3311 from javache/objc-tests
Missing file rename
2015-10-09 11:03:35 -07:00
Pieter De Baets 37202f6c8f Missing file rename 2015-10-09 18:51:50 +01:00
Brent Vatne 2a89d94f96 Merge pull request #3310 from jabbrass/patch-1
[Docs] fix typo in KnownIssues.md
2015-10-09 09:46:52 -07:00
Ben Alpert ab6f375c66 Log React warnings internally, fix warnings in Android tests
Reviewed By: @javache

Differential Revision: D2517993

fb-gh-sync-id: c91a42a0abe4037b72c4497a5dc8b52a922fbf98
2015-10-09 09:33:24 -07:00
Martin Konicek a7b23df510 [Android] Add default Proguard config 2015-10-09 17:13:46 +01:00
Martin Konicek 3fce0a9d61 Update SignedAPKAndroid.md 2015-10-09 17:12:05 +01:00
Martin Konicek c5af96b471 Update SignedAPKAndroid.md 2015-10-09 17:11:25 +01:00
Martin Konicek fcf1103b95 Update SignedAPKAndroid.md 2015-10-09 17:10:43 +01:00
Martin Konicek 87ae707985 Update SignedAPKAndroid.md 2015-10-09 17:08:34 +01:00
Martin Konicek 2d206f7286 Update SignedAPKAndroid.md 2015-10-09 17:06:55 +01:00
Martin Konicek 5209114534 Update SignedAPKAndroid.md 2015-10-09 17:00:12 +01:00
Martin Konicek faeeb1567e Update SignedAPKAndroid.md 2015-10-09 16:55:07 +01:00
Martín Bigio 5196ad102d fix E2E tests
Reviewed By: @mkonicek

Differential Revision: D2526310

fb-gh-sync-id: 1c04f56073dc5b393a36b258c039fdfd85ab83a2
2015-10-09 07:59:02 -07:00
Pieter De Baets 67a69906e7 Allow image extensions when loading from asset catalogs
Reviewed By: @nicklockwood

Differential Revision: D2526258

fb-gh-sync-id: 01ccbddcfe8dc98ae5eeac1a066fbc1e69d6f087
2015-10-09 07:55:26 -07:00
Pieter De Baets 903eaa863c Fix logic for loading images from asset catalogs in RCTConvert
Reviewed By: @nicklockwood

Differential Revision: D2526264

fb-gh-sync-id: 039b0438fbce7c3e752271adc8d5aa5d4fe915e5
2015-10-09 07:46:41 -07:00
Martin Konicek 26f5f1ffc8 Update SignedAPKAndroid.md 2015-10-09 15:37:06 +01:00
Uri Baghin f52cd5dc1e Use path instead of resourceSpecifier so it unescapes.
Reviewed By: @nicklockwood

Differential Revision: D2526217

fb-gh-sync-id: c48af71402927b0aa4e9942e1825068af5334ab9
2015-10-09 06:39:43 -07:00
Martin Konicek de0e039898 Update SignedAPKAndroid.md 2015-10-09 14:30:58 +01:00
Felix Oghină 3a0a1a4122 expose JS source location to JS
Differential Revision: D2526103

fb-gh-sync-id: d597b52dd9442fc27b0841b7df447e9d8d7de6e1
2015-10-09 04:24:23 -07:00
Mike Armstrong fffae394c7 Use new hybrid inheritance for NativeArray and descendants
Reviewed By: @andreicoman11

Differential Revision: D2523619

fb-gh-sync-id: 62382c16cbbeceec12763b3786676ecff783b651
2015-10-09 03:11:35 -07:00
Martín Bigio 998ab1b1a4 Server failing on start up
Summary: @​public
When doing node <script> some es6 features like const seem to work. But when we extracted some of them into other files and require them through babels require infra it started failing because the paths where those files are located where not on the `only` whitelist.

Reviewed By: @vjeux

Differential Revision: D2525557

fb-gh-sync-id: 79752c4f9b8ff2d20f73cfe27d6a2f3706959d95
2015-10-08 21:08:21 -07:00
J. Andrew Brassington 3ae0f4044f [Docs] fix typo in KnownIssues.md
Line 53: "currenty" => "currently"
2015-10-08 17:42:38 -07:00
Martín Bigio 32b62ef055 Unbreak packager on oss master
Summary: @​public
This was a hard one, bare with me on the full story of what happened.

We recently started writting additional JS scripts in ES6 for the cli. These code needs to be transformed by babel before we execute it as we don't run node with `--harmony`. To do so we removed the `only` attribute on the `babel-register`. Turns out this broke the packager on oss as if no `only` not `ignore` parameter is specified babel will ignore `node_modules`. Since on oss when a project is created `react-native-github` is located inside of `node_modules` we started getting syntax errors.

The fix is to include separately all the different paths we need to make sure babel transforms each of them. We cannot simply have a single `babel-core/register` as we need to include paths that belong both to oss and internal only. So, we need to have multiple `register` invocations. Since babel does not accumulate the `only` you send on every invocation we need to build a small wrapper to do so.

Reviewed By: @frantic

Differential Revision: D2522426

fb-gh-sync-id: 379a7bb169c7d5cb3002268742de269238bba766
2015-10-08 17:37:27 -07:00
Martín Bigio 42d756310a Unify oss and internal version of base body loader middleware
Reviewed By: @amasad

Differential Revision: D2519637

fb-gh-sync-id: 88f23c33a1ca0423852ce8ed7696df811e3f8d27
2015-10-08 14:21:15 -07:00
Martín Bigio 0a835b7994 Factor out cpu profiler middleware into it's own file
Reviewed By: @amasad

Differential Revision: D2519562

fb-gh-sync-id: c2b2ba56072d75d7082740532b5d1959273c84f4
2015-10-08 14:21:07 -07:00
Martín Bigio 22e88f2069 Unify oss and internal version of systrace profiler middleware
Reviewed By: @amasad

Differential Revision: D2519518

fb-gh-sync-id: 6682f80447e2b62fcf6b137412ca8ddbe03ecb09
2015-10-08 14:20:58 -07:00
Martín Bigio f980c33073 Unify oss and internal version of status page middleware
Reviewed By: @vjeux

Differential Revision: D2519415

fb-gh-sync-id: 2cf27c88b29c18a7a1f3aa1611f0d7f510a8fa24
2015-10-08 14:20:50 -07:00
Martín Bigio f37ad56afd Unify oss and internal version of stack trace editor opener
Reviewed By: @vjeux

Differential Revision: D2519344

fb-gh-sync-id: 022d8865cd8eea3b0b51f9070c000f15c464dc6a
2015-10-08 14:20:42 -07:00
Martín Bigio 35f9ac89a7 Unify oss and internal version of dev-tools middleware
Reviewed By: @amasad

Differential Revision: D2518928

fb-gh-sync-id: 0c98b16481b524436a2cf4af3e196ac5715b55ee
2015-10-08 14:20:33 -07:00
Brent Vatne 1fd2e176ae Fix broken code block and make the example nicer
Summary: @​kmagiera @mkonicek - made a mistake while updating it, removed the `margin` style for some reason on the inner Text (it was 1am, ¯\_(ツ)_/¯). This also makes the example nicer looking - style the navigation with a white background, center the text in the main content view.

![](http://url.brentvatne.ca/16xXe.png)
![](http://url.brentvatne.ca/1a4Jt.png)
Closes https://github.com/facebook/react-native/pull/2682

Reviewed By: @​svcscm

Differential Revision: D2454465

Pulled By: @mkonicek

fb-gh-sync-id: 2fa17366b34ae31c490d37791ad693c17ac3f128
2015-10-08 14:01:52 -07:00
Nick Lockwood 7fe7a2a26b Improved JS bundle loading performance
Summary: @​public

RCTJavaScriptLoader was using an NSURLSessionDataTask to load local bundle.js files. While this works, it was non-optimal from a performance point of view.

Reviewed By: @tadeuzagallo

Differential Revision: D2522598

fb-gh-sync-id: b32981b3be4c336512d1462d3f4943b5aad34ae0
2015-10-08 12:39:52 -07:00
Nick Lockwood 91e6c98ecd Implemented inline image support for <Text>
Summary: @​public

This diff implements inline image support for <Text> nodes. Images are specified using <Image> tags, however all properties of the image are currently ignored apart from the source (including width/height styles).

Images are loaded asyncronously, and will trigger a text re-layout when they have loaded.

Reviewed By: @javache

Differential Revision: D2507725

fb-gh-sync-id: 59d0696d00a1bc531915cc35242a16b2dec96e85
2015-10-08 11:56:25 -07:00
Martin Konicek c740edaf03 Add a comment to CLI's init 2015-10-08 17:49:05 +01:00