Commit Graph

5889 Commits

Author SHA1 Message Date
Zahan Malkani 2209131933 Introduce custom asset resolver to resolveAssetSource(..)
Reviewed By: frantic

Differential Revision: D2989112

fb-gh-sync-id: a678d091aeb6904448c890653f57dd7944ce95c3
shipit-source-id: a678d091aeb6904448c890653f57dd7944ce95c3
2016-03-15 20:20:27 -07:00
Janic Duplessis a97127b7bb Fix outdated custom view example p2
Summary:Forgot to fix the description of the example in #6435

`UIProp` -> `ReactProp`
Closes https://github.com/facebook/react-native/pull/6442

Differential Revision: D3056520

fb-gh-sync-id: 0995ba66d550279bb75daa733673c68d37c5c793
shipit-source-id: 0995ba66d550279bb75daa733673c68d37c5c793
2016-03-15 18:03:22 -07:00
Hedger Wang 28649b8cf0 Simplify <NavigationCard />.
Summary:Per offline discussion with ericvicenti,  we'd like to reudce the complexity by
keeping <NavigationCard /> nothing more than just a simple `<Animated.View />`,
which helps us to avoid over generalize the styles, gestures of what the Navigation card
needs to be.

The proposalis to use the same props (NavigationSceneRendererProps) that is used to render
the scene to generate the style and pan handlers needed for the navigation card.

No behavior changes, just implementation details clean up work.

Reviewed By: ericvicenti

Differential Revision: D3037225

fb-gh-sync-id: f6e718a282d25a319f5d8efd3e2ffebc66b2c8cb
shipit-source-id: f6e718a282d25a319f5d8efd3e2ffebc66b2c8cb
2016-03-15 15:59:26 -07:00
Oleg Lokhvitsky 6c5195fb3a Update Layout.c to fix flexbox layout bug“
Differential Revision: D3049303

fb-gh-sync-id: 14a8c290bb874ab3e954b45f6fb29d71d019adc2
shipit-source-id: 14a8c290bb874ab3e954b45f6fb29d71d019adc2
2016-03-15 14:34:26 -07:00
Eaden d63762194d Fix bug #5604 - Unrecognised signal for touchable no longer on the screen
Summary:Fixes bug https://github.com/facebook/react-native/issues/5604 ("Redscreen error when TouchRelease triggered on a component no longer in the tree")

( maybe not ideally )

This issue is triggered by the following:

A Touch event on a component ( Keep Pressing )
A state/props update removes the component from the tree and render is performed
A Touch Release event. ( When you release the press on the component no longer there )

This fix adds an early return to the signal handling code if a RESPONDER_RELEASE signal happens when the responder has disappeared
Closes https://github.com/facebook/react-native/pull/5637

Differential Revision: D3053729

Pulled By: sahrens

fb-gh-sync-id: 21a2a303d8921654607eaab824ef28fc16df9500
shipit-source-id: 21a2a303d8921654607eaab824ef28fc16df9500
2016-03-15 12:23:32 -07:00
Martin Konicek 0a35529d53 Update PR guidelines
Reviewed By: mkonicek

Differential Revision:D3054232
Ninja: oss only

