Commit Graph

6240 Commits

Author SHA1 Message Date
Pieter De Baets 57ceeafd4f Move UI-specific logic from NativeModules to UIManager
Summary: Move all requires of UIManager to UIManager.js, so we can load the view manager configuration lazily when UIManager is required.

Reviewed By: majak

Differential Revision: D3270147

fb-gh-sync-id: 8208ee8d5919102ea5345e7031af47ee78162fe0
fbshipit-source-id: 8208ee8d5919102ea5345e7031af47ee78162fe0
2016-05-09 08:21:19 -07:00
Nick Lockwood ed1ee9bc0f Fixed crash due to inserting a nil object into an array
Summary: Fixed a crash where making a network request with unrecognized/unsupported scheme would crash by attempting to insert a nil RCTNetworkTask into an array.

Reviewed By: javache

Differential Revision: D3275810

fb-gh-sync-id: be208c6bf87d882209901b850dcc25da4ba79a08
fbshipit-source-id: be208c6bf87d882209901b850dcc25da4ba79a08
2016-05-09 08:18:47 -07:00
Jesse Sessler 191d278fda Modal Status Bar Translucent
Summary:
Currently the Modal component on Android is rendered below the Status Bar, which changes it's color to grey, and in the UIExplorer example the backdrop is just formatted to look the same color. In some scenarios users may want to preserve the color of their status bar and make it look as though the modal is appearing on top. This PR allows for that.

This GIF shows current behavior and new behavior with the translucentStatusBar prop set to true.

