Commit Graph

3286 Commits

Author SHA1 Message Date
Tadeu Zagallo 31f9a690f3 Flush queue every 5ms during JS execution
Summary: public

Implement the iOS side of the optmisation previously implemented in android
(D2485402)

Depends on D2540746

Reviewed By: javache

Differential Revision: D2541118

fb-gh-sync-id: f3590600a6defa2da75c5b7b2cced6ad8bfea6cb
2015-10-19 08:04:24 -07:00
Joe Noon 607527c0d4 (upstream) Prevent SocketRocket killing the connection before notifying of final messages
Summary: wrap NSStreamEventEndEncountered in dispatch_async _workQueue per upstream:
https://github.com/square/SocketRocket/pull/294

CLA completed
Closes https://github.com/facebook/react-native/pull/3493

Reviewed By: svcscm

Differential Revision: D2554892

Pulled By: javache

fb-gh-sync-id: 347a37eb95b20b7e92b985b6908e15462672e83c
2015-10-19 06:47:22 -07:00
Felix Oghină 9dc036d2b9 add gradle tasks for bundling js and assets in template
Summary: This adds gradle tasks that call `react-native bundle` with the correct args to bundle dev/release JS and assets. The dev task is disabled by default, as in dev mode people only use reload JS in most cases.

Submitting this as a pull request to have community visibility, although we have this code internally as well now and this will require an import.

* generate a project with `react-native init`, add some assets, run `./gradlew assembleRelease`, sign & zipalign generated APK, run it -> works
* enable dev bundling task, run `./gradlew installDebug` (not `react-native run-android` so as to not start the packager) -> works

Reviewed By: svcscm

Differential Revision: D2555071

Pulled By: foghina

fb-gh-sync-id: c3d9fcd4c77862e6a4db4e4d8d8cc39ee9dff3ab
2015-10-19 06:33:22 -07:00
Pieter De Baets 59e670e453 Fix a warning about SnapshotView
Reviewed By: majak

Differential Revision: D2553669

fb-gh-sync-id: 2a2b47f9cf7a75403e4e2541b32a4b141b3d08be
2015-10-19 06:10:22 -07:00
Felix Oghină b09e92e1b3 Merge pull request #3499 from willchu/master
Add LoadDocs to showcase
2015-10-19 12:15:15 +01:00
Felix Oghină 81317bd27a Merge pull request #3495 from dsandor/master
Clarified ReactInstanceManager paragraph.
2015-10-19 12:09:35 +01:00
James Ide 45d2c691a3 Start to use the Obj-C JSContext instead of the C API
Summary: The Obj-C API is usually easier to work with, and also makes it very easy to use the C API when necessary (performance, for example). This diff just switches the designated initializer of RCTContextExecutor to take a JSContext instead of JSGlobalContextRef, but the old initializer still works if needed.

I was doing some memory leak investigation and it is easier with ARC so I wanted to incrementally move the executor to Obj-C.
Closes https://github.com/facebook/react-native/pull/2159

Reviewed By: svcscm

Differential Revision: D2554890

Pulled By: tadeuzagallo

fb-gh-sync-id: 75b96d04cddff68fa3daf5d0fafdffad21dae307
2015-10-19 03:51:20 -07:00
Andrei Coman 716f7e8ef2 Don't use MotionEvent timestamp for touch events
Differential Revision: D2554905

fb-gh-sync-id: 7f83e94948cc9ac1024e249764d445fb056f400e
2015-10-19 03:08:23 -07:00
James Ide e3f33ea261 Merge pull request #3500 from jadekler/master
Small readme updates
2015-10-18 21:47:36 -07:00
Jean de Klerk 2be0525b2a Small readme updates
- Link for firefox react dev tools
- Add missing word
2015-10-18 19:00:38 -06:00
Will ec6d41414d add LoadDocs to showcase 2015-10-18 17:34:59 -07:00
David Sandor c0a2c96d9b Clarified ReactInstanceManager paragraph. 2015-10-18 15:55:21 -05:00
Brent Vatne 7827b35443 [Website] Update support section to link to Discord 2015-10-18 12:39:43 -07:00
Brent Vatne 3759511951 Merge pull request #3490 from hswolff/ios-device-docs
Update documentation with improved Cocoapods workflow
2015-10-18 12:02:51 -07:00
Brent Vatne e59b28e6ca [README] Link to Reactiflux Discord invite 2015-10-18 11:58:59 -07:00
Harry Wolff 6949be63e4 Update documentation with improved Cocoapods workflow 2015-10-18 09:48:48 -04:00
Nick Lockwood 16a48ae0c3 Fixed "Unrecognized request token" red box
Summary: public

