Commit Graph

4663 Commits

Author SHA1 Message Date
Satvik Jagannath 596109fa0a Fix THUMBNAILS to follow the require Syntax
Summary:
The THUMB_URLS is following the older syntax.
Fixed THUMBNAILS to follows require Syntax. And now you see the thumbnails appearing in the Sample app.
Closes https://github.com/facebook/react-native/pull/4995

Reviewed By: svcscm

Differential Revision: D2796019

Pulled By: nicklockwood

fb-gh-sync-id: c7be50d4dea73fc383db1c6b5a6afa7444505889
2015-12-30 14:50:29 -08:00
Nick Lockwood d7ad393f22 Fix unused argument warnings
Reviewed By: milend

Differential Revision: D2795407

fb-gh-sync-id: 83f5cc10b115eef3becb4ebab56b366f1a12a3ad
2015-12-30 14:16:29 -08:00
Satyajit Sahoo 81dc490ab3 Merge pull request #4828 from DougBanksPersonal/patch-1
Update EmbeddedAppIOS.md
2015-12-31 03:39:30 +05:30
DougBanksPersonal 3955bebb74 Update EmbeddedAppIOS.md 2015-12-30 14:06:54 -08:00
Satyajit Sahoo f93cf6ca19 Fix android activity template. Fixes #5030
Summary: Closes https://github.com/facebook/react-native/pull/5033

Reviewed By: svcscm

Differential Revision: D2794157

Pulled By: androidtrunkagent

fb-gh-sync-id: 9d30b3a661b18be31d246dc3f55c429cc4b51a8a
2015-12-30 13:23:31 -08:00
Ben Alpert 71723ec3ec Fix path to react in shrinkwrap
Summary:
Oops. This breaks npm install in OSS.

public

Reviewed By: bestander

Differential Revision: D2795946

fb-gh-sync-id: 949755feafdd00482ba58b9553d07886e21625f0
2015-12-30 13:08:31 -08:00
Ben Alpert 6a838a4201 Consume react, fbjs from npm
Summary:
We don't (yet) treat these the same as any other modules because we still have special resolution rules for them in the packager allowing the use of `providesModule`, but I believe this allows people to use npm react in their RN projects and not have duplicate copies of React. Fixes facebook/react-native#2985.

This relies on fbjs 0.6, which includes `.flow` files alongside the `.js` files to allow them to be typechecked without additional configuration. This also uses react 0.14.5, which shims a couple of files (as `.native.js`) to avoid DOM-specific bits. Once we fix these in React, we will use the same code on web and native. Hopefully we can also remove the packager support I'm adding here for `.native.js`.

This diff is not the desired end state for us – ideally the packager would know nothing of react or fbjs, and we'll get there eventually by not relying on `providesModule` in order to load react and fbjs modules. (fbjs change posted here but not merged yet: https://github.com/facebook/fbjs/pull/84.)

This should also allow relay to work seamlessly with RN, but I haven't verified this.

public

Reviewed By: sebmarkbage

Differential Revision: D2786197

fb-gh-sync-id: ff50f28445e949edc9501f4b599df7970813870d
2015-12-30 11:41:09 -08:00
Ben Alpert 5bf1f4c05e Install fbjs@0.6.0, react@0.14.4
Reviewed By: zpao

Differential Revision: D2794354

fb-gh-sync-id: 57f5bc4ded5cc7eee17debdac76dc2934071dd54
2015-12-30 11:41:01 -08:00
Konstantin Raev 88baaa1239 increased stability of circleCI e2e tests
Summary:
Out of 57 builds in the 5 days during Christmas only 15 were successful.
15 of the failed ones were caused by `com.android.ddmlib.ShellCommandUnresponsiveException` when running unstrumentation tests.
Another 10 were because of crashes probably related to memory usage.

This PR follows ideas from https://github.com/Originate/guide/blob/master/android/guide/Continuous%20Integration.md

So far I've made 6 successful builds with this setup.
Need to run it for a few more days to get accurate stats.
Closes https://github.com/facebook/react-native/pull/5021

Reviewed By: svcscm

Differential Revision: D2795713

Pulled By: androidtrunkagent

fb-gh-sync-id: 33373fed7ca7c5fb83b35cf551f8501286e33d7b
2015-12-30 11:39:32 -08:00
Nick Lockwood f9ad70bd81 Fix UIExplorer list
Summary:
public
On fresh install, UIExplorer produces a blank list due to the search text being null. This fixes that by replacing the null with an empty string.