fb-gh-sync-id: 6cb9b361f62c1bc009a412049b47be99c423d6e9
shipit-source-id: 6cb9b361f62c1bc009a412049b47be99c423d6e9
2016-03-15 12:16:32 -07:00
Petr Glotov e07fe0cc60 render empty section headers
Summary:Changed behavior so that empty section headers are rendered, fixes this [issue](https://github.com/facebook/react-native/issues/5639).
Closes https://github.com/facebook/react-native/pull/5713

Differential Revision: D3053765

Pulled By: sahrens

fb-gh-sync-id: 59a78a4b19288b2acc04a7b166de8c2ad16eacd7
shipit-source-id: 59a78a4b19288b2acc04a7b166de8c2ad16eacd7
2016-03-15 12:14:28 -07:00
Sam Swarr d5445d5fbc Add ability to silence packager logs to stdout
Summary:We use a few different modules to output logs to stdout when building a bundle with the packager:
- ##js/react-native-github/packager/react-packager/src/Activity/index.js##
- ##js/react-native-github/local-cli/util/log.js##
- ##https://www.npmjs.com/package/progress##

This diff also adds a ##silent## option to the packager ##Server##, which, when ##true##, will not create a ##progress## instance for the transformer.

Reviewed By: martinbigio

Differential Revision: D3048739

fb-gh-sync-id: a4c6caf36f5127946593f4a0a349fa145ad0d4e6
shipit-source-id: a4c6caf36f5127946593f4a0a349fa145ad0d4e6
2016-03-15 12:10:31 -07:00
Alexander Andersson 09820cbe36 GeoLocation timeout never called on android
Summary:Don't add systems current time to the `timeout` option. This is already correct on iOS.
Closes https://github.com/facebook/react-native/pull/6376

Differential Revision: D3053728

Pulled By: mkonicek

fb-gh-sync-id: 919068659d0d23906d8a6d85df7819296460b719
shipit-source-id: 919068659d0d23906d8a6d85df7819296460b719
2016-03-15 11:55:32 -07:00
Kevin Stumpf 3e760f48c5 Android support for perspective transform
Summary:- Motivation: ["Perspective" Transform](https://facebook.github.io/react-native/docs/transforms.html#proptypes) was so far supported only on iOS
- Closes #2915
- Test Plan: I built a [react-native-flip-view](https://github.com/DispatcherInc/react-native-flip-view) and ensured that the same perspective transform results in the same camera perspective on both iOS and Android:

![image](https://cloud.githubusercontent.com/assets/7293984/13342624/6556cfe0-dbf8-11e5-8fb2-05554a5081b7.png)

![image](https://cloud.githubusercontent.com/assets/7293984/13342677/daf90560-dbf8-11e5-9941-2ae0f9f9d99b.png)
Closes https://github.com/facebook/react-native/pull/6159

Differential Revision: D3053532

Pulled By: mkonicek

fb-gh-sync-id: a39a9fbafe0fc7c648fdafc2eb69f651fe58d9fb
shipit-source-id: a39a9fbafe0fc7c648fdafc2eb69f651fe58d9fb
2016-03-15 11:52:22 -07:00
Alexey Dodonov cc2068e201 Backed out changeset 183744d2415b
Reviewed By: nicklockwood

Differential Revision: D3053067

fb-gh-sync-id: de20718b5bf82eae433637847143e32b7a4bb216
shipit-source-id: de20718b5bf82eae433637847143e32b7a4bb216
2016-03-15 11:49:28 -07:00
Martin Konicek fe7fcdb227 Update PR and issue guidelines
Reviewed By: mkonicek

Differential Revision:D3054017
Ninja: oss only

fb-gh-sync-id: df545cb45ae8de3f56f671b06cab84b1f947a01c
shipit-source-id: df545cb45ae8de3f56f671b06cab84b1f947a01c
2016-03-15 11:49:28 -07:00
Konstantin Raev 64991493a8 Merge pull request #6470 from bestander/no-shrink-wrap
removed npm-shrinkwrap.json
2016-03-15 16:40:03 +00:00
Konstantin Raev 2134c2cd85 removed npm-shrinkwrap.json because it causes problems when passed to npm publish. Instead a new shrinkwrap will be generated by CI during publish, without dev deps 2016-03-15 16:38:28 +00:00
Konstantin Raev ceb6bd5272 Npm publish
Summary:This work allows automated release deployment.

Previous semi-automation lived in release.sh and I split it into two pieces:
- test-manual-e2e.sh - that just tests that current commit is buildable and makes a quick e2e installation for manual testing
- publish-npm.js - that makes publish based on what current branch and tags are on commit that is tested/deployed by CI

This simplified `Releases.md` guide and requires you to just run
```
git checkout -b 0.22-stable
git tag v0.22.0-rc
git push origin 0.22-stable --tags
```
to have a successful npm release.
Closes https://github.com/facebook/react-native/pull/6453

Reviewed By: mkonicek

Differential Revision: D3047938

Pulled By: bestander

fb-gh-sync-id: dbebf4c3a0bc2c2a0ef75c54595ab5654f91b8ea
shipit-source-id: dbebf4c3a0bc2c2a0ef75c54595ab5654f91b8ea
2016-03-15 09:22:26 -07:00
David Aurelio d0cdabc73e Don't prepend the asset name string with "file://" for unbundles
Summary: D2922108 / PR #5814 broke the “Unbundle” loader by prepending the file path to the entry file with "file://". This converts it back.

Reviewed By: lexs

Differential Revision: D3052749

fb-gh-sync-id: 0b241c50e25f1a1c85265915bee01582d0ba7ac6
shipit-source-id: 0b241c50e25f1a1c85265915bee01582d0ba7ac6
2016-03-15 08:12:29 -07:00
Dave Miller 39fdce259d Refactor JS touch dispatch from ReactRootView
Reviewed By: andreicoman11

Differential Revision: D3035589

fb-gh-sync-id: a4af7b0be89e5ea13367481697ff4b3dda8536b1
shipit-source-id: a4af7b0be89e5ea13367481697ff4b3dda8536b1
2016-03-15 07:29:30 -07:00
Christopher Dro e674e45c2e Reverted commit D3040735
Summary:This is a follow up of 9b87e6c860.

- Allows custom headers on connection request
- Adds a default `origin` header to Android, just like iOS

**Introduces no breaking changes.**

I was working on something similar and would like to propose a few changes that make the API more consistent across both iOS and Android platforms and brings this closer to [spec](https://tools.ietf.org/html/rfc6455).

I believe aprock first implementation of adding custom `headers` was correct. It makes sense naming this argument `headers` since we have no other general options available, and the current `options` field is being used to pass in a header anyway.

My use case for custom headers was attaching a token to the `Authorization` header on the connection request. I have been testing this by passing a JWT inside the `Authorization` header and verifying it on the server before establishing a connection.
Closes https://github.com/facebook/react-native/pull/6016

Differential Revision: D3040735

fb-gh-sync-id: 183744d2415b895f9d9fd8ecf6023a546e18a546
shipit-source-id: 183744d2415b895f9d9fd8ecf6023a546e18a546
2016-03-15 07:20:26 -07:00
Pieter De Baets b653d43e2e Update Dimensions when device orientation changes
Reviewed By: nicklockwood

Differential Revision: D2939877

fb-gh-sync-id: ec6161448bff34c07b93f19e1ee953657675bad5
shipit-source-id: ec6161448bff34c07b93f19e1ee953657675bad5
2016-03-15 05:49:25 -07:00
Alexey Lang f6853b8eac Add more performance logs and improve Systrace support
Reviewed By: tadeuzagallo

Differential Revision: D3040998

fb-gh-sync-id: c5ab4e5bcc073f94a2d309bfa7698919cf7e8856
shipit-source-id: c5ab4e5bcc073f94a2d309bfa7698919cf7e8856
2016-03-15 05:41:28 -07:00
David Aurelio f87b673a29 Add possibility to `console.error`/redbox on promise rejections
Summary: Adds a possibility to `console.error` / redbox if any promise is rejected.

Differential Revision: D3048130

fb-gh-sync-id: b1a44b421ec3b1f7913226c86b2a48f00f27b105
shipit-source-id: b1a44b421ec3b1f7913226c86b2a48f00f27b105
2016-03-15 05:22:22 -07:00
Christopher Dro 205b5d4732 Update options parameter to headers. Update to spec.
Summary:This is a follow up of 9b87e6c860.

- Allows custom headers on connection request
- Adds a default `origin` header to Android, just like iOS

**Introduces no breaking changes.**

I was working on something similar and would like to propose a few changes that make the API more consistent across both iOS and Android platforms and brings this closer to [spec](https://tools.ietf.org/html/rfc6455).

I believe aprock first implementation of adding custom `headers` was correct. It makes sense naming this argument `headers` since we have no other general options available, and the current `options` field is being used to pass in a header anyway.

My use case for custom headers was attaching a token to the `Authorization` header on the connection request. I have been testing this by passing a JWT inside the `Authorization` header and verifying it on the server before establishing a connection.
Closes https://github.com/facebook/react-native/pull/6016

Differential Revision: D3040735

Pulled By: nicklockwood

fb-gh-sync-id: f81bd14ccbdba36309b9d4b4850fb66fe4deae11
shipit-source-id: f81bd14ccbdba36309b9d4b4850fb66fe4deae11
2016-03-15 05:14:21 -07:00
Alexey Lang 79d6ced103 Improve Systrace support
Reviewed By: javache

Differential Revision: D3041704

fb-gh-sync-id: 11df4570988a6fa31beb5ab34b92debb63fade4c
shipit-source-id: 11df4570988a6fa31beb5ab34b92debb63fade4c
2016-03-15 05:01:24 -07:00
Morgan Pretty 2605a2299f Actually use the 'defaultValue' property in AlertViewIOS.
Summary:The AlertViewIOS component takes in a 'defaultValue' for the text input but never actually sets it, this PR actually sets the value.
Closes https://github.com/facebook/react-native/pull/6257

Differential Revision: D3052412

Pulled By: nicklockwood

fb-gh-sync-id: 32285330f17ccf47189dbc8fcab48f3712fee59b
shipit-source-id: 32285330f17ccf47189dbc8fcab48f3712fee59b
2016-03-15 04:26:25 -07:00
aleclarsoniv 64a09feaf7 Add 'props.lineBreakMode' to Text
Summary:I've tested this manually, but I'm not sure how to write a test for this. Hopefully someone can help out there. The least I could do is provide a starting point for a PR to be accepted.

Additionally, I've renamed the existing `NSLineBreakMode` enum converter (inside `RCTConvert`) to use dashes in the names instead of camelcase (eg: `word-wrapping` instead of `wordWrapping`).

Fixes #6338
Closes https://github.com/facebook/react-native/pull/6339

Differential Revision: D3052391

Pulled By: nicklockwood

fb-gh-sync-id: 1536dfc139d7995095e9ee9d5f13ca86f90783c5
shipit-source-id: 1536dfc139d7995095e9ee9d5f13ca86f90783c5
2016-03-15 04:16:30 -07:00
Mike Grabowski 6481e0ea6a Setup RCTNativeAppEventEmitter on init
Summary: Fixes #6227 as discussed in FB group, also a follow up to ide commit 6ec4d65aec

Differential Revision: D3041185

Pulled By: javache

fb-gh-sync-id: 544c55b14d238eb8bfed3ab1588c6e48d164943e
shipit-source-id: 544c55b14d238eb8bfed3ab1588c6e48d164943e
2016-03-15 03:45:33 -07:00
Tim Yung 0f1bc36e61 RN: Consistent NPM Shrinkwrap
Reviewed By: cpojer

Differential Revision: D3051318

fb-gh-sync-id: f23c2f6fd0e0a265b23322b0c6b79c5227b6c84b
shipit-source-id: f23c2f6fd0e0a265b23322b0c6b79c5227b6c84b
2016-03-14 21:41:20 -07:00
Christoph Pojer 11342f284a Update Jest to 0.9.0
Reviewed By: yungsters, voideanvalue

Differential Revision: D3050870

fb-gh-sync-id: c0b83f836eb1e522c01d01b2434880358b71b5ec
shipit-source-id: c0b83f836eb1e522c01d01b2434880358b71b5ec
2016-03-14 18:53:25 -07:00
Chris Geirman afffcde15c add examples that demonstrate how to use mergeItem, multiMerge, multi…
Summary:Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

it wasn't clear how to use various methods such as mergeItem, multiMerge, etc, so after figuring it out I thought it would be useful to provide clear examples for others.

Example: When "Adding a function to do X", explain why it is necessary to have a way to do X.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

See the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

…Set, multiGet, and multiRemove
Closes https://github.com/facebook/react-native/pull/6423

Differential Revision: D3048502

Pulled By: vjeux

fb-gh-sync-id: dfe13c6a88fa9d3e7646b5ecaa5f594bfaba8271
shipit-source-id: dfe13c6a88fa9d3e7646b5ecaa5f594bfaba8271
2016-03-14 17:38:22 -07:00
David Aurelio bff0b1f9d6 Use numeric module IDs for iOS RA-bundles
Summary:Use the new numeric module IDs for indexed-file random access bundles, rather than string-based module names

This still uses those IDs as strings in the table, to make this bundle format work again.

Reviewed By: martinbigio

Differential Revision: D3050337

fb-gh-sync-id: f8da69cdbafd1b093a71474698796be5d21fc4f6
shipit-source-id: f8da69cdbafd1b093a71474698796be5d21fc4f6
2016-03-14 17:21:19 -07:00
David Aurelio 06b5bda349 Bring back "Use numeric identifiers when building a bundle"
Summary:This brings back "Use numeric identifiers when building a bundle", previously backed out.
This version passes on the correct entry module name to code that decides transform options.

Original Description:
Since the combination of node and haste modules (and modules that can be required as both node and haste module) can lead to situations where it’s impossible to decide an unambiguous module identifier, this diff switches all module ids to integers. Each integer maps to an absolute path to a JS file on disk.

We also had a problem, where haste modules outside and inside node_modules could end up with the same module identifier.

This problem has not manifested yet, because the last definition of a module wins. It becomes a problem when writing file-based unbundle modules to disk: the same file might be written to concurrently, leading to invalid code.

Using indexed modules will also help indexed file unbundles, as we can encode module IDs as integers rather than scanning string IDs.

Reviewed By: martinbigio

Differential Revision: D2855202

fb-gh-sync-id: 9a011bc403690e1522b723e5742bef148a9efb52
shipit-source-id: 9a011bc403690e1522b723e5742bef148a9efb52
2016-03-14 16:17:20 -07:00
Zen Xu e1e86a1174 Remove okhttp from release build for Instagram
Reviewed By: hendritan

Differential Revision: D3044625

fb-gh-sync-id: 0ae66187d9fe3d59b002f603fc73c0758640e287
shipit-source-id: 0ae66187d9fe3d59b002f603fc73c0758640e287
2016-03-14 16:14:25 -07:00
Szabó Krisztián 265b63866a Fix typo in ScrollView childLayoutProps error message
Summary:Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Example: When "Adding a function to do X", explain why it is necessary to have a way to do X.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

See the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
Closes https://github.com/facebook/react-native/pull/6454

Differential Revision: D3049074

Pulled By: sahrens

fb-gh-sync-id: 61d085bb5c7bedf80204cdfb94e5c23542e15333
shipit-source-id: 61d085bb5c7bedf80204cdfb94e5c23542e15333
2016-03-14 14:35:27 -07:00
sunnylqm e6343a83e2 Update index.js using ES6
Summary:To unify and advocate ES6
Closes https://github.com/facebook/react-native/pull/6319

Differential Revision: D3048141

Pulled By: vjeux

fb-gh-sync-id: 114c782480f08125cd90ba4aaaaab01d2b574929
shipit-source-id: 114c782480f08125cd90ba4aaaaab01d2b574929
2016-03-14 11:55:31 -07:00
Chris Hopman 872b697730 Add support for multiple js contexts
Reviewed By: mhorowitz

Differential Revision: D3035333

fb-gh-sync-id: f829702992cd717acd1eb105b3dcc8abdbc6dc74
shipit-source-id: f829702992cd717acd1eb105b3dcc8abdbc6dc74
2016-03-14 11:38:57 -07:00
David Aurelio 9d33905786 Move name resolution of inversed dependencies to HMR server
Summary:Name resolution of inversed dependencies used to happen in node-haste, but that makes it difficult switiching to numeric module IDs.
This moves the name resolution to the HMR server in order to be able to change the logic more easily.

node-haste 2.9.0 provides a `Map` of modules to `Set`s that contain the modules that depend on the key.

Reviewed By: martinbigio

Differential Revision: D3047414

fb-gh-sync-id: b98accea901d4da209dc4434ab111eb07ce9e2a0
shipit-source-id: b98accea901d4da209dc4434ab111eb07ce9e2a0
2016-03-14 08:56:28 -07:00
David Aurelio 11202a77a3 Update node-haste to v2.9.0
Reviewed By: martinbigio

Differential Revision: D3047397

fb-gh-sync-id: 1b2d2d0a38be97cb1ac127375305cf39ab302845
shipit-source-id: 1b2d2d0a38be97cb1ac127375305cf39ab302845
2016-03-14 08:56:23 -07:00
Wei Yeh 7fbaf0a89d nit: Fixed extra space before > in Accessibility documentation
Summary:TSIA
Closes https://github.com/facebook/react-native/pull/6432

Differential Revision: D3047376

Pulled By: mkonicek

fb-gh-sync-id: 1f88b3be72c72234764b2b7dec034dea62533e97
shipit-source-id: 1f88b3be72c72234764b2b7dec034dea62533e97
2016-03-14 08:02:24 -07:00
Aaron Chiu b006f79bf5 make Activity reference in ReactContext WeakReference
Reviewed By: andreicoman11

Differential Revision: D3040724

fb-gh-sync-id: fef5a84907d22d07ae1df82f5d1071c8fae45420
shipit-source-id: fef5a84907d22d07ae1df82f5d1071c8fae45420
2016-03-14 07:51:26 -07:00
Nick Lockwood 688bb17777 Fixed sticky header touch handling bug
Summary:In order to ensure that the docked sticky header in a ListView receives touches correctly, RCTScrollView has a custom hitTest implementation that checks the sticky headers for touches prior to checking any other views.

There was a bug in this implementation that meant that sticky views would get touch priority even if the touch was outside the bounds of the scrollView. This meant that sticky headers that scrolled off the top of the list would intercept touches intended for views placed above the scrollView.

This diff fixes that bug by checking that the touch is inside the scrollview before checking for sticky header touches. I've also limited the custom hit test logic to just the currently docked header, as the other sticky header views do not require special treatment.

Reviewed By: javache

Differential Revision: D3041236

fb-gh-sync-id: a2a3474dda03d5b51688bd575195a67956184bbe
shipit-source-id: a2a3474dda03d5b51688bd575195a67956184bbe
2016-03-14 04:08:21 -07:00
James Ide 9a8ac9dd11 Add a test for RCTBridgeModules that aren't auto-exported
Summary:Adds a test so that people can create RCTBridgeModules that aren't auto-exported. This is useful for when you have more than one RCTBridge and want a module to be exposed in one but not the other.

RCTBridge/RCTBatchedBridge already supports this functionality; this diff adds a test so that it doesn't break.
Closes https://github.com/facebook/react-native/pull/6424

Differential Revision: D3044959

Pulled By: nicklockwood

fb-gh-sync-id: f8977249b1bf4023e704be6422ad77372d8f1714
shipit-source-id: f8977249b1bf4023e704be6422ad77372d8f1714
2016-03-14 03:46:26 -07:00
Janic Duplessis bcd3c02ae4 Improve website menu on mobile
Summary:Update the layout of the navbar on mobile.

![image](https://cloud.githubusercontent.com/assets/2677334/13731791/a95ab05a-e948-11e5-837e-ca14c96abb1f.png)

**Test plan (required)**

Tested locally in mobile chrome and safari.
Closes https://github.com/facebook/react-native/pull/6438

Differential Revision: D3046701

Pulled By: vjeux

fb-gh-sync-id: 5c8e10867160db584a9055b29f9dd54e4a4d028f
shipit-source-id: 5c8e10867160db584a9055b29f9dd54e4a4d028f
2016-03-13 19:38:26 -07:00
Martín Bigio f99468de65 Sourcemaps support for RAM
Summary:This rev adds support for production sourcemaps on RAM.

When we inject a module into JSC we use the original `sourceURL` and specify the `startingLineNumber` of the module relative to a "regular" bundle. By doing so, when an error is thrown, JSC will include the provided `sourceURL` as the filename and will use the indicated `startingLineNumber` to figure out on which line the error actually occurred.

To make things a bit simpler and avoid having to deal with columns, we tweak the generated bundle so that each module starts on a new line. Since we cannot assure that each module's code will be on a single line as the minifier might break it on multiple (UglifyJS does so due to a bug on old versions of Chrome), we include on the index the line number that should be used when invoking `JSEvaluateScript`. Since the module length was not being used we replaced the placeholder we have there for the line number.

Reviewed By: javache

Differential Revision: D2997520

fb-gh-sync-id: 3243a489cbb5b48a963f4ccdd98ba63b30f53f3f
shipit-source-id: 3243a489cbb5b48a963f4ccdd98ba63b30f53f3f
2016-03-13 11:14:32 -07:00
Martín Bigio 7338c5704e Random Access Modules native infra
Summary:At the moment, to initialize a React Native app, the entire JS bundle needs to be loaded. Parsing JS code takes a while which makes paying for every feature the app has very expensive on start up. Even worse, as the bundle gets bigger and bigger because the app has more and more features, start up time becomes slower.

This rev introduces the few remaining pieces of infrastructure to load JS modules incrementally. This way, on start up we only inject into JSC the modules we actually need. More importantly, by using this piece of infrastructure, the app start up time won't be affected as the JS bundle increases it's size.

Props to davidaurelio and tadeuzagallo for the original work. I'm just wrapping their work.

Differential Revision: D2995425

fb-gh-sync-id: caaaa880b5370c3bb36a11ae694dc303cd53d0e2
shipit-source-id: caaaa880b5370c3bb36a11ae694dc303cd53d0e2
2016-03-13 11:14:26 -07:00
Janic Duplessis 88ebdb2a65 RefreshControl refreshing prop and doc improvements
Summary:This makes the `refreshing` prop more 'controlled'. Before forgetting to set the refreshing prop in the onRefresh callback would make the js and native `refreshing` prop get out of sync and make the RefreshControl stop refreshing properly (see #5839).

I also added a simple usage example and a note about the refreshing prop in the doc.

There was also a small bug in the doc generation code that made the array of color show as [[object Object]] instead of [color] so I fixed that too.

** Test plan**
Tested using the UIExplorer example on iOS and Android. Not setting the `refreshing` prop to true in the `onRefresh` function should cause the RefreshControl to stop refreshing immediately and continue working properly after.

Closes #5839
Closes https://github.com/facebook/react-native/pull/6434

Differential Revision: D3046279

Pulled By: nicklockwood

fb-gh-sync-id: ebda04c659a10f0b9d468473c8d5c659256ca1b5
shipit-source-id: ebda04c659a10f0b9d468473c8d5c659256ca1b5
2016-03-13 03:04:24 -07:00
Martín Bigio 972395a7c9 Unbreak HMR listener
Reviewed By: sam-swarr

Differential Revision: D3042801

fb-gh-sync-id: 2f06f2efbdf3d04ce4db0cf847ebe76d05fb109f
shipit-source-id: 2f06f2efbdf3d04ce4db0cf847ebe76d05fb109f
2016-03-12 17:33:21 -08:00
Janic Duplessis cdb2d2ee79 Update outdated java custom view example on website
Summary:The custom java view example on the website frontpage was pretty outdated :)

**Test plan (required)**
Tested by running the website locally.
Closes https://github.com/facebook/react-native/pull/6435

Differential Revision: D3045976

fb-gh-sync-id: 7b9c48fe78988a7f2b329427a477a28abac99f11
shipit-source-id: 7b9c48fe78988a7f2b329427a477a28abac99f11
2016-03-12 16:47:21 -08:00
Gaëtan Renaudeau b5985cf690 Refactor bezier implementation from bezier-easing library
Summary:fast & accurate implementation
See https://github.com/gre/bezier-easing
the library is embedded in React Native

fixes #6207 & to follow #6340 (or to replace it)
cc vjeux

tests
 ---

[the lib tests](https://github.com/gre/bezier-easing/blob/master/test/test.js) ensure the library is accurate.
It is tested that the library have a precision better than ±0.000001 .

performance
 ---

On my macbook pro, [the lib benchmark](https://github.com/gre/bezier-easing/blob/master/benchmark.js) have:

```
BezierEasing: instanciation x 1,043,725 ops/sec ±1.46% (82 runs sampled)
BezierEasing: call x 7,866,642 ops/sec ±0.93% (85 runs sampled)
BezierEasing: instanciation + call x 803,051 ops/sec ±1.58% (74 runs sampled)
```
Closes https://github.com/facebook/react-native/pull/6433

Differential Revision: D3045854

Pulled By: vjeux

fb-gh-sync-id: b3c5dba19195a6719967b4fdc8ef940cc067b1f4
shipit-source-id: b3c5dba19195a6719967b4fdc8ef940cc067b1f4
2016-03-12 14:13:22 -08:00
Martín Bigio e82a7a8649 Avoid hardcoding platform on blacklist
Reviewed By: davidaurelio

Differential Revision: D3042906

fb-gh-sync-id: 4a424ef1012d75d06c830b284806aefd1556ff74
shipit-source-id: 4a424ef1012d75d06c830b284806aefd1556ff74
2016-03-12 10:59:26 -08:00
Dan Abramov 2e9c888dcd Update hot reloading dependencies
Summary:These updates include important changes to correctness in the linked and underlying packages:

* https://github.com/gaearon/babel-plugin-react-transform/releases/tag/v2.0.1
* https://github.com/gaearon/babel-plugin-react-transform/releases/tag/v2.0.2
* https://github.com/gaearon/react-proxy/releases/tag/v1.1.3
* https://github.com/gaearon/react-proxy/releases/tag/v1.1.4
* etc

We need to include these if we want to ship hot reloading.

Create a new project with those versions of packages.

<img width="761" alt="screen shot 2016-03-06 at 18 49 20" src="https://cloud.githubusercontent.com/assets/810438/13556222/2d45ca62-e3cc-11e5-8a3f-a2346efe19dd.png">

Verify hot reloading still works.

![](http://cl.ly/2J150y0Y3E1z/download/Screen%20Recording%202016-03-06%20at%2018.48.gif)

martinbigio skevy

I wasn’t sure whether to touch the shrinkwrap.
Closes https://github.com/facebook/react-native/pull/6325

Reviewed By: yungsters

Differential Revision: D3019470

Pulled By: martinbigio

fb-gh-sync-id: 99bad390cd898f58aa7f74494066561a81eb40e6
shipit-source-id: 99bad390cd898f58aa7f74494066561a81eb40e6
2016-03-11 16:28:21 -08:00