Commit Graph

6420 Commits

Author SHA1 Message Date
Adam Comella deef8aade2 ScrollView: Always fire onScroll event for the resting scroll position
Summary:
When throttling scroll events with `scrollEventThrottle`, `onScroll`
is not guaranteed to be fired for the final scroll position
of the `ScrollView`. This can cause a component to render UI that
is consistent with the resting scroll position of the `ScrollView`.

This commit guarantees that an `onScroll` event will be fired for
the resting scroll position of the `ScrollView`.

**Test plan (required)**

Verified commit fixes a reduced repro. Also tested fix in a larger app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/7366

Differential Revision: D3269303

Pulled By: javache

fb-gh-sync-id: f68ecb7e9c18d1ac255c6f872fb7eb4aadd07799
fbshipit-source-id: f68ecb7e9c18d1ac255c6f872fb7eb4aadd07799
2016-05-06 03:19:27 -07:00
Adam Comella 4d2c72b977 NavigatorIOS: Expose interactivePopGestureEnabled property
Summary:
Previously, the back swipe navigation gesture would be enabled when the navigation bar is shown and disabled when the navigation bar is hidden.

This change enables developers to control the back swipe gesture independently of the visibility of the navigation bar. An example use case would be that an app wants to render a custom navigation bar so it sets `navigationBarHidden` to true and it wants to enable the back swipe gesture so it sets `interactivePopGestureEnabled` to true.

**Test plan (required)**

- Created a test app to verify setting `interactivePopGestureEnabled` to `true` and `false` with the navigation bar both hidden and shown.
- Verified prop works in a larger app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/7369

Differential Revision: D3269304

Pulled By: javache

fb-gh-sync-id: ec4324f6517cec4b4fc4f62c4394dc9208a8af6a
fbshipit-source-id: ec4324f6517cec4b4fc4f62c4394dc9208a8af6a
2016-05-06 03:18:20 -07:00
Fred Liu 2132ad1441 Swipeable list view enhancements
Summary:
- Removes "flickering" on first load
- Takes in Map<rowID, slideoutView> to display customs slideout view in `SwipeableRowListView`

Reviewed By: furdei

Differential Revision: D3267262

fb-gh-sync-id: a89806138b9172b3c184cc117504e205632a36d0
fbshipit-source-id: a89806138b9172b3c184cc117504e205632a36d0
2016-05-05 20:45:24 -07:00
Joel Marcey 156d3ed7a2 Refactor getting started navigation and information based on platform
Summary:
This simplifies the Quick Start section of the React Native documentation into
two pages. A Getting Started and a Tutorial.

The Getting Started page uses some CSS and Javascript magic (thanks vjeux for
the initial infra for this!!) to allow selection between platforms and have
instructions for Getting Started with React Native be shown according to the
selection -- all within the same page, realtime. A much cleaner interface.

I have made a pretty large presentation and information overhaul for each
platform as well. For example, requiring Android Studio for Android
development to make the Android SDK and build tools installation easier.
I added more screenshots to the Android sections since they are more complicated
than the more straightforward iOS. Screenshots for Android for Windows, Linux and
iOS are available now.

Some of the other pages such as `GettingStartedOnLinux` are now obsolete and deleted.

** Test Plan **

Tested locally and navigation works.
Closes https://github.com/facebook/react-native/pull/7418

Differential Revision: D3268621

Pulled By: vjeux

fb-gh-sync-id: 65f9181c9f959fadeffd254efddc5b64816eb1f4
fbshipit-source-id: 65f9181c9f959fadeffd254efddc5b64816eb1f4
2016-05-05 20:26:22 -07:00
Joel Marcey 359b381796 Revert "Refactor getting started navigation and information based on platform"
This reverts commit 0ea020d823.

fb-gh-sync-id: f46c4a1f927128fd34c2f8ce4be4c275468f2355
fbshipit-source-id: f46c4a1f927128fd34c2f8ce4be4c275468f2355
2016-05-05 18:49:33 -07:00
Joel Marcey 0ea020d823 Refactor getting started navigation and information based on platform
Summary:
This simplifies the Quick Start section of the React Native documentation into
two pages. A Getting Started and a Tutorial.