Reviewed By: milend

Differential Revision: D2795411

fb-gh-sync-id: 4bdde5d4f9e88dd933c7946dcbfb8b591a54baf6
2015-12-30 10:43:36 -08:00
Martín Bigio e798817e5a Yellow boxes for HMR errors
Reviewed By: vjeux

Differential Revision: D2795143

fb-gh-sync-id: fd5c92af511258bb1252d991e994a8c37657644e
2015-12-30 10:08:29 -08:00
wvengen 494d607e28 Improve watcher timeout error message (fixes #5005)
Summary: Closes https://github.com/facebook/react-native/pull/5022

Reviewed By: svcscm

Differential Revision: D2793185

Pulled By: milend

fb-gh-sync-id: ec49d27d6e405924269a48f32cce401b1ce380f6
2015-12-30 08:19:32 -08:00
olivier notteghem 5bc45f1881 improve navigation and tail fetch logging
Reviewed By: nspaun

Differential Revision: D2791366

fb-gh-sync-id: 5cacc34ef29630437e82b1fab18c928c8794d551
2015-12-30 05:08:25 -08:00
Mike Armstrong 8cabdbae1e Report jsc memory information to fbsystrace
Reviewed By: jspahrsummers

Differential Revision: D2789593

fb-gh-sync-id: e31d5f174b9cf896ce3be6431d81264d1d240fdb
2015-12-29 23:37:39 -08:00
Ben Alpert fe07a9c576 Update Object.assign non-object error message
Summary:
These are the sources, not the target. Copy pasta from above.
Closes https://github.com/facebook/react-native/pull/4989

Reviewed By: svcscm

Differential Revision: D2795198

Pulled By: spicyj

fb-gh-sync-id: 61c52add02cb877284fbf62a4344361b5bf44515
2015-12-29 23:09:29 -08:00
Mike Armstrong dfcc4f8ad5 Log Memory tags using LegacyProfiler
Reviewed By: jspahrsummers

Differential Revision: D2789647

fb-gh-sync-id: 220a0fc4eccccd92a6b8f45b07b32735a7054614
2015-12-29 22:12:30 -08:00
Andy Street 322a77340c WebWorkers: Add APIs for working with JSObjectRef
Reviewed By: lexs

Differential Revision: D2779267

fb-gh-sync-id: 8aee2aee3ca4d1119576494caa39010e854b92a6
2015-12-29 19:51:36 -08:00
Andy Street 690eb08e63 WebWorkers: Extract evaluateScript logic to JSCHelpers
Reviewed By: lexs

Differential Revision: D2779277

fb-gh-sync-id: ab9a040193f36f40a4a34229a4a90199537253aa
2015-12-29 19:48:35 -08:00
Andy Street a68f8f4224 WebWorkers: Add APIs for working with JSObjectRef
Reviewed By: lexs

Differential Revision: D2779267

fb-gh-sync-id: 5c5a49988a1d501f15e5033b2dd5b528d97d96ed
2015-12-29 19:48:29 -08:00
Martín Bigio e75e861116 Make Hot Loading faster
Summary:
public

Before this this when a file was changed besides sending the HMR update we rebuild every single bundle that the packager had build (to serve it faster when the user hit cmd+r). Since when hot loading is enabled we don't do cmd+r all this work was pointless (except for when you're developing multiple apps using the same packager instance at the same time, which we can assume is very uncommon). As a consequence, the HMR update was competing with the rebundling job making HMR quite slow (i.e.: on one huge internal app it took up to 6s for the HMR changes to get applied).

So, this diff tweaks the file change listener so that we don't rebundle nor invoke the fileWatchers (use for live reload which is also useless when hot load is enabled) when hot loading is enabled. Also, it makes the HMR listener more high pri than the other listeners so that the HMR dev experience is as good as it can get.

Reviewed By: vjeux

Differential Revision: D2793827

fb-gh-sync-id: 724930db9f44974c15ad3f562910b0885e44efde
2015-12-29 18:25:40 -08:00
Martín Bigio b5081abae3 Send HMR updates only for files on the bundle
Summary:
public

Compute the dependencies of the bundle entry file just before sending HMR updates. In case the file that was changed doesn't belong to the bundle bail.

Reviewed By: vjeux

Differential Revision: D2793736