There was a race condition issue in RCTDownLoadTask whereby the request handler would sometimes call one of the delegate methods before setup was complete, causing an error to be logged because the request token had not been set, and causing te request to fail because the class was not yet set up.

This diff fixes that issue by adding an explicit `start` method to RCTDownloadTask, and changing the setup order to allow for the request to call back immediately without this being treated as an error.

Reviewed By: tadeuzagallo

Differential Revision: D2553628

fb-gh-sync-id: 5ca4e791574a632ccbf2e873e28ac88bffdf851d
2015-10-17 09:34:23 -07:00
Andrei Coman f01272b031 Fix touches with pointer events backtrack
Differential Revision: D2553642

fb-gh-sync-id: b1788879bfbb564a291ada0e7ac206f567780f8a
2015-10-17 06:31:26 -07:00
Hedger Wang a2524bac33 Support nested navigation context.
Reviewed By: fkgozali

Differential Revision: D2525434

fb-gh-sync-id: 18e7d672b2cbadc318a207c8812f38d8669bad30
2015-10-17 04:25:26 -07:00
Martin Konicek dcd82a2450 Update RunningOnDeviceIOS.md 2015-10-17 11:26:58 +02:00
Brent Vatne b39b97546a [Docs] Add ViewPagerAndroid to extractDocs 2015-10-16 19:25:43 -07:00
Martín Bigio 8bff2d30ab Use `private-cli`'s server instead of `packager.js`
Reviewed By: vjeux

Differential Revision: D2542027

fb-gh-sync-id: e59f3be17590c1e256a903e04f2f0359c835c8b5
2015-10-16 15:01:23 -07:00
Martín Bigio 5977f494fc Allow user to configure transformer through cl argument
Reviewed By: frantic

Differential Revision: D2547435

fb-gh-sync-id: 77016ee5beba854a4cb58e9ac04b91a7dd76cf3e
2015-10-16 13:26:22 -07:00
James Ide 01f90054cc Merge pull request #3415 from exentrich/patch-1
Add Raindrop.io to showcase
2015-10-16 13:00:30 -07:00
Patrik Tomas Chamelo 1511d8ca1d Invoking devMenu from RCTBridge in prod will crash
Summary: While we shouldn't invoke `bridge.devMenu` in production, doing it will result into a crash.

1. `devMenu` internally calls `RCTBridgeModuleNameForClass([RCTDevMenu class])`
2. `RCTBridgeModuleNameForClass()` calls `moduleName`
3. In the release code `RCTDevMenu` doesn't export the `moduleName` class method.
Closes https://github.com/facebook/react-native/pull/2910

Reviewed By: svcscm

Differential Revision: D2550797

Pulled By: tadeuzagallo

fb-gh-sync-id: 5dfbf905e5a02d9fd3b52f8b3d6eefc4e3ff30b2
2015-10-16 12:15:25 -07:00
Bhuwan Khattar 256f69f4e6 fix HasteDependencyResolver
Reviewed By: javache

Differential Revision: D2550444

fb-gh-sync-id: f978efdd73c09e58bcdbc4711ee2a7662a0b1bf3
2015-10-16 11:16:25 -07:00
Martín Bigio b00c49725c Use new cli on fbt string extraction script
Reviewed By: frantic

Differential Revision: D2534971

fb-gh-sync-id: b008c21c2194c59e8b2b83402841292cee8d85e8
2015-10-16 10:57:39 -07:00
Adam Miskiewicz 24bfdda499 Adds support for ES6 export syntax to the packager's DependencyResolver.
Summary: This PR includes:
- A regex that allows for the `export` syntax.
- Updated tests.
Closes https://github.com/facebook/react-native/pull/3465

Reviewed By: svcscm

Differential Revision: D2550322

Pulled By: vjeux