![](http://g.recordit.co/BSX5g9obRC.gif)

I've updated the UIExplorer app to demonstrate and the docs as shown below

![image](https://cloud.githubusercontent.com/assets/4265163/14742854/500e1292-086c-11e6-9275-71808b0cbed7.png)

Thanks!
Closes https://github.com/facebook/react-native/pull/7157

Differential Revision: D3264497

Pulled By: dmmiller

fb-gh-sync-id: 61346d99414d331d3420f44a4c5f6341b0973be6
fbshipit-source-id: 61346d99414d331d3420f44a4c5f6341b0973be6
2016-05-09 07:08:22 -07:00
Alexander Blom abca466037 Remove name property from native modules
Reviewed By: javache

Differential Revision: D3275674

fb-gh-sync-id: 7c100c78576b48f3163c37b93499dd54da73b96c
fbshipit-source-id: 7c100c78576b48f3163c37b93499dd54da73b96c
2016-05-09 05:46:23 -07:00
Will Fong 28cc8c9776 Fix typo (.bash instead of .bashrc)
Summary: Closes https://github.com/facebook/react-native/pull/7464

Differential Revision: D3275748

fb-gh-sync-id: a59e6f54425906c4018f122174a86d80afa021eb
fbshipit-source-id: a59e6f54425906c4018f122174a86d80afa021eb
2016-05-09 05:42:19 -07:00
Pieter De Baets d7de68241f Index UIManager.Commands correctly
Reviewed By: nicklockwood

Differential Revision: D3275652

fb-gh-sync-id: a38e9cf6a46f2aa373b4948aa419b42af402c784
fbshipit-source-id: a38e9cf6a46f2aa373b4948aa419b42af402c784
2016-05-09 05:25:23 -07:00
Andy Street 54f7ae1c02 Force react applications to be explicitly unmounted
Summary:
We previously were unmounting the react application unconditionally when the ReactRootView#onDetachedFromWindow. This is nice in that it automatically allows us to reclaim memory, but there are many scenarios where a ReactRootView can be embedded in another piece of UI that detaches its children as part of its normal function (e.g. ListView, RecyclerView, ViewPager, etc).

As such, we will now enforce that the hosting Activity/Fragment/??? explicitly calls unmountReactApplication in the same way it calls startReactApplication. For Applications extending ReactActivity/AbstractReactActivity, this will happen automatically in onDestroy.

Reviewed By: foghina

Differential Revision: D3265161

fb-gh-sync-id: 4d49b0c41256213f00874f57e784aa8741dbf394
fbshipit-source-id: 4d49b0c41256213f00874f57e784aa8741dbf394
2016-05-09 04:09:29 -07:00
UnoDeTantos f7ce0c1c2f Adds progressViewOffset to RefreshControl
Summary:
Add the possibility to define a progress view top offset to RefreshControl on android. As i comment in #6740, contentInset does the trick on IOS.

Looking android documentation seems that exists a possible solution:
http://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html#setProgressViewOffset(boolean, int, int)

This pull request implement that but keeping it simple, only a top offset.

For example, now we could put navigation bar over the scrollview (or listview) and define a progressViewOffset on RefreshView in order to start behind the navigation. At this point we could make some kind of coordinator layout to hide/show navigation on scroll.

To maintain the default behavior, start point is equal to start point minus progress circle diameter in order to create that progress circle before the start point.
Closes https://github.com/facebook/react-native/pull/6759

Differential Revision: D3240664

Pulled By: mkonicek

fb-gh-sync-id: ccf866272e871811c1c6dcc2a34f5c217967feee
fbshipit-source-id: ccf866272e871811c1c6dcc2a34f5c217967feee
2016-05-09 01:51:22 -07:00
MIYOKAWA, Nobuyoshi 2953a1a02e replace XCode to Xcode.
Summary:
Fixing very trivial typos.  'XCode' should be 'Xcode'.
Closes https://github.com/facebook/react-native/pull/7451

Differential Revision: D3275295

fb-gh-sync-id: 440972364229ca980e5211277baa342a20ac5d94
fbshipit-source-id: 440972364229ca980e5211277baa342a20ac5d94
2016-05-08 23:14:53 -07:00
Janic Duplessis 9aa37e8fb2 Make RefreshControl properly controlled by JS
Summary:
There was an issue with the way we made `RefreshControl` a controlled component when react doesn't render synchronously. This fixes the issue by using the same technique used in the commit 0cd2904b23 for`PickerAndroid`

**Test plan (required)**

Tested normal behaviour and tested that if not setting the `refreshing` prop to `true` during the `onRefresh` callback that the `RefreshControl` stops refreshing immediately. Also made sure that `setNativeProps` is only called if needed when the native refreshing state is not in sync with JS.

Fix #7414
Closes https://github.com/facebook/react-native/pull/7445

Differential Revision: D3274981

fb-gh-sync-id: a1b9d46329f552984e33d11fa0e29ad6da689511
fbshipit-source-id: a1b9d46329f552984e33d11fa0e29ad6da689511
2016-05-08 17:03:18 -07:00
Alessandro Nadalin b88d9d2380 Fixed typo
Summary: Closes https://github.com/facebook/react-native/pull/7448

Differential Revision: D3274779

fb-gh-sync-id: ae50ff1939778663af2f212fd510ed04ea640bb2
fbshipit-source-id: ae50ff1939778663af2f212fd510ed04ea640bb2
2016-05-08 11:47:49 -07:00
wusuopu 17f08070e8 Animated: Implement toJSON method of Animated
Summary:
Fix issue https://github.com/facebook/react-native/issues/7441
Closes https://github.com/facebook/react-native/pull/7442

Differential Revision: D3274594

fb-gh-sync-id: 720d7dcdaa97a2ee5235547bad6ba020398b57d2
fbshipit-source-id: 720d7dcdaa97a2ee5235547bad6ba020398b57d2
2016-05-08 01:09:21 -07:00
Ben Alpert 0cd2904b23 Fix Android picker controlling
Reviewed By: mkonicek

Differential Revision: D3261602

fb-gh-sync-id: da67d28420c5d855d672b481deeb92fa8b5d017c
fbshipit-source-id: da67d28420c5d855d672b481deeb92fa8b5d017c
2016-05-07 15:52:19 -07:00
Milan Pavlik 0fab691e6f Remove default argument syntax on getVersionedGithubPath()
Summary:
Removes ES6 syntax of default arguments to fix website building as per #7434. [More info](https://github.com/facebook/react-native/pull/7434).
Closes https://github.com/facebook/react-native/pull/7439

Differential Revision: D3274206

fb-gh-sync-id: 3a8f5950ead91cf59c27fd384e97bf9587005398
fbshipit-source-id: 3a8f5950ead91cf59c27fd384e97bf9587005398
2016-05-07 14:10:33 -07:00
Milan Pavlik 1d101f4236 Add versions to GitHub source links in documentation. #7428
Summary:
Documentation references to source code on GitHub should point to their respective versions in order to avoid confusion and prevent broken links when the master branch differs from the currently viewed version. [More details](https://github.com/facebook/react-native/issues/7428)

Originally links pointed to a hardcoded master branch on GitHub. The change augments the GitHub url to point to a respective branch of the code. The new urls are as follows:

next: `https://github.com/facebook/react-native/blob/master/<path>`
stable: `https://github.com/facebook/react-native/blob/0.25-stable/<path>`

The website module currently does not have a unit test setup. As a result, I performed the following tests:

1. Start the server with `RN_VERSION=next` and verified all links point to _master_
<img width="945" alt="screen shot 2016-05-07 at 14 10 58" src="https://cloud.githubusercontent.com/assets/1419286/15092307/ee66fb32-145d-11e6-92a0-d03169e517c2.png">
2. Start the server
Closes https://github.com/facebook/react-native/pull/7434

Differential Revision: D3274000

Pulled By: vjeux

fb-gh-sync-id: 70d766984d6b0835f0a18928d6831fd2c82b6c7b
fbshipit-source-id: 70d766984d6b0835f0a18928d6831fd2c82b6c7b
2016-05-07 08:36:21 -07:00
Alexander Blom c6d3ca858e Avoid bounce to same message queue
Reviewed By: astreet

Differential Revision: D3269661

fb-gh-sync-id: b22ea45de9e9ddbe8471f10e9c475a5746aec34e
fbshipit-source-id: b22ea45de9e9ddbe8471f10e9c475a5746aec34e
2016-05-07 02:36:28 -07:00
Sokovikov ff431734a4 Revert "Revert "fix border style without borderRadius""
Summary: Closes https://github.com/facebook/react-native/pull/7389

Differential Revision: D3269828

Pulled By: mkonicek

fb-gh-sync-id: 896789fcc76953a035cf8701d3a90211b92b6b80
fbshipit-source-id: 896789fcc76953a035cf8701d3a90211b92b6b80
2016-05-06 09:23:22 -07:00
prabakarviji d03d455cc4 Add Reach24 App to React Native showcase
Summary:
Submitting PR for adding Reach24 App to React Native showcase
Closes https://github.com/facebook/react-native/pull/7294

Differential Revision: D3245068

Pulled By: mkonicek

fb-gh-sync-id: a3eb316279f1c96dd2da33566730f690229405cf
fbshipit-source-id: a3eb316279f1c96dd2da33566730f690229405cf
2016-05-06 08:56:18 -07:00
David Aurelio 0c90ab493f Add Random Access Module file names to stack traces
Reviewed By: javache

Differential Revision: D3269450

fb-gh-sync-id: 41b2013d4422c2bcafa7628321d4626fd40aac5d
fbshipit-source-id: 41b2013d4422c2bcafa7628321d4626fd40aac5d
2016-05-06 05:54:23 -07:00
Alexander Blom 097f59112f Make MessageQueue.RemoteModules lazy
Reviewed By: javache

Differential Revision: D3252400

fb-gh-sync-id: 11a31fd2e1e41c6a3ad538b08ef177207780bd88
fbshipit-source-id: 11a31fd2e1e41c6a3ad538b08ef177207780bd88
2016-05-06 04:14:23 -07:00
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