fb-gh-sync-id: f858e71b0dd5fe4f5b2307a22c6cef627eb66a22
2015-12-29 18:25:35 -08:00
Martín Bigio 5f850fbede Pipe `platform` and `bundleEntry` through WebSocket connection
Reviewed By: vjeux

Differential Revision: D2793572

fb-gh-sync-id: 6ce2467b8d528d1a91c1b4fc51741f2502674022
2015-12-29 18:25:28 -08:00
Satyajit Sahoo dd8e1f91d8 Merge pull request #4994 from genki/patch-2
Update showcase.js
2015-12-30 04:29:23 +05:30
Brent Vatne fef01ed394 ScrollWithouth => ScrollWithout
Summary:
Oops!
Closes https://github.com/facebook/react-native/pull/5029

Reviewed By: svcscm

Differential Revision: D2793490

Pulled By: vjeux

fb-gh-sync-id: 0115d3ef38cad3e838241937263308827e56f25f
2015-12-29 12:42:26 -08:00
Martín Bigio d1864fa436 Improve error wording
Reviewed By: frantic

Differential Revision: D2793300

fb-gh-sync-id: f3f9403ee332d193b8a6c4a6dfb89d636dc48875
2015-12-29 11:36:32 -08:00
Martin Bigio 041b1c5e52 Add `RCTBundleURLProcessor` files to Xcode project
Summary: Closes https://github.com/facebook/react-native/pull/5028

Reviewed By: svcscm

Differential Revision: D2793266

Pulled By: martinbigio

fb-gh-sync-id: 6d9ca5bf0391a47d25948ce29282f21c0930db3a
2015-12-29 11:05:42 -08:00
Christopher Chedeau 93f3aa8a82 Merge pull request #5027 from skevy/algolia
[Website] Adding Algolia Doc Search
2015-12-29 09:46:47 -08:00
Adam Miskiewicz cc1bad54ea [Website] First pass at Algolia Doc Search
It’s not yet responsive :(
2015-12-29 12:45:33 -05:00
Adam Miskiewicz 4963225295 [Website] Fixing JS error 2015-12-29 12:45:29 -05:00
Martín Bigio 52b248426e Fix Shrinkwrap & package.json
Reviewed By: vjeux

Differential Revision: D2791699

fb-gh-sync-id: 180687718ded0f4c4078ccf56ca0eb114966c8bf
2015-12-29 09:11:29 -08:00
Brent Vatne c9ccf1fe4c Merge pull request #4984 from sunnylqm/patch-1
add community translation links
2015-12-28 21:06:08 -08:00
Brent Vatne 33d6293c60 Update KnownIssues.md 2015-12-28 17:51:30 -08:00
Martín Bigio e43e2146d9 Gate Hot Loading
Summary:
public

Until we support this fature on OSS, don't show the menu option.

Reviewed By: vjeux

Differential Revision: D2791198

fb-gh-sync-id: 11b66d467c1ab784bbf549b893d0a3abd69e2741
2015-12-28 16:45:07 -08:00
Martín Bigio 4ffb241647 Hot Loading E2E basic flow
Summary:
public

Implement all the necessary glue code for several diffs submitted before to get Hot Loading work end to end:

- Simplify `HMRClient`: we don't need to make it stateful allowing to enable and disable it because both when we enable and disable the interface we need to reload the bundle.
- On the native side we introduced a singleton to process the bundle URL. This new class might alter the url to include the `hot` attribute. I'm not 100% sure this is the best way to implement this but we cannot use `CTLSettings` for this as it's are not available on oss and I didn't want to contaminate `RCTBridge` with something specific to hot loading. Also, we could potentially use this processor for other things in the future. Please let me know if you don't like this approach or you have a better idea :).
- Use this processor to alter the default bundle URL and request a `hot` bundle when hot loading is enabled. Also make sure to enable the HMR interface when the client activates it on the dev menu.
- Add packager `hot` option.
- Include gaeron's `react-transform` on Facebook's JS transformer.

The current implementation couples a bit React Native to this feature because `react-transform-hmr` is required on `InitializeJavaScriptAppEngine`. Ideally, the packager should accept an additional list of requires and include them on the bundle among all their dependencies. Note this is not the same as the option `runBeforeMainModule` as that one only adds a require to the provided module but doesn't include all the dependencies that module amy have that the entry point doesn't. I'll address this in a follow up task to enable asap hot loading (9536142)