fb-gh-sync-id: 7d35f436af13cf5b6b1287835a18a9693ec1be8a
2015-10-16 10:57:32 -07:00
Adam Terlson da250671e5 Add support for cancelAllLocalNotifications
Summary: Closes https://github.com/facebook/react-native/pull/2980

Reviewed By: svcscm

Differential Revision: D2550080

Pulled By: javache

fb-gh-sync-id: 76a7088f4f86191b02e6c176e4a8a7bc85f90835
2015-10-16 10:57:25 -07:00
James Ide 2608efccb6 exclusively use babel-core
Summary: We don't need babel the CLI tool... just babel-core suffices. Remove babel, which speeds up npm install, and just use babel-core.
Closes https://github.com/facebook/react-native/pull/2476

Reviewed By: svcscm

Differential Revision: D2550081

Pulled By: martinbigio

fb-gh-sync-id: 4390a48ff4cc4ea78217e8af00322b7342e98c95
2015-10-16 09:24:23 -07:00
Ryan Olson 1091ecd8e0 Respect destination vaules in LayoutAnimation create
Reviewed By: nicklockwood

Differential Revision: D2544389

fb-gh-sync-id: 9e6abdbd1f500578369e5f2c3e34d7f5ef047f5e
2015-10-16 08:39:22 -07:00
Martin Bigio c0b5e6ed67 [react-native-cli] Move `new-library` command to `private-cli` 2015-10-16 11:20:29 -04:00
Frédéric Sagnes 4a3857ef1d Use JSStringCreateWithUTF8CString and skip NSString decoding when loading the bundle
Summary: public

Benchmarking our startup path has shown we spend a lot of time decoding strings (iPhone 4S / iPhone 5):

* reading a 2MB JS bundle: 35ms / 15ms
* decoding is to an `NSString`: 186ms / 78ms
* transforming that to a `JSString`: 29ms / 10ms

Instead of going through an `NSString` transformation, we generate a null-terminated bundle (0.1ms / 0.05ms to copy the data) and use `JSStringCreateWithUTF8CString` (121ms / 53ms) to generate the string. That makes decoding 70% faster.

Reviewed By: javache

Differential Revision: D2541140

fb-gh-sync-id: 09a016b8edfd46a9b62682c76705564d2024e75e
2015-10-16 08:11:25 -07:00
Krzysztof Magiera 8e2ec64763 Use RecyclerViewBackedScrollView in groups feed on Android.
Differential Revision: D2549975

fb-gh-sync-id: 98689a58a69ce8425c695acf74701509816821ae
2015-10-16 07:45:22 -07:00
Krzysztof Magiera 0ed3048e39 Add deprecated transform props to View prop type definition.
Differential Revision: D2549973

fb-gh-sync-id: 96b5233fe4ed003760746d8cdb7f0496a67c63be
2015-10-16 07:30:26 -07:00
Bill Glover 8fb9cc8fc1 Fix 16 linter warnings in Examples/
Summary: Partially fixes #3316 by addressing 16 linter warnings:
 - Strings should be singlequote
 - Missing semicolon

Travis build jobs 1.1 through 1.4 complete successfully. 1.5 fails through what appears to be an unrelated issue on master.
Closes https://github.com/facebook/react-native/pull/3332

Reviewed By: @​svcscm

Differential Revision: D2531718

Pulled By: @javache

fb-gh-sync-id: ca22fbeac5fe3b4f725775a72f21b6dd7a75d94b
2015-10-16 04:03:23 -07:00
Jihyun Yu 79e33078f2 Fix minor typos on documentation
Summary: Closes https://github.com/facebook/react-native/pull/2742

Reviewed By: @​svcscm

Differential Revision: D2549690

Pulled By: @javache

fb-gh-sync-id: 84cb3aa78c2c75bae24a8cc7c1b96e219c9a0552
2015-10-16 03:49:25 -07:00
Pieter De Baets 74002b784b Fixes broken link to running on device
Summary: Closes https://github.com/facebook/react-native/pull/2420

@​public

Reviewed By: @majak

Differential Revision: D2549685

fb-gh-sync-id: 8ce3c9aa242cd65e8efc2bdd0065f9e20de8240d
2015-10-16 03:41:21 -07:00
Krzysztof Magiera f47e8ac6a1 Instrumentation test for native listview component.
Differential Revision: D2549707

