Commit Graph

5889 Commits

Author SHA1 Message Date
Andrei Coman 2d0051f213 Fix logging reported by RUN_JS_BUNDLE
Reviewed By: mhorowitz

Differential Revision: D3144775

fb-gh-sync-id: 9d6aa66a74437c90faa09dc53d8772be79a4c65e
fbshipit-source-id: 9d6aa66a74437c90faa09dc53d8772be79a4c65e
2016-04-07 04:22:19 -07:00
Krzysztof Magiera 874bcd3ee3 JS tests.
Summary:JEST tests for `useNativeDriver` option in AnimatedImplementation.js. Adding this to protect from potential changes in Animated.js that might break the interaction with the NativeAnimatedModule. Most of those tests just verify that a valid method of NativeAnimatedModule gets called as a result of animated nodes management operations.

**Test plan (required)**
Run `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
See 9 tests passed
Closes https://github.com/facebook/react-native/pull/6821

Differential Revision: D3149876

fb-gh-sync-id: 8911c5b0f96074115a62153c05162ff24ee2caa1
fbshipit-source-id: 8911c5b0f96074115a62153c05162ff24ee2caa1
2016-04-07 01:27:20 -07:00
James Ide c30d125050 Honor the version of "react" under peerDeps when setting up a new project
Summary:We need this since React 15.0.0 is coming and will break `react-native init`, which currently installs the latest version of React. We'll need some changes to React Native to support 15 that Sebastian is actively working on, but till that lands we want `react-native init` to continue working.
Closes https://github.com/facebook/react-native/pull/6846

Differential Revision: D3148182

Pulled By: sebmarkbage

fb-gh-sync-id: 3df5bc184c0b82d2c9c320c620256c7c8568d90b
fbshipit-source-id: 3df5bc184c0b82d2c9c320c620256c7c8568d90b
2016-04-07 00:07:21 -07:00
Hedger Wang eecdf7d356 disable interaction during transition.
Summary:When navigating from one view to another you can still interact with
the current view. This means that a user can tap a button multiple times and trigger multiple transitions.

The view that is being transitioned off the screen should not be allowed to
receive any user interaction while it is being transitioned.

Reviewed By: javache

Differential Revision: D3143202

fb-gh-sync-id: cc033bbdf0cb9e717f62d2fcf751155406da846c
fbshipit-source-id: cc033bbdf0cb9e717f62d2fcf751155406da846c
2016-04-06 16:15:28 -07:00
Spencer Ahrens 06b2998de8 Rework scroll management
Reviewed By: devknoll

Differential Revision: D3138464

fb-gh-sync-id: fd1bb7f623c689836ae52ea8bf384d8efccddfea
fbshipit-source-id: fd1bb7f623c689836ae52ea8bf384d8efccddfea
2016-04-06 14:09:27 -07:00
Thomas Aylott 41576eaa56 Fixes hotcode reloading issue
Reviewed By: martinbigio

Differential Revision: D3136032

fb-gh-sync-id: 5666fd45ffa574d2156b03c7bfbda3fe97090f56
fbshipit-source-id: 5666fd45ffa574d2156b03c7bfbda3fe97090f56
2016-04-06 12:14:20 -07:00
Adam Miskiewicz 8200041694 Pass transformOptions to getShallowDependencies.
Summary:We weren't passing `transformOptions` to `getShallowDependencies`, and therefore, when this method was called on a module, it would bust the cache and cause a retransform of the file. This was resulting in a complete retransforming of all files when the HMR Client connected to the packager.
Closes https://github.com/facebook/react-native/pull/6843

Differential Revision: D3145306

Pulled By: martinbigio

fb-gh-sync-id: 3619c27801b2fc07b758fafed47fcc892bb8e6db
fbshipit-source-id: 3619c27801b2fc07b758fafed47fcc892bb8e6db
2016-04-06 11:38:27 -07:00
sunnylqm 6a133d78a8 Use es6 in animation examples
Summary: Closes https://github.com/facebook/react-native/pull/5936

Differential Revision: D3144654

Pulled By: davidaurelio

fb-gh-sync-id: 7e2d3af60d202c209df94591fa5ebc9475e6110d
fbshipit-source-id: 7e2d3af60d202c209df94591fa5ebc9475e6110d
2016-04-06 09:23:20 -07:00
Nick 2a03182b1c CHORE - Remove Trailing Spaces
Summary:Remove Trailing Spaces.

Why:
Sometimes there are conflicts with trailing spaces
Saves space
Those whose tools automatically delete them will have their pr watered down with trailing space removal
Closes https://github.com/facebook/react-native/pull/6787

Differential Revision: D3144704

fb-gh-sync-id: d8a62f115a3f8a8a49d5b07f56c540a02af38cf8
fbshipit-source-id: d8a62f115a3f8a8a49d5b07f56c540a02af38cf8
2016-04-06 09:21:53 -07:00
Marcelo Kanzaki 37caef246d Update SignedAPKAndroid.md
Summary:From the documentation I thought I only had to sign an application if I intended to publish it to the Play Store. Turns out this is not true. Signing is still required if you want to install the APK on any device at all. Unsigned APK's are for simulators only.
Closes https://github.com/facebook/react-native/pull/6795

Differential Revision: D3133747

fb-gh-sync-id: ae91111cb20984ebe8ac2443971b373a3f4c848e
fbshipit-source-id: ae91111cb20984ebe8ac2443971b373a3f4c848e
2016-04-06 09:04:20 -07:00
Aleksei Androsov 9e78a63f84 Remove double to string convertion in FormData
Summary:These convertions introduced by 2 different PRs
5061fde317
de392b5351
Closes https://github.com/facebook/react-native/pull/5815

Differential Revision: D3144703

fb-gh-sync-id: a483916bb7387a64d89f809ccfb35ecb9a065b1e
fbshipit-source-id: a483916bb7387a64d89f809ccfb35ecb9a065b1e
2016-04-06 09:01:30 -07:00
kapil verma 97696b61c8 Fixed typo in docs
Summary: Closes https://github.com/facebook/react-native/pull/6772

Differential Revision: D3144702

fb-gh-sync-id: f7e6743bc361652f16f50af19305822d05a047fa
fbshipit-source-id: f7e6743bc361652f16f50af19305822d05a047fa
2016-04-06 08:55:20 -07:00
Martin Konicek 9adef91333 Fix website after open sourcing Slider
Reviewed By: bestander

Differential Revision: D3144673

fb-gh-sync-id: bdfc35606c29b227228474e5e6a9c0087898783d
fbshipit-source-id: bdfc35606c29b227228474e5e6a9c0087898783d
2016-04-06 08:51:23 -07:00
Konstantin Raev d0566d8bc3 Fixed images required from node_modules
Summary:This fixes https://github.com/facebook/react-native/issues/6638 by resolving AssetRegistry relatively.
Closes https://github.com/facebook/react-native/pull/6822

Reviewed By: davidaurelio

Differential Revision: D3144463

Pulled By: bestander

fb-gh-sync-id: d3eeb24ae9e08a32f742c50ae5f0314fd33d1b6b
fbshipit-source-id: d3eeb24ae9e08a32f742c50ae5f0314fd33d1b6b
2016-04-06 07:59:29 -07:00
Konstantin Raev 1bdb6caa0e fixed flow error introduced with Sldier
Summary:cc mkonicek
Closes https://github.com/facebook/react-native/pull/6838

Differential Revision: D3144492

fb-gh-sync-id: 49eeb95fd2ccaa1b77905bd258b36f48c84463e4
fbshipit-source-id: 49eeb95fd2ccaa1b77905bd258b36f48c84463e4
2016-04-06 07:41:33 -07:00
Martin Konicek a461d25601 Open source Android slider
Reviewed By: bestander

Differential Revision: D3127200

fb-gh-sync-id: d3d51b312c2e32cc7a0f4c0bc084139343e97c3e
fbshipit-source-id: d3d51b312c2e32cc7a0f4c0bc084139343e97c3e
2016-04-06 04:50:57 -07:00
James Ide 29a1a05cbb Re-order the TravisCI test matrix based on historical run times
Summary:Travis CI runs the test matrix in the order specified in the YAML file. When there are enough available test VMs this doesn't matter since all matrix entries run in parallel, but we often don't have enough free VMs. So when there's a free VM, start running the slowest tests first. This way as more VMs become free, they will run the faster tests and can catch up. This should minimize the time required for a PR to turn green.
Closes https://github.com/facebook/react-native/pull/6828

Differential Revision: D3144236

fb-gh-sync-id: 1a3242767f02469b0384bb871d6c4c1e505aa442
fbshipit-source-id: 1a3242767f02469b0384bb871d6c4c1e505aa442
2016-04-06 03:43:22 -07:00
Morgan Pretty 86d5c5249b Fixed an issue where the title in NavigationExperimentalHeader would block touches for the left component
Summary:There was an issue where the title component could overlap the left component and it would block the left component from receiving touches.

I only stumbled across this because we have a default title component which stretches most of the width and it was covering the edge of the left component. I think left/right components are more likely to be actionable than the title component so they should take priority in the touch order (ie. be rendered last).
Closes https://github.com/facebook/react-native/pull/6618

Differential Revision: D3144191

fb-gh-sync-id: 9ccd31714b2401d02eaaf4b5b24ed6afb60041c7
fbshipit-source-id: 9ccd31714b2401d02eaaf4b5b24ed6afb60041c7
2016-04-06 03:10:31 -07:00
Eric Vicenti 5162eb3254 Only accept card gestures within a certain range, 30px
Summary: The iOS native card stack only responds if the gesture starts on the left 30 px on the screen.

Reviewed By: hedgerwang

Differential Revision: D3137201

fb-gh-sync-id: 40e28d5696870b98731e92d6e42d00638b9bb15f
fbshipit-source-id: 40e28d5696870b98731e92d6e42d00638b9bb15f
2016-04-06 02:52:24 -07:00
Aharon Shemesh 804791e086 Add hello dating to showcase
Summary:We've released our new hello dating App on iOS!

Best,

hello dating team !

cc rammuk eranrgdc
Closes https://github.com/facebook/react-native/pull/6816

Differential Revision: D3143299

fb-gh-sync-id: 092b8c0626b141a6ac4ad59894d2dc058fec50ec
fbshipit-source-id: 092b8c0626b141a6ac4ad59894d2dc058fec50ec
2016-04-05 20:20:26 -07:00
Adam Miskiewicz e27a27b517 Fix Promise argument assertion to take into account executorTokenOffset.
Summary:In the code that extracts and validates arguments from a `ReactMethod`, there is verification that if a method contains a Promise in it's list of arguments that it must come last. This fix makes sure that the `executorTokenOffset` is taken into account when asserting that condition.
Closes https://github.com/facebook/react-native/pull/6633

Differential Revision: D3143207

fb-gh-sync-id: ae9ebd9d829f88993f9951c4cb2452b3f7618476
fbshipit-source-id: ae9ebd9d829f88993f9951c4cb2452b3f7618476
2016-04-05 19:57:28 -07:00
Andy Street c0108a269d Use an atomic bool to track bridge destruction
Summary: We're seeing intermittent crashes in ~Bridge() where m_destroyed isn't set. This could be because the value of m_destroyed is cached for the destructing thread and doesn't see that the value got updated. Using an atomic boolean should fix this.

Reviewed By: mhorowitz

Differential Revision: D3126701

fb-gh-sync-id: 5887edef748cc05971765943de80187ab7fd8ede
fbshipit-source-id: 5887edef748cc05971765943de80187ab7fd8ede
2016-04-05 13:24:31 -07:00
Kushal Dave e8e8e8acdc Add Spatula to Showcase
Summary: Closes https://github.com/facebook/react-native/pull/6806

Differential Revision: D3140034

fb-gh-sync-id: d7a083e08f177966c033045129dee21559862324
fbshipit-source-id: d7a083e08f177966c033045129dee21559862324
2016-04-05 12:58:21 -07:00
ahanriat 63211596e3 Add Azendoo to showcase
Summary:We've finally released our whole new Azendoo App on Both Android & iOS thanks to you !
We also would like to know if there is something special to do  to be part of the featured apps ?

Best,

Azendoo team !

cc Bhullnatik kemcake
Closes https://github.com/facebook/react-native/pull/6813

Differential Revision: D3140035

fb-gh-sync-id: 153dd4eb5add367633cbaba6e9284abef982fc08
fbshipit-source-id: 153dd4eb5add367633cbaba6e9284abef982fc08
2016-04-05 12:45:30 -07:00
Kyle Corbitt bafc506f7c Ignore Navigator touch events for background buttons
Summary:Currently, if the Navigator with the default `NavigatorNavigationBar` has two scenes on its `routeStack` and the bottom one defines a `RightButton` but the top one doesn't, a touch to the location of the underlying  `RightButton` will trigger its action.

This fix checks if the button's opacity is set to 0 (indicating it has been transitioned off the scene and shouldn't be interacted with) and ignores touch events if so.
Closes https://github.com/facebook/react-native/pull/5624

Differential Revision: D3139553

fb-gh-sync-id: 6d6da1459e289499b6d8769120a3b6114548c090
fbshipit-source-id: 6d6da1459e289499b6d8769120a3b6114548c090
2016-04-05 11:33:27 -07:00
Eric Vicenti 05a852a664 Fix up PanResponder example
Summary: Simplify and fix up a broken example

Reviewed By: hedgerwang

Differential Revision: D3137234

fb-gh-sync-id: 653086796d40a81f472274877fb890eee4b9b57b
fbshipit-source-id: 653086796d40a81f472274877fb890eee4b9b57b
2016-04-05 10:51:20 -07:00
Martin Kralik 3874c01292 make `RCTEventDispatcher` dispatch events in incoming order
Reviewed By: javache

Differential Revision: D3138215

fb-gh-sync-id: 430b57d7bb8e3f0f90877b627bfd6a842719ba5d
fbshipit-source-id: 430b57d7bb8e3f0f90877b627bfd6a842719ba5d
2016-04-05 09:17:28 -07:00
Martin Kralik 8efc098646 fixed coalescing key generation for RCTTouchEvent
Summary:Turns our using the same coalescing key until a person removes all fingers off screen is not ideal.
It doesn't work in a case where the first finger starts moving on screen and then a second finger joins it later (almost any pinch gesture),
since we would try to coalesce move events from the start when only one finger was touching screen with events where two fingers were moving on screen.
That doesn't work and results in a crash.

I've changed the logic for generating the coalescing key in order to prevent this.
We no longer have a single key for a single gesture, but we change the key each time amount of fingers increases ("touchStart") or decreases ("touchEnd").

Reviewed By: javache

Differential Revision: D3138275

fb-gh-sync-id: c32230ba401819fe3a70d1752b286d849520be89
fbshipit-source-id: c32230ba401819fe3a70d1752b286d849520be89
2016-04-05 09:10:27 -07:00
Nick Lockwood a10c1b5a30 Fix UIExplorer Image example on iOS
Reviewed By: javache

Differential Revision: D3138820

fb-gh-sync-id: 83bf3f6c60b80e9303b3c3a47dd5d05069623204
fbshipit-source-id: 83bf3f6c60b80e9303b3c3a47dd5d05069623204
2016-04-05 08:48:24 -07:00
Martin Bigio 40f13742b3 Use `^` version for react-native preset
Summary:See https://github.com/facebook/react-native/issues/6798
Closes https://github.com/facebook/react-native/pull/6814

Differential Revision: D3138776

fb-gh-sync-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
fbshipit-source-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
2016-04-05 07:58:25 -07:00
Spencer Ahrens ab44d32ec5 Better Incremental/TaskQueue error reporting
Reviewed By: yungsters

Differential Revision: D3135010

fb-gh-sync-id: 2d6d8800c7f7557221bd57869b6a6fa30d65f122
fbshipit-source-id: 2d6d8800c7f7557221bd57869b6a6fa30d65f122
2016-04-05 02:35:22 -07:00
Janic Duplessis c61100d0ce Fix HMR on Windows
Summary:Tested HMR on Windows and found 2 small issues related to paths that made it not work. Now it works nicely :)

**Test plan (required)**
Tested HMR in UIExplorer on Windows.
Closes https://github.com/facebook/react-native/pull/6678

Differential Revision: D3138379

fb-gh-sync-id: f27cd2fa21f95954685c8c6916d820f41bc187be
fbshipit-source-id: f27cd2fa21f95954685c8c6916d820f41bc187be
2016-04-05 01:13:18 -07:00
Will Fleming bef175af61 Update watchman version in docs to latest stable release
Summary:Update documentation. Per https://facebook.github.io/watchman/docs/install.html the latest stable release of watchman is now at v4.5.0

This is my first pull request and I have completed the CLA.
Closes https://github.com/facebook/react-native/pull/6372

Differential Revision: D3133665

fb-gh-sync-id: b4215fdc862c68d69952717a9e74039850d38459
fbshipit-source-id: b4215fdc862c68d69952717a9e74039850d38459
2016-04-04 10:06:20 -07:00
Janic Duplessis 114dde99ce Fix TouchableNativeFeedback state propagating to children
Summary:For some reason Android propagates the the pressed state to all of the ViewGroup's children when calling `setPressed`. This caused the issue described in #3952. Luckily we can override the `dispatchSetPressed` method of ViewGroup to prevent it from doing so.

Had to dig in the Android source a bit to find this one, here's the relevant pieces :
https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/View.java#L7883
https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/ViewGroup.java#L3722

**Test plan (required)**
Reproduced the bug using [this gist](https://gist.github.com/janicduplessis/9f1d42c670aefd660afb4c96e8bb6a4f) in UIExplorer. Touching the parent should not trigger the ripple on the children.

I also made sure all the touchable still work properly.

Fixes #3952
Closes https://github.com/facebook/react-native/pull/6783

Differential Revision: D3133407

fb-gh-sync-id: 317e55de2652ea185a1082cd96b8fe3a8b807962
fbshipit-source-id: 317e55de2652ea185a1082cd96b8fe3a8b807962
2016-04-04 08:48:22 -07:00
James Ide 5663ab4771 Add gradle wrapper files for example projects to gitignore
Summary:Hide the gradle wrapper files for example projects like the UIExplorer
Closes https://github.com/facebook/react-native/pull/6771

Differential Revision: D3133423

fb-gh-sync-id: 077f5a647e17e60a190dcc69fda4e96a4b31a391
fbshipit-source-id: 077f5a647e17e60a190dcc69fda4e96a4b31a391
2016-04-04 08:38:27 -07:00
James Ide 4c478f7beb Use semver in the .flowconfig version number
Summary:Flow 0.22.1 is the latest release, but RN asks for 0.22.0 in the .flowconfig file. This commit makes use of Flow's support for semver matching (https://github.com/facebook/flow/issues/592) so that the latest version of Flow can be used as long as it's semver-compatible.
Closes https://github.com/facebook/react-native/pull/6767

Differential Revision: D3133424

fb-gh-sync-id: 5a7a7ff7fc4b0a5a6fd7c162923d3e85a3fc0f08
fbshipit-source-id: 5a7a7ff7fc4b0a5a6fd7c162923d3e85a3fc0f08
2016-04-04 08:30:18 -07:00
Martin Konicek 52ddfd9b51 Bugfix: Make iOS Slider it the responder
Summary:This fixes issues with other view (like the Navigator) stealing the responder and becoming interactive while the user is dragging the slider.

From [documentation](https://facebook.github.io/react-native/docs/gesture-responder-system.html):
- `onStartShouldSetResponder`: Does this view want to become responder on the start of a touch? -> Yes.
- `onResponderTerminationRequest`: Something else wants to become responder. Should this view release the responder? -> No.

Reviewed By: ericvicenti

Differential Revision: D3133337

fb-gh-sync-id: 3d7e1e6a2ed6fa605857cfb0549ffa71df85fd22
fbshipit-source-id: 3d7e1e6a2ed6fa605857cfb0549ffa71df85fd22
2016-04-04 08:24:18 -07:00
Tadeu Zagallo 2f2703936d Use indirect jumps on armv7
Summary:Immediate jumps on arm cannot jump further than 32mb, which might be a problem for large binaries.

+ add the missing `.thumb_func` directive.

Reviewed By: michalgr

Differential Revision: D3121148

fb-gh-sync-id: a53ad0ac70af9df84437b37f19b8a1cb49dd6fa2
fbshipit-source-id: a53ad0ac70af9df84437b37f19b8a1cb49dd6fa2
2016-04-04 06:49:19 -07:00
Christine Abernathy 09958618c5 Adding emulator, simulator UIExplorer example across docs
Summary:Current docs show an Appetize.io example for AlertIOS doc. This pull request adds that feature across all applicable iOS and Android docs. So if a doc has an example in UIExplorer, it shows up in the top right and clicking to Play should navigate to the relevant example.

The changes here also touched NavigationExperimental to fix a typo that prevented iOS deep link from working. Code was also added to help support Android deep links but there's an outstanding issue (a race condition) around how Android deep links trigger getInitialURL in NavigationRootContainer that prevents this from fully working.

For adding the docs, a few things were done outside this pull request:

1/ Release builds for UIExplorer Android and iOS apps were uploaded to Appetize.io. The Appetize.io info (public key to run the build) is embedded in the docs.
2/ The iOS build was generated by making a few changes to get a local bundle. The current UIExplorer set up doesn't support "react-native run-ios".

Regarding the Appetize bu
Closes https://github.com/facebook/react-native/pull/6306

Differential Revision: D3129651

Pulled By: bestander

fb-gh-sync-id: d296d64db8236faa36f35484bb6b362990caf934
fbshipit-source-id: d296d64db8236faa36f35484bb6b362990caf934
2016-04-04 06:05:23 -07:00
Aaron Connolly 67b138e77c Added a small note about an issue I ran into vending a simple `UIView?
Summary:?` instance to React Native. The layout system suppressed the values for `frame` and `backgroundColor` on my simple view and it wasn't clear why. After some debugging and hacking it became apparent that React Native needed to adjust those properties during layout. The workaround I found was to wrap my custom `UIView` in another `UIView` instance.

**Motivation**

When attempting to bridge a simple 100x100 red background `UIView` to ReactNative I could not get the view to show up as a `RCTView`. The view was there, but it was not 100x100 and it didn't have a red background. After a couple hours of poking around and debugging the call stacks on `setBackgroundColor` and `setFrame` it became apparent that React Native calls those messages on your `UIView` and sends new values. This is likely because of the layout system React Native uses.

I was encouraged to provide a small comment in the documentation if I thought others might find it useful. This PR is an attempt to provide a note in the documentation
Closes https://github.com/facebook/react-native/pull/6786

Differential Revision: D3133093

fb-gh-sync-id: 77d895f2f8e09978d283ee9e3193ee68cc5a7cb8
fbshipit-source-id: 77d895f2f8e09978d283ee9e3193ee68cc5a7cb8
2016-04-04 04:36:19 -07:00
Pieter De Baets d95757037a Update css-layout from github
Summary:Update to latest master version of css-layout. Update integration in RCTShadow(Root)View to match.

This solves the issue with items not strechting vertically in column layouts (https://github.com/facebook/css-layout/issues/127)

Reviewed By: vjeux

Differential Revision: D3120699

fb-gh-sync-id: beba162e1255d3527e1160e9bd414a712cb10713
fbshipit-source-id: beba162e1255d3527e1160e9bd414a712cb10713
2016-04-04 04:10:24 -07:00
Konstantin Raev 5387e09dc7 Fixed e2e test being run twice on Circle
Summary: Closes https://github.com/facebook/react-native/pull/6768

Differential Revision: D3132093

fb-gh-sync-id: 9ff9208b4549ee56c4bcf5531699857056940fc9
fbshipit-source-id: 9ff9208b4549ee56c4bcf5531699857056940fc9
2016-04-03 10:08:19 -07:00
Martin Kralik 02b6e38bee better event emitting II: no deadlocks
Summary:D3092867 / 1d3db4c5dc caused deadlock when chrome debugging was turned on, so it was reverted as D3128586 / 144dc30661.
The reason: I was calling `[_bridge dispatchBlock:^{ [self flushEventsQueue]; } queue:RCTJSThread];` from main thread and expecting it will `dispatch_async` to another,
since a held lock was being accessed the dispatched block and was released after the dispatch.
Turns out `RCTWebSocketExecutor` (which is used when chrome debugger is turned on) executes all blocks dispatched this way to `RCTJSThread` synchronously on the main thread.
This resulted in a deadlock. The "dispatched" block was trying to acquired lock which held by the same thread in the dispatching phase.

A fix for this is pretty simple. We will release the lock before dispatching the block.

However it's not super straightforward to see this won't introduce some race condition in a case with two threads where we would end up with events not being processed.
My thinking why that shouldn't happen goes like this: We could get in a bad state if `flushEventsQueue` would run on JS thread while `sendEvent:` is running on MT.
(I don't have a specific example how, maybe it's not possible. However when I show this case is safe we know we are good.)
The way how locking is setup in this diff the only possible scenario where these two threads would execute in these methods concurrently is JS holding the lock and MT going to enqueue another block on JS thread (since that's outside of "locked" zone).
But this scenarion can never happen, since if MT is about to enqueue the block on JS thread it means there cannot be a not yet fully executed block on JS thread.
Therefore nothing bad can happen.

So this diff brings back the reverted diff and adds to it the fix for the deadlock.

Reviewed By: javache

Differential Revision: D3130375

fb-gh-sync-id: 885a166f2f808551d7cd4e4eb98634d26afe6a11
fbshipit-source-id: 885a166f2f808551d7cd4e4eb98634d26afe6a11
2016-04-02 23:31:25 -07:00
Luqmaan Dawoodjee 5d44dad43f Fix spelling of letter (leter)
Summary:Fix spelling of the word letter. Was leter, now letter.

🐒
Closes https://github.com/facebook/react-native/pull/6780

Differential Revision: D3131714

fb-gh-sync-id: a368304267347211c139b09b82f6da12e8b67615
fbshipit-source-id: a368304267347211c139b09b82f6da12e8b67615
2016-04-02 21:55:27 -07:00
Alex Kotliarskyi 144dc30661 Revert [RN][iOS] better event emitting
Reviewed By: sahrens

Differential Revision: D3128586

fb-gh-sync-id: 5c3c79fa983f6c1c43319a6c14049f99e0dfee8a
fbshipit-source-id: 5c3c79fa983f6c1c43319a6c14049f99e0dfee8a
2016-04-01 14:26:20 -07:00
Spencer Ahrens cd79e269dc cleanup and open source WindowedListView
Summary:`WindowedListView` is designed for memory efficient scrolling of
huge/infinite lists of variable height rows. It works by measuring row heights
with `onLayout` and caching the results, then unmounting rows that scroll
offscreen, replacing them with an equivalent offset in the spacer view. Care is
taken to render a constant number of rows, and to only render one new row per
tick to improve framerate and app responsiveness. WLV is also compatible with
<Incremental> used within the rows themselves.

`WindowedListView` is not a drop-in replacement for `ListView` - it doesn't
support many of the features of `ListView`, such as section headers, only
accepts a simple array of data instead of a datasource, and doesn't support
horizontal scrolling. This may change in the future.

This is still experimental - we haven't deployed this for any production apps
yet.

Differential Revision: D2791402

fb-gh-sync-id: 5f104e0903f6ba586d2d651bdf82863a231279d8
fbshipit-source-id: 5f104e0903f6ba586d2d651bdf82863a231279d8
2016-04-01 13:54:29 -07:00
Paul O’Shannessy cb5d37713f Remove use of Object.assign module
Summary:I'm [getting rid of it from React](https://github.com/facebook/react/pull/6376) and so I'd like to get this in before we accidentally break RN. There are a bunch of other uses of Object.assign directly so this should be perfectly safe.
Closes https://github.com/facebook/react-native/pull/6766

Differential Revision: D3128135

Pulled By: vjeux

fb-gh-sync-id: 675913ba457abcd8c194facb9ff58255c9dceda5
fbshipit-source-id: 675913ba457abcd8c194facb9ff58255c9dceda5
2016-04-01 13:50:22 -07:00
Tisho Georgiev 8a3e1e92f3 Prevent loading message from resetting simulator orientation on every reload.
Summary:If you're working on an app that needs to support landscape, reloading the app causes the iPhone simulator to reset its orientation to portrait every time the `RCTDevLoadingView` shows up. This is because it sets the root VC to `RCTModalHostViewController`, which currently supports only portrait orientations on iPhone. Changing the root view to a vanilla `UIViewController` fixes the issue.

**Steps to Reproduce**

1. Create a blank RN project: `react-native init RNTest`
2. Open it up and run it.
3. Rotate to landscape `Cmd+Right Arrow`.
4. Reload by pressing `Cmd+R`.

**Expected**

The simulator stays in landscape mode.

**Actual**

The simulator goes back to portrait.
Closes https://github.com/facebook/react-native/pull/6765

Differential Revision: D3127339

Pulled By: javache

fb-gh-sync-id: e2543c90c8d116307dcefa89a417447c1f1a327f
fbshipit-source-id: e2543c90c8d116307dcefa89a417447c1f1a327f
2016-04-01 12:31:21 -07:00
Alexey Lang b57d90a479 Append D3126321
Reviewed By: javache

Differential Revision: D3126614

fb-gh-sync-id: b36bb5eaa306823dce4bd7276f2dd63a2e5cb759
fbshipit-source-id: b36bb5eaa306823dce4bd7276f2dd63a2e5cb759
2016-04-01 11:09:22 -07:00
Michael Patricios 55920c2444 Add uSwitch app to showcase
Summary:Adding an app to the react-native showcase
Closes https://github.com/facebook/react-native/pull/6761

Differential Revision: D3126765

Pulled By: mkonicek

fb-gh-sync-id: 248d9ad2644b638741dd42ddfa2432a49237694c
fbshipit-source-id: 248d9ad2644b638741dd42ddfa2432a49237694c
2016-04-01 10:44:27 -07:00