The Getting Started page uses some CSS and Javascript magic (thanks @vjeux for
the initial infra for this!!) to allow selection between platforms and have
instructions for Getting Started with React Native be shown according to the
selection -- all within the same page, realtime. A much cleaner interface.

I have made a pretty large presentation and information overhaul for each
platform as well. For example, requiring Android Studio for Android
development to make the Android SDK and build tools installation easier.
I added more screenshots to the Android sections since they are more complicated
than the more straightforward iOS. Screenshots for Android for Windows, Linux and
iOS are available now.

Some of the other pages such as `GettingStartedOnLinux` are now obsolete and deleted.

Test Plan:
Video demo (it's a 1m20s or so, peruse at your pace): https://www.facebook.com/pxlcld/nKW3

Inspection

Reviewers: lacker, bestander, mkonicek, vjeux

Reviewed By: vjeux

Subscribers: cdykes, vjeux, mjohnston, sema, balpert, tomocchino, hramos, caabernathy, jpearce

Differential Revision: https://phabricator.intern.facebook.com/D3265822

Signature: t1:3265822:1462479878:5453ec81808b59fd71c288b6cc79268fccd921bc
2016-05-05 18:40:47 -07:00
Jeff Bowen b1892e6099 Explain custom configuration debugging gotcha
Summary:
Debugging tools won't work if you're using a custom configuration and Cocoapods and didn't specify the configuration to be a `debug` configuration using the `xcodeproj` setting in your Podfile. When integrating React Native into an existing Xcode project, this is a common situation to encounter.

See https://github.com/facebook/react-native/issues/2246#issuecomment-217187621
Closes https://github.com/facebook/react-native/pull/7407

Differential Revision: D3268032

fb-gh-sync-id: f46c4a1f927128fd34c2f8ce4be4c275468f2355
fbshipit-source-id: f46c4a1f927128fd34c2f8ce4be4c275468f2355
2016-05-05 18:00:19 -07:00
Eric Vicenti 14eb427a80 Kill NavigationExperimental Containers
Summary:
The containers in NavigationExperimental are not appropraite because the state should be held by the app's architecture, be it redux, flux, or simple component state.

This diff moves the examples over to simple component state, but there are several other examples of how to use NavigationAnimatedView and the navigation reducers with redux:

- https://github.com/jlyman/RN-NavigationExperimental-Redux-Example
- Switching the f8 app with redux to navigation experimental: https://github.com/fbsamples/f8app/pull/14

Reviewed By: hedgerwang

Differential Revision: D3219911

fb-gh-sync-id: eb0b323e2c165c32027fbd00dc6197ad441d6552
fbshipit-source-id: eb0b323e2c165c32027fbd00dc6197ad441d6552
2016-05-05 16:52:19 -07:00
Russell Porter a412fd1504 Remove unused generated strings.xml files
Differential Revision: D3265330

fb-gh-sync-id: a0ca96e4c3db63051dc3c09ca99d492fb3624b51
fbshipit-source-id: a0ca96e4c3db63051dc3c09ca99d492fb3624b51
2016-05-05 16:08:26 -07:00
Sebastian Gronewold 07767e86a3 Navigator - velocity override
Summary:
This code change allows changing the transition velocity of the navigator
when switching views.

Whats the use case? If you have different types of
animations your animations might also need different transition velocities.
Closes https://github.com/facebook/react-native/pull/5439

Differential Revision: D3264719

Pulled By: ericvicenti

fb-gh-sync-id: 1bc0a1191ed3bd51b624acd161c3ee77fd748d72
fbshipit-source-id: 1bc0a1191ed3bd51b624acd161c3ee77fd748d72
2016-05-05 15:06:47 -07:00
Konstantin Raev 1958e93f3a Fixed instrumentation test runner OK sniffing
Summary:
Fixed regex that looks for OK sign

**Test plan (required)**

- circle CI results
Closes https://github.com/facebook/react-native/pull/7410

Differential Revision: D3265016

fb-gh-sync-id: 1eba7297116d31f8bf3393733141058cf6a7454a
fbshipit-source-id: 1eba7297116d31f8bf3393733141058cf6a7454a
2016-05-05 12:54:02 -07:00
Eric Vicenti 472f815e45 NavigationExperimental: Add key to NavigationSceneRendererProps
Summary:
This should simplify the renderScene usage a bit because the react key is required and this will make sure they are rendered with the right key automatically.

It changes the string to make sure people do not rely on this API for anything else.

Reviewed By: javache

Differential Revision: D3033933

fb-gh-sync-id: 036424af28693be32c3a3290f5c6667a6a6a04ac
fbshipit-source-id: 036424af28693be32c3a3290f5c6667a6a6a04ac
2016-05-05 11:58:26 -07:00
Fred Liu 2a7f6aeda7 Swipeable row container
Reviewed By: hedgerwang

Differential Revision: D3263983

fb-gh-sync-id: f77bb3dd7771c16e1f26398171b7784e3d89cb1d
fbshipit-source-id: f77bb3dd7771c16e1f26398171b7784e3d89cb1d
2016-05-05 11:49:29 -07:00
Hedger Wang b1cd1cba32 Fix propType check for NavigationCard.
Summary:
the prop type check for NavigationCard -> SceneView -> sceneRendererProps is wrong.
Fix it.

Reviewed By: ericvicenti

Differential Revision: D3265049

fb-gh-sync-id: 16e89c932f0f962db4b6a647d62d255ba98f6156
fbshipit-source-id: 16e89c932f0f962db4b6a647d62d255ba98f6156
2016-05-05 11:39:29 -07:00
Konstantin Raev b824722501 Fixed nvm for travis CI
Summary:
NVM started failing on Travis
Closes https://github.com/facebook/react-native/pull/7411

Differential Revision: D3265199

fb-gh-sync-id: 6c80210cafb0ec6510073ce913a36eb7edcac2c6
fbshipit-source-id: 6c80210cafb0ec6510073ce913a36eb7edcac2c6
2016-05-05 11:25:28 -07:00
Hedger Wang ef44781f3d Kill NavigationLegacyNavigator.
Summary:
NavigationLegacyNavigator was originally created to help people to migrate to the new
navigation library without API changes. Therefore we'd have to port all the old APIs that
don't necessarily seem align well with the new navigation library.

Consider the production usage of NavigationLegacyNavigator does not exist, it's better
to kill it and we'd just rename the `Navigator` to `NavigatorDeprecated` later instead.

Reviewed By: ericvicenti

Differential Revision: D3263704

fb-gh-sync-id: a851fda1516d694cb7d119f5a1344f8fc676f7fd
fbshipit-source-id: a851fda1516d694cb7d119f5a1344f8fc676f7fd
2016-05-05 10:56:41 -07:00
Jimmy Mayoukou dd8caf4cf2 Implement returnKeyType/returnKeyLabel on Android
Summary:
This PR implements [`returnKeyType`](http://facebook.github.io/react-native/docs/textinput.html#returnkeytype) on Android.

It is implemented with [`EditText.setImeOptions()`](http://developer.android.com/reference/android/widget/TextView.html#setImeOptions(int)) that allows us to specify options on an input, in this case change the return button icon. To be noted that it is also possible to specify a string instead of an icon with [`EditText.setImeActionLabel()`](http://developer.android.com/reference/android/widget/TextView.html#setImeActionLabel(java.lang.CharSequence, int)) while being 2 different things I added both of these behaviors in this PR since it was mostly at the same place/component.

**Problems encountered :**

- All the `ReactEditText`s were set to `IME_ACTION_DONE` by default ([reference](a2157dbbe0/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java (L78))). I'm not sure
Closes https://github.com/facebook/react-native/pull/6905

Differential Revision: D3264755

Pulled By: dmmiller

fb-gh-sync-id: 4a090e31b620a245847c06ba1895cfea02e88d0f
fbshipit-source-id: 4a090e31b620a245847c06ba1895cfea02e88d0f
2016-05-05 10:22:19 -07:00
Christine Abernathy 02af7b57d0 Display platform-specific examples
Summary:
Rebased https://github.com/facebook/react-native/pull/7048

Sending a new PR to check that tests pass.

After adding simulator examples, it appears that some don't show up, ex:
http://facebook.github.io/react-native/docs/text.html#content

This is due to the fact that these examples are split into two platform-specific files. For this reason, the example code isn't being shown. The examples are also missing for TextInput.

**Test plan**

`cd website; npm install; npm start`

![screen shot 2016-05-05 at 12 25 41 pm](https://cloud.githubusercontent.com/assets/346214/15042571/08ee77e8-12bd-11e6-98a6-967dc5fefa07.png)

![screen shot 2016-05-05 at 12 25 20 pm](https://cloud.githubusercontent.com/assets/346214/15042573/119778f4-12bd-11e6-8cdd-fbf217223d45.png)

![screen shot 2016-05-05 at 12 25 35 pm](https://cloud.githubusercontent.com/assets/346214/15042570/071ae992-12bd-11e6-9cf6-5aaba5e7fa17.png)
Closes https://github.com/facebook/react-native/pull/7406

Differential Revision: D3264567

Pulled By: mkonicek

fb-gh-sync-id: cfb73eaed56a7b5c6c84ce313e113393d152e9a1
fbshipit-source-id: cfb73eaed56a7b5c6c84ce313e113393d152e9a1
2016-05-05 09:10:26 -07:00
Damien Varron 75c71cfbff Add instruction on how to have access to the bot in IssueGuidelines.md
Summary: Closes https://github.com/facebook/react-native/pull/7402

Differential Revision: D3264577

fb-gh-sync-id: 10c0e1f9f8eedf0b53e1b6c93f6aff61883169f6
fbshipit-source-id: 10c0e1f9f8eedf0b53e1b6c93f6aff61883169f6
2016-05-05 08:46:54 -07:00
Konstantin Raev 457e348081 Open sourced SwipeRefreshLayoutRecordingModule
Reviewed By: dmmiller

Differential Revision: D3264212

fb-gh-sync-id: 8790200a0d3c47050d6a91c906854b3a55640829
fbshipit-source-id: 8790200a0d3c47050d6a91c906854b3a55640829
2016-05-05 08:17:34 -07:00
Andy Street a1ba0918ab Protect against JS module call race condition while initializing react instance
Summary: Fixes a race condition where JS module functions could be called in between ##initializeWithInstance(catalystInstance);## and ##CatalystInstance#runJSBundle##, before the BatchedBridge in JS was set up. We now guarantee that all JS module methods that are called after `ReactContext#hasActiveCatalystInstance()` returns true will have the batched bridge created and ready to use.

Reviewed By: lexs

Differential Revision: D3258651

fb-gh-sync-id: 66e66533cc86d185e7c865376d6a5cdc6520d2d4
fbshipit-source-id: 66e66533cc86d185e7c865376d6a5cdc6520d2d4
2016-05-05 05:52:19 -07:00
Andy Street a69b883537 Simplify ReactRootView
Summary:
I need to do some refactoring of what happens when a ReactRootView is attached/detached from the window. In doing so, I found ReactRootView is way more complicated than it needs to be and very hard to understand. This simplifies it while maintaining functionality.

Basically:
- When you start a react application, if the root view is measured, we attach it to the instance.
- If it wasn't measured, we do nothing
- In onMeasure, if we have a ReactInstanceManager, but are not attached to it, attach to it.

None of this needs to depend on whether we're attached to the window or whether an attach is scheduled afaict.

Reviewed By: dmmiller

Differential Revision: D3260056

fb-gh-sync-id: 974c19ed75a07f83299472f75346bd6be7414128
fbshipit-source-id: 974c19ed75a07f83299472f75346bd6be7414128
2016-05-05 05:07:28 -07:00
Dave Miller a3146e41a2 Add pagingEnabled to HorizontalScrollView
Summary:
This adds support for pagingEnabled to the HorizontalScrollView.

This is an initial implementation.

Because Android doesn't provide great details about what is happening with a scroll view after you are done touching it, we have some post touch handling.  This is kicked off either by touch up or a fling call.
Once we are doing that handling, we start a runnable that basically checks if we are still scrolling.  If we are, we just schedule that runnable again and check a frame later.  If we are done scrolling (no onScrollChanged since we last fired), we could be in one of two states, the fling is done or we are done snapping to the page boundary.  If we are in the fling done case, we then check if we need to scroll to a page boundary.  If so, we call smoothScrollTo and schedule ourself to check onScroll events again until done with that scroll.  If we are done with both (either we only did momentum scroll or we did that and then snapped to page), we can then fire the final event and stop checking.  This logic is all in handlePostTouchScrolling.

Because of the decision to only do page scrolling after momentum ends, we do allow you to scroll through with momentum a number of pages and the transition can be a little strange where it stops a sec and then slides to be page aligned.  As a follow up, we can probably smooth that up by changing the value we pass to super.fling() that would adjust it to be let momentum carry it to the page boundary.

Reviewed By: weicool

Differential Revision: D3207608

fb-gh-sync-id: 02f62970ed9a5e3a5f9c0d959402756bc4b3699e
fbshipit-source-id: 02f62970ed9a5e3a5f9c0d959402756bc4b3699e
2016-05-05 04:14:22 -07:00
Chris Geirman a26afd2d73 clarify highlightRow usage with UIExplorer example
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

> From the existing documentation, it's not clear how one would make use of the highlightRow attribute of ListView.renderRow. Special thanks to halilb for his assistance.

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.

> Here's a screenshot of the UIExplorer with a row highlighted (using the FB Blue Color)
> <img width="466" alt="2016-03-16_1944" src="https://cloud.githubusercontent.com/assets/1640318/13835020/49b5b38c-ebb1-11e5-98fa-17201fd3db92.png">

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTIN
Closes https://github.com/facebook/react-native/pull/6495

Differential Revision: D3264092

Pulled By: nicklockwood

fb-gh-sync-id: 9608e8a66387f527b872928a3595ca4d17736b82
fbshipit-source-id: 9608e8a66387f527b872928a3595ca4d17736b82
2016-05-05 03:43:47 -07:00
Fred Liu d037840158 SwipeableRow fix
Reviewed By: fkgozali

Differential Revision: D3261975

fb-gh-sync-id: f0c75aca1b16f810420a78271937777c5068c9d2
fbshipit-source-id: f0c75aca1b16f810420a78271937777c5068c9d2
2016-05-04 19:51:18 -07:00
Fred Liu 9b1a3c79e9 Swipeable row component
Reviewed By: furdei

Differential Revision: D3259527

fb-gh-sync-id: c2503476eb708add8753de8c00d0c3f5f3058474
fbshipit-source-id: c2503476eb708add8753de8c00d0c3f5f3058474
2016-05-04 15:49:20 -07:00
Pieter De Baets e76998531c upgrade graceful-fs to v4.1.3 (2)
Reviewed By: bestander

Differential Revision: D3260213

fb-gh-sync-id: a23a275d022006dd44c993217385a3fe6d6ff88c
fbshipit-source-id: a23a275d022006dd44c993217385a3fe6d6ff88c
2016-05-04 13:58:29 -07:00
Pieter De Baets c4e79a4f54 upgrade node-haste to v2.11.0
Reviewed By: davidaurelio

Differential Revision: D3259486

fb-gh-sync-id: 220378ca5d2b83d30b196a2a825a9becaf6b2b32
fbshipit-source-id: 220378ca5d2b83d30b196a2a825a9becaf6b2b32
2016-05-04 13:58:28 -07:00
Adam Ernst 3105dc8d6e Reverted commit D3259193
Reviewed By: davidaurelio

Differential Revision: D3259193

fb-gh-sync-id: 563d40261fb0b1c1def2e0c33f6197d858a1c54a
fbshipit-source-id: 563d40261fb0b1c1def2e0c33f6197d858a1c54a
2016-05-04 12:12:27 -07:00
David Aurelio 7518c2f827 upgrade graceful-fs to v4.1.3
Reviewed By: davidaurelio

Differential Revision: D3259193

fb-gh-sync-id: d3f956fb1dc555df1bd5938a428c61de99b2fd95
fbshipit-source-id: d3f956fb1dc555df1bd5938a428c61de99b2fd95
2016-05-04 11:27:19 -07:00
Konstantin Raev 110d1587ae Added stability to OSS instrumentation tests
Summary:
This change makes all instrumentation tests to be executed in sequence in independent retriable processes.

With a new test being open sourced recently our CI stability degraded.
This PR should bring back stability because tests won't affect each other and will have shorter lifetime
Closes https://github.com/facebook/react-native/pull/7353

Differential Revision: D3259081

fb-gh-sync-id: 48ccdb5dbd561d416526497ff474378db9ca3c60
fbshipit-source-id: 48ccdb5dbd561d416526497ff474378db9ca3c60
2016-05-04 10:59:33 -07:00
Pieter De Baets 2760df761d Cleanup InitializeJavascriptAppEngine
Reviewed By: davidaurelio

Differential Revision: D3235141

fb-gh-sync-id: 86fc844c5e9d9ea57d504696bac30671c2079e7a
fbshipit-source-id: 86fc844c5e9d9ea57d504696bac30671c2079e7a
2016-05-04 10:50:32 -07:00
Jean-Richard Lai 2310494f32 Fix distanceFilter caching for LocationObserver
Summary:
Allow changing distanceFilter after _locationManager has been initialized.

There is 2 reasons for this PR:
- When calling `getCurrentPosition`, `_observerOptions` is possibly not set properly ( as it is set only in `startObserving`), in this case it would have default values so `distanceFilter` will be 0 in this case ( which can be the right value but we should be more explicit about it, `kCLDistanceFilterNone` or `RCT_DEFAULT_LOCATION_ACCURACY`):
<img width="961" alt="screen shot 2016-04-14 at 8 44 09 pm" src="https://cloud.githubusercontent.com/assets/159813/14551465/6aa8791a-0288-11e6-9c98-1687357f8c2a.png">
- Another issue is that `distanceFilter` is cached so it can't be changed afterwards:

```javascript
let options;
options = {
  enableHighAccuracy: true,
  distanceFilter: 20,
};

this.watchId = this.geolocation.watchPosition(
  () => { },
  () => { },
  options,
);

// => sets distanceFilter to 20

this.geolocation.clearWatch(this.watchId);

options = {
  enableHighAccuracy:
Closes https://github.com/facebook/react-native/pull/6987

Differential Revision: D3258956

fb-gh-sync-id: 00a1d1b29d732a54cdc30e20a7a9a2de3dd9b725
fbshipit-source-id: 00a1d1b29d732a54cdc30e20a7a9a2de3dd9b725
2016-05-04 10:35:30 -07:00
Alexander Blom 041185edfd Let JS modules use strings instead of ids on Android
Reviewed By: nicklockwood

Differential Revision: D3229626

fb-gh-sync-id: f8b2e8c9fc0d25d67f623cdbbe9930a02a40d1de
fbshipit-source-id: f8b2e8c9fc0d25d67f623cdbbe9930a02a40d1de
2016-05-04 10:29:26 -07:00
David Aurelio 5071907b27 Add verbose module names to dev builds
Summary:
This intends to make the devx story better after switching to numeric module IDs:

- `require('<verbose-name>)` works again for dev builds
- In dev builds, Systrace will use the verbose names of modules for markers

Reviewed By: bestander

Differential Revision: D3253318

fb-gh-sync-id: 3425d5086ce28634653a6c8c7f5f11afa1614902
fbshipit-source-id: 3425d5086ce28634653a6c8c7f5f11afa1614902
2016-05-04 09:33:22 -07:00
Martin Konicek 00167e4956 Add scripts for running tests locally
Summary:
I was going to add an integration test and realized it would be useful to have an easy way to run these test locally. Added scripts and documented how to use them.

**Test plan**

`./scripts/run-android-local-unit-tests.sh`

<img width="786" alt="screen shot 2016-05-04 at 3 55 26 pm" src="https://cloud.githubusercontent.com/assets/346214/15018667/7f4981cc-1212-11e6-9fcb-12493c29015c.png">

`./scripts/run-android-local-integration-tests.sh`

<img width="772" alt="screen shot 2016-05-04 at 3 57 23 pm" src="https://cloud.githubusercontent.com/assets/346214/15018677/90b54810-1212-11e6-83d4-58530eb41d79.png">

Buck check by replacing `which buck` by `which duck` in the scripts:

<img width="805" alt="screen shot 2016-05-04 at 4 09 37 pm" src="https://cloud.githubusercontent.com/assets/346214/15018696/aa008262-1212-11e6-9a22-173507cd771f.png">

Checked the website renders fine:

`cd website; npm install; npm start`

![screen shot 2016-05-04 at 4 05 23 pm](https://cloud.githubusercontent.com/asse
Closes https://github.com/facebook/react-native/pull/7386

Differential Revision: D3258717

fb-gh-sync-id: 023eb9fdb59b00f9507e2e0694ad0934bb564c03
fbshipit-source-id: 023eb9fdb59b00f9507e2e0694ad0934bb564c03
2016-05-04 08:58:18 -07:00
Nick Lockwood e72163f0f2 Added explicit init to observer modules
Summary:
Modules which call JS methods directly, or use `sendDeviceEventWithName:`, can trigger effects in JS without ever being referenced from the JS code. This breaks some assumptions in my earlier diff about when modules can be lazily loaded.

Pending a better solution, I've put explicit `init` methods in these modules to ensure they are eagerly initialized (the downside to this is that they'll still be initialized even if they are never used).

Reviewed By: javache

Differential Revision: D3258232

fb-gh-sync-id: f925bc2e5339c1fbfcc244d4613062c5ab848fc2
fbshipit-source-id: f925bc2e5339c1fbfcc244d4613062c5ab848fc2
2016-05-04 07:07:24 -07:00
Pieter De Baets a9a90aa2f0 Fix RCTProfileHookModules instantiating all modules
Reviewed By: tadeuzagallo

Differential Revision: D3235048

fb-gh-sync-id: bdcd72fb241c5136e884c1705e027f178939970b
fbshipit-source-id: bdcd72fb241c5136e884c1705e027f178939970b
2016-05-04 06:55:30 -07:00
Lim Chee Aun aebf4db45a Update HackerWeb in showcase
Summary:
Tiny little update: adding another blog post link on [how I build the Android app](http://cheeaun.com/blog/2016/05/building-hackerweb-android/).
Closes https://github.com/facebook/react-native/pull/7331

Differential Revision: D3258039

fb-gh-sync-id: f33a0b77f32cf18377741e0771db4189479350f3
fbshipit-source-id: f33a0b77f32cf18377741e0771db4189479350f3
2016-05-04 05:41:25 -07:00
Konstantin Raev ec5016ad8f Fixed path to regenerator-runtime
Summary:
Since 0.8.43 regenerator has regenerator-runtime dependency.
Fixes one js test in trunk
Closes https://github.com/facebook/react-native/pull/7351

Reviewed By: davidaurelio

Differential Revision: D3252699

Pulled By: bestander

fb-gh-sync-id: cedb122eb8e9f3a5e40a5313482bc2282511c71e
fbshipit-source-id: cedb122eb8e9f3a5e40a5313482bc2282511c71e
2016-05-04 05:19:31 -07:00
David Aurelio 46d98e1d68 remove support for `process.platform`
Reviewed By: javache

Differential Revision: D3252666

fb-gh-sync-id: af0e4987c34f43ec2472cbdf52fc112b81050513
fbshipit-source-id: af0e4987c34f43ec2472cbdf52fc112b81050513
2016-05-04 02:51:26 -07:00
Krzysztof Magiera 6c80f886ae Fix setValue to work properly on natively driven nodes
Summary:
This change fixes an issue with calling `setValue` for natively driven nodes. As of now an attempt to call this method from JS would trigger an error "Attempting to run JS driven animation on animated". That is because for natively animated nodes we don't allow for `setNativeProps` to be executed and method `_flush` is now responsible for triggering that call. To fix the issue we add extra flag to `_updateValue` method that indicates if we should be "flushing" updated values using `setNativeProps` and we pass an appropriate value depending on the status of the node (native/non-native). Note that in animation callback we always pass `true` - that is because natively driven animations will never call into that callback.

**Test Plan**
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Closes https://github.com/facebook/react-native/pull/7138

Differential Revision: D3257696

fb-gh-sync-id: 13ec26bc36b56b3208f4279a95532bbe60551087
fbshipit-source-id: 13ec26bc36b56b3208f4279a95532bbe60551087
2016-05-04 02:48:22 -07:00
jsdevel d4cc5b53c7 Setting current working directory for dev server.
Summary:
* This allows `react-native` to work for users on fedora.
* `react-native run-android` was failing because the launch packager script was unable to find packager.sh (see `source` in `man bash`).
* This change sets cwd for the dev server when run with `run-android`.
Closes https://github.com/facebook/react-native/pull/7316

Differential Revision: D3255866

fb-gh-sync-id: 88f6b18f7c61636ce8fecef77f7f4e60b1d9a637
fbshipit-source-id: 88f6b18f7c61636ce8fecef77f7f4e60b1d9a637
2016-05-04 02:45:29 -07:00
Thierry DEN HARTOG 80fc98cd61 Add new application "Chemin de Fer de Provence"
Summary: Closes https://github.com/facebook/react-native/pull/7357

Differential Revision: D3258040

fb-gh-sync-id: 65580e81d293ddf2e371879b85ab32fe4edfeee1
fbshipit-source-id: 65580e81d293ddf2e371879b85ab32fe4edfeee1
2016-05-04 02:13:28 -07:00
Damien Varron 048775c34b add damusnet to React Native GitHub Issue Task Force
Summary: Closes https://github.com/facebook/react-native/pull/7354

Differential Revision: D3257999

fb-gh-sync-id: 102d761d3aac50a8bcef82bcd1ce5919a5681dbf
fbshipit-source-id: 102d761d3aac50a8bcef82bcd1ce5919a5681dbf
2016-05-04 01:08:21 -07:00
Griffin Smith 5723915eaa Remove all null values for request headers
Summary:
NSMutableURLRequest appears to be running `[headerValue count]` on every value of the NSDictionary that `allHTTPHeaderFields` is set to, meaning that any `null` values passed to headers in an XHR throw an exception.  This differs from the implementation of XHR in browsers, which just ignore any `null` values for headers.

PR doesn't currently include tests, happy to add those if this is something you'd consider merging
Closes https://github.com/facebook/react-native/pull/6903

Differential Revision: D3256727

fb-gh-sync-id: 58e8db9c86a1fe7fbd95cba7dcf916957d179e0c
fbshipit-source-id: 58e8db9c86a1fe7fbd95cba7dcf916957d179e0c
2016-05-03 23:42:26 -07:00
Caio Hamamura 9ca8c09d62 Removed repeated "To"
Summary:
Just a simple word repetition fix in docs.
Closes https://github.com/facebook/react-native/pull/7352

Differential Revision: D3257587

fb-gh-sync-id: a54f38f3bbed9b50cb9c1f8a35d5718bad3deb33
fbshipit-source-id: a54f38f3bbed9b50cb9c1f8a35d5718bad3deb33
2016-05-03 21:55:24 -07:00
Anshul Agarwal 60ee25c554 Correct activity request code
Summary:
Change activity request code to IMAGE_PICKER_REQUEST in currentActivity.startActivityForResult(chooserIntent, IMAGE_PICKER_REQUEST);
Closes https://github.com/facebook/react-native/pull/7347

Differential Revision: D3257586

fb-gh-sync-id: fc92fb0bd3a66371fac22234b8a8b693a23fbf24
fbshipit-source-id: fc92fb0bd3a66371fac22234b8a8b693a23fbf24
2016-05-03 21:50:27 -07:00
Srikanth K Hari bf8b5499bb android websocket: include cookies with request
Summary:
Previously cookie headers weren't sending on websocket connection requests for android.
This commit fixes the issue.
Closes https://github.com/facebook/react-native/pull/6851

Differential Revision: D3257466

fb-gh-sync-id: 4225d11c8c6efd09493ef938a65f024dcbaff749
fbshipit-source-id: 4225d11c8c6efd09493ef938a65f024dcbaff749
2016-05-03 21:12:29 -07:00
James Ide 861dfb5d71 Update Exponent logo and links
Summary: Closes https://github.com/facebook/react-native/pull/7371

Differential Revision: D3257406

fb-gh-sync-id: 45d8800e84c19444ab0b2f24311b019e377fc776
fbshipit-source-id: 45d8800e84c19444ab0b2f24311b019e377fc776
2016-05-03 21:08:20 -07:00