fb-gh-sync-id: c9ff379383853c198274778e99a72b313d9dbda9
2015-10-16 03:41:18 -07:00
Mike Armstrong 3d40d622f9 Prevent ReactMarker class from being stripped in release
Differential Revision: D2547100

fb-gh-sync-id: c6a5d2f70bfdf5fa6fdd7f17f063de7ad837ece3
2015-10-16 03:41:16 -07:00
Ben Alpert 84df87ef64 Fix React warnings
Reviewed By: @sebmarkbage

Differential Revision: D2548854

fb-gh-sync-id: 9ace9ce57641e2dcaae997358e6404044d871f82
2015-10-16 03:41:14 -07:00
Bhuwan Khattar 15054ade7d Support cyclic dependencies in require polyfill
Reviewed By: @martinbigio

Differential Revision: D2548506

fb-gh-sync-id: fca534179a5f8fcf407917137cdd71d964f145e5
2015-10-16 03:41:08 -07:00
Jared Forsyth 0788e0b683 Devtools websocket
Summary: I thought this was already in here, but then it wasn't. It's connected to by RN [here](https://github.com/facebook/react-native/blob/master/Libraries/Devtools/setupDevtools.js#L17).
Closes https://github.com/facebook/react-native/pull/3431

Reviewed By: @​svcscm

Differential Revision: D2548286

Pulled By: @frantic

fb-gh-sync-id: ffd74426949196ca538c897c1a0d07d08b204630
2015-10-16 03:41:05 -07:00
Will Ngo b3c72a5632 Fix command to re-generate the static bundle in Examples
Summary: Updated the commands provided in the comments to re-generate the static bundle in the Movies and UIExplorer examples, making them match the URL used in `sourceURL` while in dev mode.
Closes https://github.com/facebook/react-native/pull/3132

Reviewed By: @​svcscm

Differential Revision: D2547140

Pulled By: @vjeux

fb-gh-sync-id: 450049d3c3d4eb9919d0a3a6bd6c611e90d0f958
2015-10-16 03:41:02 -07:00
Bhuwan Khattar 83b8a30beb Simplify require polyfill
Reviewed By: @vjeux

Differential Revision: D2544415

fb-gh-sync-id: ab48b5fba169c43c68dd24dc95ea1d0322ed67c4
2015-10-16 03:40:58 -07:00
Krzysztof Magiera 643769fc8e Fix dependency on recycler view in OSS.
Differential Revision: D2546027

fb-gh-sync-id: 7a2c2298332400fb216c18b8c569a859d1a3e1d0
2015-10-16 03:40:55 -07:00
Martín Bigio d96b750e56 Fix bundle command with --dev
Reviewed By: @vjeux

Differential Revision: D2538070

fb-gh-sync-id: 3720de8e60d20d6becc60035095e29b3a480a017
2015-10-16 03:40:51 -07:00
Martín Bigio 36697ae6a1 Move android generator to private-cli
Summary: @​public

Lets also make this more generic to allow to generate the template for any platform code.

Reviewed By: @vjeux

Differential Revision: D2536821

fb-gh-sync-id: 6fb99c6dc546b8e1f9839c96a473dc08b0f5285c
2015-10-16 03:40:48 -07:00
Martín Bigio ca1bc35940 Update npm-shrinkwrap.json 2015-10-15 14:43:28 -04:00
James Ide c38d7fab97 `isInteraction` option to keep InteractionManager unblocked
Summary: Adds a new option to animation configs so that animations can be marked as non-interactions. This solves the "loading indicator problem" where an animated loading screen would deadlock as it waits for all interactions to complete.

As for the API, what we really want long term is better scheduling. This needs to be built at the runtime level (into the RN bridge) and take care of things like priority donation that are probably overkill right now. Basically this API is a medium-term fix and I won't be upset if it gets replaced with a finer-grained scheduler.
Closes https://github.com/facebook/react-native/pull/3433

Reviewed By: @​svcscm

Differential Revision: D2545300

Pulled By: @vjeux

fb-gh-sync-id: c1216bf69bfbbbae00c76c4697183fe96a6a01dd
2015-10-15 09:22:33 -07:00