Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**
(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/face
Closes https://github.com/facebook/react-native/pull/8869
Differential Revision: D3580218
Pulled By: JoelMarcey
fbshipit-source-id: 9f71825ed0a63739497ec7fa77081df0a72b6747
Summary:
Files were moved to the js/ directory so UIExplorer did not work anymore on iOS, this fixes the path.
Closes https://github.com/facebook/react-native/pull/8841
Differential Revision: D3576752
fbshipit-source-id: 921ddc2e158ee0c74dcf691a32504900c5d79e1d
Summary:
Attempt to fix https://github.com/facebook/react-native/pull/8612
We re-named `mainActivityPath` by `mainFilePath` in the `link` code, but we forgot to rename config parameters. Currently, link is broken.
- [x] `react-native link` should work for react-native 0.29+
Closes https://github.com/facebook/react-native/pull/8807
Differential Revision: D3576176
fbshipit-source-id: 60ecbd660563923696bbef1ed3b0900a7d58469f
Summary:
As per javache comments in #8734.
Also removes now useless feature detection check.
**Test plan**
Tested that rIC still works in UIExplorer example.
Closes https://github.com/facebook/react-native/pull/8795
Differential Revision: D3572566
Pulled By: javache
fbshipit-source-id: 261d13d8b03898313f8b4184d634c70f81a61b62
Summary:
For now, `PanResponder.create()` return a new object which may hold a handle
for interaction. The handle is created when the gesture starts, and it's cleared
when the gesture finishes.
However, the handle may become stale cause the owner (view) is removed or
re-rendered before the gesture finishes, which leaves InteractionManager
with handles that can never be removed.
In some cases, this blocks the app that waits for InteractionManager to
be idle and having leaky handles prevents InteractionManager from being idle
again.
The fix is to move the handle from the instance to the static variable, and
we'd clear it whenever a gesture finishes.
Reviewed By: sahrens
Differential Revision: D3550699
fbshipit-source-id: 412e9046a6cd9be34b3a7d572258008016a29f41
Summary:
This changes the JS location of the examples (2048, UIExplorer, Movies, and TicTacToe) to be set from RCTBundleURLProvider instead.
This also makes the example apps run the bundle script, which makes the build time longer.
Reviewed By: javache
Differential Revision: D3516371
fbshipit-source-id: 70e53c62feb81c067df4e2298e7d1f1458777490
Summary:
This changes the jest preprocessor so that files targetet at node.js will be run with the node-specific transform.
It also adapts tests that relied on inline requires.
Benefit: packager tests run faster now.
Reviewed By: cpojer
Differential Revision: D3562007
fbshipit-source-id: e06c86d545926a5c546458025f505dca115e7ea8
Summary: Instead of the somewhat odd concept of a "packager running predicate", just expose a class method for generating a JS bundle URL given a host, root, and options. This can be used by consumers that need custom behavior.
Reviewed By: javache
Differential Revision: D3564185
fbshipit-source-id: b1a7e66a2dada6a9eefe783b12b03fca7a330be3
Summary:
The description of `AlertIOS.prompt()` parameter `defaultValue` is wrong, correct it.
Closes https://github.com/facebook/react-native/pull/8793
Differential Revision: D3566939
fbshipit-source-id: c6378d8142c66e9f9b854f216afcf10c489ec750
Summary:
Make it more obvious that pull requests should generally target the `master` branch. Provide visible clarity in both the `CONTRIBUTING.md` and the actual pull request template.
Closes https://github.com/facebook/react-native/pull/8748
Differential Revision: D3566827
fbshipit-source-id: 6326f18b93594e928b1c4e0d09a739a8ccedaa62
Summary:
I went through and checked what React Native exports that we don't have any autogen docs for, and added the missing stuff into the whitelist. The extra docs seem useful.
Still not reference-documented because docgen chokes:
AppStateIOS
ART
Keyboard
LinkingIOS
Platform
RecyclerViewBackedScrollView
Touchable
UIManager
I also fixed up a bit of alphabetical order
Closes https://github.com/facebook/react-native/pull/8791
Differential Revision: D3566466
Pulled By: lacker
fbshipit-source-id: 0d7c1f242c96bf9afe5f8b54ea7e0b6891effa4b
Summary:
I updated the showcase instructions during the docdown but after getting some more requests I think these should be more specific.
Two things in particular. It isn't very useful to link to some generic page on the company's own website, especially if the company has zero news coverage. Secondly, this content should be in English because that's what most readers know.
So I just updated the instructions to say this.
Closes https://github.com/facebook/react-native/pull/8788
Differential Revision: D3564132
Pulled By: JoelMarcey
fbshipit-source-id: d75adda0d2161e795436d0075b814a40c69383a3
Summary:
The link to source of NativeMethodsMixin.js and ReactNativeBaseComponent.js in direct manipulation page is broken, fix it.
Closes https://github.com/facebook/react-native/pull/8774
Differential Revision: D3564954
Pulled By: JoelMarcey
fbshipit-source-id: 315fdbc5186b3f13e71ec84c9e683a7caaef1cfd
Summary:
In Android, `RecyclerViewBackedScrollView` wasn't using `refreshControl` prop.
If a ListView were created with `RecyclerViewBackedScrollView` as its `renderScrollComponent`, then the `refreshControl` wouldn't work.
example:
```js
<ListView
dataSource={this.props.dataSource}
renderRow={this._renderRow.bind(this)}
refreshControl={
<RefreshControl
refreshing={this.props.isRefreshing}
onRefresh={this._onRefresh.bind(this)}
/>
}
renderScrollComponent={props => <RecyclerViewBackedScrollView {...props} />}/>;
```
This works in iOS, since the `RecyclerViewBackedScrollView` just returns an `ScrollView`.
This pull request uses the `refreshControl` to decide whether it should wrap the `NativeAndroidRecyclerView` with an
`AndroidSwipeRefreshLayout` or not.
This fixes the issue #7134.
Closes https://github.com/facebook/react-native/pull/8639
Differential Revision: D3564158
fbshipit-source-id: c10a880ea61cd80b8af789b00be90d46d63eaf9a
Summary:
Two things in this diff:
1. Implemented `getItemPosition` in our adapter; the default implementation always returns POSITION_UNCHANGED, which is incorrect, and causes `destroyItem` to never (sometimes?) be called.
2. Fix `destroyItem`: this never worked. `destroyItem` is always called by the ViewPager after a `notifyDataSetChanged()`, so after `removeViewAt`, which removes the view from `mViews`, causing `destroyItem` to throw `IndexOutOfBoundsException` when it tries to get the view. Since our item objects are just views, use that instead of checking `mViews`.
Reviewed By: ahmedre
Differential Revision: D3555427
fbshipit-source-id: 900c2696162d07f507e850517d483b943ce39a35
Summary:
I might be a little pedantic here but it is what it is ;-)
Closes https://github.com/facebook/react-native/pull/8783
Differential Revision: D3561962
Pulled By: hramos
fbshipit-source-id: b44af2c1a2586bb6f8b2460631b8fe208b925c4d
Summary: When pasting text longer than maxlenght, the textDidChange: call we did would end calling back into textView:shouldChange: because we saw an unexpected multi-character change. Since this is an expected mutation, update predictedText appropriately.
Reviewed By: majak
Differential Revision: D3561524
fbshipit-source-id: 07bb78d830ccfa3aed6ee274dc30adeadce9e1f8
Summary: This is causing log spew in all Android RN apps because we try to close a non-existing web socket.
Reviewed By: foghina
Differential Revision: D3548998
fbshipit-source-id: 27392915bdf456c88f44c3b394c5c9d2ea1bab54