Summary:This makes the `refreshing` prop more 'controlled'. Before forgetting to set the refreshing prop in the onRefresh callback would make the js and native `refreshing` prop get out of sync and make the RefreshControl stop refreshing properly (see #5839).
I also added a simple usage example and a note about the refreshing prop in the doc.
There was also a small bug in the doc generation code that made the array of color show as [[object Object]] instead of [color] so I fixed that too.
** Test plan**
Tested using the UIExplorer example on iOS and Android. Not setting the `refreshing` prop to true in the `onRefresh` function should cause the RefreshControl to stop refreshing immediately and continue working properly after.
Closes#5839
Closes https://github.com/facebook/react-native/pull/6434
Differential Revision: D3046279
Pulled By: nicklockwood
fb-gh-sync-id: ebda04c659a10f0b9d468473c8d5c659256ca1b5
shipit-source-id: ebda04c659a10f0b9d468473c8d5c659256ca1b5
Summary:The custom java view example on the website frontpage was pretty outdated :)
**Test plan (required)**
Tested by running the website locally.
Closes https://github.com/facebook/react-native/pull/6435
Differential Revision: D3045976
fb-gh-sync-id: 7b9c48fe78988a7f2b329427a477a28abac99f11
shipit-source-id: 7b9c48fe78988a7f2b329427a477a28abac99f11
Summary:fast & accurate implementation
See https://github.com/gre/bezier-easing
the library is embedded in React Native
fixes#6207 & to follow #6340 (or to replace it)
cc vjeux
tests
---
[the lib tests](https://github.com/gre/bezier-easing/blob/master/test/test.js) ensure the library is accurate.
It is tested that the library have a precision better than ±0.000001 .
performance
---
On my macbook pro, [the lib benchmark](https://github.com/gre/bezier-easing/blob/master/benchmark.js) have:
```
BezierEasing: instanciation x 1,043,725 ops/sec ±1.46% (82 runs sampled)
BezierEasing: call x 7,866,642 ops/sec ±0.93% (85 runs sampled)
BezierEasing: instanciation + call x 803,051 ops/sec ±1.58% (74 runs sampled)
```
Closes https://github.com/facebook/react-native/pull/6433
Differential Revision: D3045854
Pulled By: vjeux
fb-gh-sync-id: b3c5dba19195a6719967b4fdc8ef940cc067b1f4
shipit-source-id: b3c5dba19195a6719967b4fdc8ef940cc067b1f4
Summary:Running CI tests with emulator, not a graddle wrapper.
This should make things faster
Closes https://github.com/facebook/react-native/pull/6421
Differential Revision: D3042505
fb-gh-sync-id: 455264f90044c22ed3ec8cf9cb6d5edc2efedcdb
shipit-source-id: 455264f90044c22ed3ec8cf9cb6d5edc2efedcdb
Summary:Currently, an empty `<ScrollView />` on iOS always throws the warning "Sticky header index 0 was outside the range {0, 0}".
This is because the error-reporting code relies on the assumption that `stickyHeaderIndices` exists, and when it doesn't the error check thinks there's an index when there really isn't.
Note that this only changes error reporting and won't affect apps out of debug mode.
**Test plan**
I created a sample app and included an empty `<ScrollView />`. Without this change the "Sticky header..." warning was displayed on every run through. With this change implemented, the warning went away.
Closes https://github.com/facebook/react-native/pull/6417
Differential Revision: D3042178
Pulled By: nicklockwood
fb-gh-sync-id: 7afefd428a5fcb03867bcb69e46c46fe1ae9151e
shipit-source-id: 7afefd428a5fcb03867bcb69e46c46fe1ae9151e
Summary:Add a couple functions to show and hide a small window with buttons to start/stop
systrace and reload the current bridge. After stop profiling, the results will
be saved to a temporary file, and a share sheet will show up with the file attached
so that you can send it to your computer whatever way is more convenient.
Depends on D2700069
Reviewed By: jspahrsummers
Differential Revision: D2811560
fb-gh-sync-id: 5e91ece3a7ea748d4cb5fbc612a9b76ab80fc8f3
shipit-source-id: 5e91ece3a7ea748d4cb5fbc612a9b76ab80fc8f3
Summary:This is the last bits needed to fix Windows compatibility on master, most of the work was done in node-haste.
**Test plan**
Run npm test
Run the packager using Windows and Mac
cc cpojer davidaurelio
Closes https://github.com/facebook/react-native/pull/6260
Reviewed By: dmmiller, bestander
Differential Revision: D3005397
Pulled By: davidaurelio
fb-gh-sync-id: e16847808ebfa8b234315b2093dba204c9c1e869
shipit-source-id: e16847808ebfa8b234315b2093dba204c9c1e869
Summary:Removed eslint rule that checks modules
After we updated to ESLint 2.x, ESLint started complaining `'use strict' is unnecessary inside of modules strict`.
This is correct behaviour because according to spec modules are strict.
The problem is that our transforms don't transpile strict mode so we still need to have this pragma in all our code.
I did not find a way to make eslint require "use strict" for ES6 modules: https://github.com/eslint/eslint/issues/2785
So I am removing this.
What stops us from automatically adding strict mode with babel?
Need your feedback, frantic martinbigio
David said that you Martin looked into this.
Closes https://github.com/facebook/react-native/pull/6403
Differential Revision: D3038039
Pulled By: martinbigio
fb-gh-sync-id: b8a00c093768a318487dcb89e433859825a08b2c
shipit-source-id: b8a00c093768a318487dcb89e433859825a08b2c
Summary:Add note about side-specific properties not being applied to `TextInput`s if `multiline=false`.
Fix formatting of docs describing other `multiline={true/false}` quirks.
Closes https://github.com/facebook/react-native/pull/2240
Differential Revision: D3037154
Pulled By: andreicoman11
fb-gh-sync-id: d64db906c2ab0054f2357b8e218725414d9868d6
shipit-source-id: d64db906c2ab0054f2357b8e218725414d9868d6
Summary:Need to make sure we can use both versions of npm client for publishing and installing
**Test plan (required)**
Make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/6364
Differential Revision: D3036537
fb-gh-sync-id: a3c1ea16f0aeb7b1327574b511aac7594fd3d7e6
shipit-source-id: a3c1ea16f0aeb7b1327574b511aac7594fd3d7e6
Summary: The exportedConstants method incurrs a penalty at bridge startup time for every module that implements it. This diff removes exportedConstants from a few modules that don't really need to use it.
Reviewed By: majak
Differential Revision: D2982341
fb-gh-sync-id: be016187d7b731a073311daacfcf88a0402e1688
shipit-source-id: be016187d7b731a073311daacfcf88a0402e1688
Summary:If website has node_modules installed `npm tests`
**Test plan (required)**
```
cd website && npm install
cd .. && npm test
```
Before this fix we see this error:
Error: Failed to build DependencyGraph: providesModule naming collision:
Duplicate module name: ViewportMetrics
Paths: react-native/node_modules/react/lib/ViewportMetrics.js collides with react-native/website/node_modules/react/lib/ViewportMetrics.js
Closes https://github.com/facebook/react-native/pull/6170
Differential Revision: D3001147
Pulled By: bestander
fb-gh-sync-id: a040edf097183e6899c0ff49785ff36bd465eb61
shipit-source-id: a040edf097183e6899c0ff49785ff36bd465eb61
Summary:**Motivation**
AppStateIOS never currently returns `inactive` as a possible state. I had a requirement that when inactive, certain portions of the app should be blacked out in accordance with compliance rules. This is not possible currently, due to `inactive` never being returned. This PR fixes that.
**Test plan**
All base tests are passing. Are there AppState specific tests in place at the moment that I'm missing?
**Demonstration**
![appstate](https://cloud.githubusercontent.com/assets/286616/13640546/1cb6eeb0-e5e3-11e5-8d64-332ea3383a54.gif)
Closes https://github.com/facebook/react-native/pull/6379
Differential Revision: D3035530
Pulled By: nicklockwood
fb-gh-sync-id: 93deccc8184816809926dca8a95f2bebd1434987
shipit-source-id: 93deccc8184816809926dca8a95f2bebd1434987
Summary:Everything wrapped in `<Incremental>` is rendered sequentially via `InteractionManager`.
The `onDone` callback is called when all descendent incremental components have
finished rendering, used by `<IncrementalPresenter>` to make the story visible all at once
instead of the parts popping in randomly.
This includes an example that demonstrates streaming rendering and the use of
`<IncrementalPresenter>`. Pressing down pauses rendering and you can see the
`TouchableOpacity` animation runs smoothly. Video:
https://youtu.be/4UNf4-8orQ4
Ideally this will be baked into React Core at some point, but according to jordwalke that's
going to require a major refactoring and take a long time, so going with this for now.
Reviewed By: ericvicenti
Differential Revision: D2506522
fb-gh-sync-id: 5969bf248de10d38b0ac22f34d7d49bf1b3ac4b6
shipit-source-id: 5969bf248de10d38b0ac22f34d7d49bf1b3ac4b6
Summary:**Motivation**
Multiple instances of `Text` inside a `ListView` is a bad idea for the performance of the app.
When you create 1000 elements and you scroll through the list it is really slow and laggy because the `NSTextStorage`, which is the backbone of the `RCTText` element, will set more than 1,000 times and also the method `setNeedsDisplay` is called multiple times. This will causes huge memory problems and the app crashes.
With this commit I check in `RCTText` if the `NSTextStorage` differs from the old value. If yes then set it otherwise don't set the `NSTextStorage`. This will prevent to call `setNeedsDisplay` when not really needed.
Gist with sample app to show behavior can be found here: https://gist.github.com/bpoetzschke/28a17969c6aa54219e18
Closes https://github.com/facebook/react-native/pull/6341
Differential Revision: D3035485
Pulled By: nicklockwood
fb-gh-sync-id: 181f01b7f87f765dbb01a4ad3196fc40f9d50694
shipit-source-id: 181f01b7f87f765dbb01a4ad3196fc40f9d50694
Summary:This pull request moves the content of the Releases tab to the version number next to the title. With the search bar, the header was getting too crowded.
- I've cleaned up the search style a bit and made it look like the React one (with the background color).
- I've also improved the styling of the versions page.
![screen shot 2016-03-09 at 2 22 17 pm](https://cloud.githubusercontent.com/assets/197597/13652946/e0584326-e603-11e5-96f7-962debb1b43a.png)
Closes https://github.com/facebook/react-native/pull/6388
Differential Revision: D3033151
Pulled By: vjeux
fb-gh-sync-id: ec44f8f1a50331cd001c6cb7723f084751c342ab
shipit-source-id: ec44f8f1a50331cd001c6cb7723f084751c342ab
Summary:Cocoapods requires that the version should be greater than zero. So if you have your react-native dependency pointing to the master repo it will fail when you pod install.
Closes https://github.com/facebook/react-native/pull/6381
Differential Revision: D3032151
fb-gh-sync-id: 0ba820b8e746e7f03e963f292ec8ccf55263dcc7
shipit-source-id: 0ba820b8e746e7f03e963f292ec8ccf55263dcc7
Summary:Algolia is now indexing each version of the docs, let's use it :)
Closes https://github.com/facebook/react-native/pull/6385
Differential Revision: D3031426
Pulled By: vjeux
fb-gh-sync-id: f06855bda304f491aaac28663c2d24b142a80d75
shipit-source-id: f06855bda304f491aaac28663c2d24b142a80d75
Summary:Turns out even using nanoseconds as timestamps will not guarantee that events
won't happen at the same time. This fixes sorting for event comparison.
Differential Revision: D3030540
fb-gh-sync-id: 2630c50ea60a792ea07b1bf1c6cd46a6d9859268
shipit-source-id: 2630c50ea60a792ea07b1bf1c6cd46a6d9859268