Commit Graph

6376 Commits

Author SHA1 Message Date
Hedger Wang c3714d7ed7 Kill <NavigationView />
Summary:
= Breaking Change (for experimental features) =

<NavigationView /> serves no obvious benefit and it's costly to maintain it.

- its features could be completely replaced by NavigationAnimatedView without
  enabling the transtion animation.

- it could also be replaced with a simple view and normal scene renderer.

Reviewed By: ericvicenti

Differential Revision: D3280547

fbshipit-source-id: 4ac3dbe92ceb9107a1f6e77a78bd6021485e78a9
2016-05-11 16:23:26 -07:00
Alexander Blom 0934470676 Remove JS config completely
Reviewed By: astreet

Differential Revision: D3276230

fbshipit-source-id: b3ab7e7dc149696b7db1049613fbb6a2a19bc8fb
2016-05-11 11:39:20 -07:00
Joel Marcey 4a7f2192f9 Add docs survey link to site header
Summary:
**Test plan**

Tested locally to see link in header bar and that it takes you to survey.

![screenshot 2016-05-11 08 21 11](https://cloud.githubusercontent.com/assets/3757713/15186299/593fd4f6-1751-11e6-847f-ea73ce4e2809.png)
Closes https://github.com/facebook/react-native/pull/7514

Differential Revision: D3287859

fbshipit-source-id: 48dfdbae74622330f192d5763c5e47025f1887b1
2016-05-11 11:05:52 -07:00
Nick Lockwood 9ee1f37bad Added native event emitter
Summary:
This is a solution for the problem I raised in https://www.facebook.com/groups/react.native.community/permalink/768218933313687/

I've added a new native base class, `RCTEventEmitter` as well as an equivalent JS class/module `NativeEventEmitter` (RCTEventEmitter.js and EventEmitter.js were taken already).

Instead of arbitrary modules sending events via `bridge.eventDispatcher`, the idea is that any module that sends events should now subclass `RCTEventEmitter`, and provide an equivalent JS module that subclasses `NativeEventEmitter`.

JS code that wants to observe the events should now observe it via the specific JS module rather than via `RCTDeviceEventEmitter` directly. e.g. to observer a keyboard event, instead of writing:

    const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
    RCTDeviceEventEmitter.addListener('keyboardWillShow', (event) => { ... });

You'd now write:

    const Keyboard = require('Keyboard');
    Keyboard.addListener('keyboardWillShow', (event) => { ... });

Within a component, you can also use the `Subscribable.Mixin` as you would previously, but instead of:

     this.addListenerOn(RCTDeviceEventEmitter, 'keyboardWillShow', ...);

Write:

    this.addListenerOn(Keyboard, 'keyboardWillShow', ...);

This approach allows the native `RCTKeyboardObserver` module to be created lazily the first time a listener is added, and to stop sending events when the last listener is removed. It also allows us to validate that the event strings being observed and omitted match the supported events for that module.

As a proof-of-concept, I've converted the `RCTStatusBarManager` and `RCTKeyboardObserver` modules to use the new system. I'll convert the rest in a follow up diff.

For now, the new `NativeEventEmitter` JS module wraps the `RCTDeviceEventEmitter` JS module, and just uses the native `RCTEventEmitter` module for bookkeeping. This allows for full backwards compatibility (code that is observing the event via `RCTDeviceEventEmitter` instead of the specific module will still work as expected, albeit with a warning). Once all legacy calls have been removed, this could be refactored to something more elegant internally, whilst maintaining the same public interface.

Note: currently, all device events still share a single global namespace, since they're really all registered on the same emitter instance internally. We should move away from that as soon as possible because it's not intuitive and will likely lead to strange bugs if people add generic events such as "onChange" or "onError" to their modules (which is common practice for components, where it's not a problem).

Reviewed By: javache

Differential Revision: D3269966

fbshipit-source-id: 1412daba850cd373020e1086673ba38ef9193050
2016-05-11 06:27:29 -07:00
Spencer Ahrens 2d43663ac8 Remove cruft from ScrollView
Reviewed By: dmmiller

Differential Revision: D3287077

fbshipit-source-id: dfc238469bce540d69c38d3e17c87163e10d7b23
2016-05-11 05:22:20 -07:00
楚怀 4b4c040af7 fix FPSGraph label setText not execute on main thread
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?
as apple states, all UIKit methods should execute on main thread, while FPSGraph is not.

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**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.

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/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests"
Closes https://github.com/facebook/react-native/pull/7500

Differential Revision: D3287011

Pulled By: tadeuzagallo

fbshipit-source-id: 23c4248c8dc65d337afb12626e597dfb6a621e96
2016-05-11 04:11:25 -07:00
Spencer Ahrens 892e509a0c Fix flow and lint for ScrollView
Summary:
- getScrollResponder returns a...ScrollView!
- no more var
- no more string refs

Reviewed By: spicyj

Differential Revision: D3286596

fbshipit-source-id: d9e6e0a318eadd2521c9f5c69d2ec368f1d7b626
2016-05-11 03:00:27 -07:00
Fred Liu 052cd7eb8a SwipeableListView
Summary:
- Updated SwipeableListView to be much more performant by checking `rowHasChanged` more vigorously
- New `SwipeableListViewDataSource` used to mask implementation details from caller

Reviewed By: fkgozali

Differential Revision: D3272172

fbshipit-source-id: 02f66ed7fce7d587118ad7d82b20f8e78db44b7b
2016-05-11 00:25:20 -07:00
Alex Leventer a0384dad3c Add Splash to Showcase
Summary:
Add an additional react native app to the showcase page.
Closes https://github.com/facebook/react-native/pull/7499

Differential Revision: D3286553

fbshipit-source-id: f057217b4db6cb1134e15abbca1067483066a68e
2016-05-10 23:25:48 -07:00
Alex Ledak 2a150cc30a Update name & app icon for 'New Music' app
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**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.

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/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7420

Differential Revision: D3286539

fbshipit-source-id: a7df51f0ae485a0c9efa52ec47e8ac023a2319bf
2016-05-10 23:23:30 -07:00
ztodorovic 3abccd9640 Add "Nabava.net" app to the showcase.
Summary: Closes https://github.com/facebook/react-native/pull/7486

Differential Revision: D3286537

fbshipit-source-id: 1057fea7baa8f42470239c78834c5af41f1450ac
2016-05-10 23:20:21 -07:00
Elijah Windsor 574e81e8cb Adding clapit to showcase
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**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.

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/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7494

Differential Revision: D3286536

fbshipit-source-id: cb6be7717d977017ae7b1a297543c3269bceb53b
2016-05-10 23:17:23 -07:00
Dan Seethaler a053f53860 Typo fix.
Summary: Closes https://github.com/facebook/react-native/pull/7487

Differential Revision: D3286538

fbshipit-source-id: 4c989e7a444b1f93ac4bc27131e25b93305b1148
2016-05-10 22:45:21 -07:00
nemothecapt df9a2b20a1 React.PropTypes.oneOf accepts array as parameter, non-array given
Summary:
React.PropTypes.oneOf accepts array as parameter, non-array given. this make the app throw a warning.
Closes https://github.com/facebook/react-native/pull/7498

Differential Revision: D3285737

fbshipit-source-id: 3d86b4b36d696e054f9225d7e3a9eddf91477813
2016-05-10 21:04:23 -07:00
Ben Alpert a95405f419 Update to React 15.1.0-alpha.1
Reviewed By: zpao

Differential Revision: D3283057

fbshipit-source-id: c37ea3818597e5c0f37ed3c7502c791c02183ea8
2016-05-10 15:58:24 -07:00
Olivier Notteghem 68b2f49a31 Improves react image loading handlers to mimic iOS behavior
Reviewed By: vjeux

Differential Revision: D3283011

fbshipit-source-id: acb04f8b2ccbab99a59040a7ca70aa46cbf73faa
2016-05-10 14:17:27 -07:00
Joel Marcey c1f0ce283c Getting Started Cleanup
Summary:
1. Remove note about upgrading Homebrew packages. That was kind of noisy.
2. Use local images instead of those stored on Akamai.
3. Add wording for modifying test project about actually opening a file.
4. Add note about keeping initial defaults for Android Studio install in tact.

Tested site locally. Images and new wording appeared as expected.
Closes https://github.com/facebook/react-native/pull/7477

Reviewed By: vjeux

Differential Revision: D3281639

Pulled By: JoelMarcey

fbshipit-source-id: ca956d97293ac3793431cb54f3560ee3e52c0dce
2016-05-10 11:17:27 -07:00
Martin Kralik 1b00534793 improve view clipping
Summary:
Previously we had an issue where we would clip visible views during an animation, like swiping back a VC.
The root cause was mismatch between a view's frame and what is visible on screen. This happens because during an animation the frame (and other properties) of the animated view has final values, even that it's not yet rendered at that position.

This diff fixes this issue by not looking for a clippingView above the react root view, since the animation for VC transitions happens at view higher above the root view.

Reviewed By: javache

Differential Revision: D3281655

fbshipit-source-id: 996b1a9f223c5b2274dd3d7c05b8936612af05ba
2016-05-10 10:51:24 -07:00
David Aurelio ce0594dece Add forwarding modules for modules required by React
Reviewed By: bestander

Differential Revision: D3281736

fbshipit-source-id: e061d3ec0b0d9ca4d3ee8234757457617dd6c985
2016-05-10 10:31:24 -07:00
David Aurelio d5ceb4175b Allow already loaded modules to be `require`’d by name string in dev mode
Summary:
The code to require modules by their name (rather than their numeric ID) was buggy, because it didn’t check whether the module factory was already executed and the module already existed.

This diff checks the already loaded modules, too, when loading modules by name.

Reviewed By: lexs

Differential Revision: D3281350

fbshipit-source-id: cef236e152fe5484f21c877d6cee37433fa11c76
2016-05-10 09:37:20 -07:00
Andy Street f1d12f6b38 Make runJSBundle synchronous
Summary: This is called on the JS thread so we don't need to post a runnable.

Reviewed By: lexs

Differential Revision: D3281388

fbshipit-source-id: ff292a710442c0b84c6ee31a2644a5c2ea650dc9
2016-05-10 09:21:24 -07:00
Andy Street 1c31aea83f Update "This shouldn't be possible. Congratulations." error message
Summary: Apparently this *is* possible. Congratulations to me.

Reviewed By: nicklockwood

Differential Revision: D3281361

fbshipit-source-id: 53c6ab83d959aa8a77880f4f772a7a7d7ccf4950
2016-05-10 09:17:23 -07:00
Tadeu Zagallo 65af925501 Avoid text relocations on arm trampoline
Summary:
fixes #7337

`ldr reg, =symbol` will cause a text relocation, which will fail to link if that's not allowed (which is the default for dynamic libraries).

Reviewed By: jspahrsummers

Differential Revision: D3281518

fbshipit-source-id: a057b4b9a54d568c8753a9dcd00365a86c7d93b0
2016-05-10 09:09:19 -07:00
Konstantin Raev 4c3286f2a2 Made UIManager set displayContstants
Reviewed By: andreicoman11

Differential Revision: D3281309

fbshipit-source-id: f5568f2127e7e26dcbd77b3845092346ac06c0db
2016-05-10 08:34:31 -07:00
Nurym Kudaibergen ff7f260ce9 Updated Babel supported transformations link
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**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.

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/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7485

Differential Revision: D3281418

Pulled By: vjeux

fbshipit-source-id: 287b66f1ed9690bf488cf646f8eaf02e2956caa5
2016-05-10 06:53:20 -07:00
Andy Street 6ec5b953cb Red box c++ exceptions thrown while executing sync hooks
Summary: Also adds support for creating JS Error objects. When we clean up the way global functions are installed on JSC, we'll be able to use this pattern to auto-catch all c++ exceptions at this level.

Reviewed By: lexs

Differential Revision: D3276663

fbshipit-source-id: bf3561690013019a25e2be5a4d1b69ba9e002c72
2016-05-10 05:03:30 -07:00
Pieter De Baets ca1caf2713 Enable no-duplicate-props lint rule
Reviewed By: davidaurelio

Differential Revision: D3281234

fbshipit-source-id: 1b382694ad7a647464add4d1c856e7dde472205d
2016-05-10 05:00:24 -07:00
Tomas Roos cd9271567f Add flow directive to index.android.js
Summary:
iOS template contains flow directive in top comment. Android should too for consistency.
Closes https://github.com/facebook/react-native/pull/7482

Differential Revision: D3281131

fbshipit-source-id: d9a77196faed5e41753d09768721e1da1e6cc60a
2016-05-10 03:11:21 -07:00
Jimmy Mayoukou d3e5a96b15 Fix tintColor prop platform in Image
Summary:
`tintColor`, even in style, works on Android; this must be some old comment but that confused me when reading the docs.

**Test plan:**
- Launched website locally
Closes https://github.com/facebook/react-native/pull/7465

Differential Revision: D3278166

fbshipit-source-id: 4e986e0f2a9ba05de4404b93d28687596fbb4fad
2016-05-09 15:29:24 -07:00
James Ide 6d1790a625 Add li.st (Android) to the showcase
Summary: Closes https://github.com/facebook/react-native/pull/7478

Differential Revision: D3277536

fbshipit-source-id: 92a48007a5bd0c5e981c9b8956a045b7af4b1b40
2016-05-09 13:38:24 -07:00
Martin Konicek 128d93b8aa Revert Android websocket: Include cookies with request
Summary:
This reverts the commit bf8b5499bb
Pull request: https://github.com/facebook/react-native/pull/6851
Internal Phabricator revision: D3257466

See the pull request for discussion.

Reviewed By: bestander

Differential Revision: D3277433

fbshipit-source-id: 623f93e1bce47ac156ffab154c57495b85ffa936
2016-05-09 13:37:29 -07:00
Nikhilesh Sigatapu d4f6f61a96 Increase the stack size for the React queue on older Android phones
Summary:
Older Android devices don't have a large stack by default and with about 16 levels of views the app will crash. Modern Android devices are fine so we can continue to use the system defaults while using a 2MB stack on older Android devices.
Closes https://github.com/facebook/react-native/pull/7416

Differential Revision: D3276805

Pulled By: astreet

fbshipit-source-id: a7b31a1be62e13f333148ca0908eb01a11aa4562
2016-05-09 11:48:23 -07:00
Nick Lockwood 963a53b1a7 Fixed XHR tests
Summary:
The XMLHttpRequest jest tests were attempting to call a private method in XMLHttpRequestBase.js (denoted by an _ prefix).

JS doesn't actually have any language-level support for private methods, the use of _ prefix is just a convention. But to prevent casually calling private methods externally, we have a transform that mangles the names of prefixed methods so that that attempting to call them will fail.

Using a double _ bypasses this name-mangling mechanism, while still making it clear that the method is intended to be private.

Reviewed By: javache

Differential Revision: D3276261

fb-gh-sync-id: e0c17e1003d2df09d1a16f78ae9d95bef923d74e
fbshipit-source-id: e0c17e1003d2df09d1a16f78ae9d95bef923d74e
2016-05-09 10:36:24 -07:00
Will Fong e737891242 Add troubleshooting and modification for linux
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**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.

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/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7471

Differential Revision: D3276360

Pulled By: JoelMarcey

fb-gh-sync-id: 30edd7086a3c4b88695dc91af76ef56d43306ce9
fbshipit-source-id: 30edd7086a3c4b88695dc91af76ef56d43306ce9
2016-05-09 09:58:19 -07:00
Atif Mansoor 146df61775 Fix bug on GettingStarted.md page when clicking nav buttons in FF
Summary:
Hi,
The [commit](156d3ed7a2?_pjax=%23js-repo-pjax-container) by JoelMarcey is much appreciated.  However, when you click on the nav buttons in Firefox (v46.0.1, I'm on El-Capitan), it will switch the content but also navigate you to the React-Native homepage.  This doesn't happen in Chrome, so that's how it probably slipped through.
I propose these changes to fix that.

**Test plan**
Tested locally on FF and Chrome on El-Capitan
Closes https://github.com/facebook/react-native/pull/7435

Differential Revision: D3276285

Pulled By: vjeux

fb-gh-sync-id: c9a14059e609297fe273d02fe6c0a5f98ec7060c
fbshipit-source-id: c9a14059e609297fe273d02fe6c0a5f98ec7060c
2016-05-09 09:42:21 -07:00
Eric Vicenti b24d471fb2 Backed out D3033933
Reviewed By: hedgerwang

Differential Revision: D3273603

fb-gh-sync-id: e013fd3efd793960d076d2a01447b2a11f483ede
fbshipit-source-id: e013fd3efd793960d076d2a01447b2a11f483ede
2016-05-09 08:33:18 -07:00
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