I had to remove 2 `.babelrc` files from `react-proxy` and `react-deep-force-update`. There's an internal task for fixing the underlaying issue to avoid doing this horrible hack (t9515889).

Reviewed By: vjeux

Differential Revision: D2790806

fb-gh-sync-id: d4b78a2acfa071d6b3accc2e6716ef5611ad4fda
2015-12-28 16:44:59 -08:00
Martín Bigio 24c908e794 Dependencies for Hot Loading
Reviewed By: vjeux

Differential Revision: D2789683

fb-gh-sync-id: 6c8f5a601040505eb597db3d6f50ec6abaa6cd6e
2015-12-28 16:44:52 -08:00
Martín Bigio 245065be87 Introduce HMR runtime
Summary:
public

Add a very simple runtime for self-accepting modules. The API is the same one as Webpacks's one for now.
The new infra will be end-to-end tested on a follow up diff.

Reviewed By: vjeux

Differential Revision: D2789428

fb-gh-sync-id: c39524814d53c6e4ec9d9d011081ea81089b00b6
2015-12-28 16:44:45 -08:00
Martín Bigio ac9c3c548d Make Packager send fresh modules through HMR interface
Reviewed By: frantic

Differential Revision: D2787951

fb-gh-sync-id: 63c04710b60d99b5161ef9a40b116ba2f72df745
2015-12-28 16:44:38 -08:00
Martín Bigio 90781d3067 Introduce Packager and App HMR WebSocket connection
Summary:
public

This diff adds infra to both the Packager and the running app to have a WebSocket based connection between them. This connection is toggled by a new dev menu item, namely `Enable/Disable Hot Loading`.

Reviewed By: vjeux

Differential Revision: D2787621

fb-gh-sync-id: d1dee769348e4830c28782e7b650d025f2b3a786
2015-12-28 16:44:32 -08:00
Christopher Chedeau f72cfdd9fa Merge pull request #5009 from magus/website-docs
Docs for website setup
2015-12-28 12:58:01 -08:00
Noah Jorgenson dfa541a050 Docs for website setup
- always start website/setup.sh in website
- use setup.sh in website README
2015-12-28 12:47:09 -08:00
sunnylqm 8080583f52 update description about removeClippedSubviews
Summary: Closes https://github.com/facebook/react-native/pull/4998

Reviewed By: svcscm

Differential Revision: D2790689

Pulled By: androidtrunkagent

fb-gh-sync-id: 2db476eabe067fd770b6acce47b62607df348052
2015-12-28 07:56:28 -08:00
sunnylqm 58bbd7bc5b Hint for passing navigator in renderScene
Summary: Closes https://github.com/facebook/react-native/pull/4999

Reviewed By: svcscm

Differential Revision: D2790687

Pulled By: androidtrunkagent

fb-gh-sync-id: af055123b351e37081a37d6153333666a878113c
2015-12-28 06:39:32 -08:00
Genki Takiuchi 315180dd90 Update showcase.js
Added a link to android app of DockMan.
2015-12-28 16:39:50 +09:00
Satyajit Sahoo 23de42ba3f Merge pull request #4206 from mrcasals/fix_docs
Add Switch docs
2015-12-27 21:03:43 +05:30
Tadeu Zagallo f546dc3790 Move WPO to the minify step
Summary:
public

The Whole Program Optimisation (WPO) pass is quite slow, and can make it painful
to iterate when having `dev=false`. Move it to happen only when both `dev=false` and `minify=true`.

Reviewed By: davidaurelio

Differential Revision: D2773941

fb-gh-sync-id: ac5ca4e1286e233c2d175eecdbf7494d5d3497b2
2015-12-27 06:01:30 -08:00
Satyajit Sahoo 739a6d6be1 Merge pull request #4957 from sunnylqm/patch-5
Use a better way to update react-native package
2015-12-26 23:39:55 +05:30
sunnylqm 1eb12b2fbf add community translation links
add community translation links to help spreading react-native!
2015-12-26 23:52:18 +08:00
sunnylqm 019c564941 use a better way to update react-native package 2015-12-26 23:09:14 +08:00
Satyajit Sahoo 28dc5263eb Merge pull request #4983 from sunnylqm/master
Add react-native version output for -v/--version
2015-12-26 20:30:15 +05:30
sunnylqm 1dea58c7df add react-native version output for -v/--version 2015-12-26 22:59:31 +08:00