Commit Graph

6452 Commits

Author SHA1 Message Date
Raincal 62f53ffaa7 remove paddingTop in AnimatedGratuitousApp
Summary:
Please see the screenshot below.
![qq20160525-0](https://cloud.githubusercontent.com/assets/6279478/15526182/74170a9e-2262-11e6-8f99-5e121ed7b9c1.png)
Closes https://github.com/facebook/react-native/pull/7733

Differential Revision: D3345791

fbshipit-source-id: 4e5885197a42b760a800970156fcdebadf227575
2016-05-25 00:13:31 -07:00
Chris Hopman a8acf8a5ce Move cxx module support into oss
Reviewed By: mhorowitz

Differential Revision: D3319751

fbshipit-source-id: 87f91a541cfbbe45bd8561d94f269ba976a9f702
2016-05-24 19:28:59 -07:00
MIYOKAWA, Nobuyoshi 04d86d819e Update XHR information for Android.
Summary:
Currently XHR also supports Android platform, so document should include this information.
Closes https://github.com/facebook/react-native/pull/7729

Differential Revision: D3345168

fbshipit-source-id: 8dee7d573a47aede5dc5be97640fc711747df65c
2016-05-24 19:28:59 -07:00
Basil Hosmer ac5636dd59 explicit type args in react-native-github
Reviewed By: vjeux

Differential Revision: D3342856

fbshipit-source-id: ba5a4d5529fc9d1d1efe98cc175d718c5f044a5b
2016-05-24 18:28:26 -07:00
Ahmed El-Helw caa2baee9d Fix leak in Nodes due to removeClippedSubviews
Reviewed By: astreet

Differential Revision: D3337513

fbshipit-source-id: b7b798f024488cd19cdcf93aee7f99eed512dd6a
2016-05-24 14:58:23 -07:00
Spencer Ahrens 0a027167de Fix WLV bug when data shrinks
Differential Revision: D3341453

fbshipit-source-id: 008cb65db6da74f2525ae8e667b702bc48f9f9ad
2016-05-24 13:28:20 -07:00
Andrei Coman 1926fdf156 Inline images package name fix
Summary: Renaming package name from textfrescosupport to text.frescosupport

Reviewed By: dmmiller

Differential Revision: D3340363

fbshipit-source-id: 6c73d9e05751ccba299489fbc13447dc85a9c0df
2016-05-24 12:43:30 -07:00
Konstantin Raev 2de0323182 Reverted commit D3339945
Summary: Updated networking and geolocation to use the new events system.

Reviewed By: javache

Differential Revision: D3339945

fbshipit-source-id: 01d307cf8a0aea3a404c87c6205132c42290abb1
2016-05-24 12:43:30 -07:00
Ben Alpert 8876eaaea0 Set up Systrace during initialization
Summary: When we're profiling, we want to load Systrace immediately and profile all the startup and initial render code. The code here used to load Systrace during startup only if `__DEV__` but would always start profiling once Systrace was otherwise required. That seems pretty hard to reason about, so I'm switching to always requiring Systrace during the startup path and enabling profiling if appropriate. In actual production that'll always be false, of course.

Reviewed By: javache

Differential Revision: D3338216

fbshipit-source-id: f173e82f34e110d83e7ff04f11af9b302a54b859
2016-05-24 12:13:24 -07:00
Alex Kotliarskyi 11449359e5 Add index page for packager
Summary:
When packager is running, visiting localhost:8081 produces ugly 404 "GET / not found"
This diff adds a simple index.html page that has a title and link to documentation.

It's a super tiny detail, but I hope it makes things a little nicer. Improvements are welcome.

Maybe we could include an offline copy of React Native's docs website?

Reviewed By: vjeux

Differential Revision: D3341242

fbshipit-source-id: c8cd4b647e69eb520ea8bc978bea070551225912
2016-05-24 11:58:23 -07:00
Rahul Jiresal 0e8c3ff463 Add a removeListener method to DeviceEventEmitter for Framework consi…
Summary:
The Framework is inconsistent in how listeners are removed in certain classes. This issue has been discussed in https://github.com/facebook/react-native/issues/6493.

For example,

**DeviceEventEmitter**

```javascript
/* Current */
this.keyboardHideObserver = DeviceEventEmitter.addListener('keyboardWillHide', this.keyboardWillHide);
this.keyboardHideObserver.remove();

/* Expected (maybe in addition to the current API) */
DeviceEventEmitter.addListener('keyboardWillHide', this.keyboardWillHide);
DeviceEventEmitter.removeListener('keyboardWillHide', this.keyboardWillHide);
```
**AppStateIOS**

```javascript
AppStateIOS.addEventListener('change', this.handleAppStateChange);
AppStateIOS.removeEventListener('change', this.handleAppStateChange);
```

The API should be consistent, and preferably should allow both ways of removing the listeners.

Currently, developers who tried to use the second way of removing the listeners get an error for function not found. Due to the lack of documenta
Closes https://github.com/facebook/react-native/pull/6884

Differential Revision: D3341235

Pulled By: nicklockwood

fbshipit-source-id: 87431e8b667f46ad002d4a6e3ca07cbc1e6b4007
2016-05-24 11:45:51 -07:00
Neo 986f67ac4f Add NeoReader to showcase
Summary:
detail about NeoReader
https://github.com/nihgwu/NeoReader/
Closes https://github.com/facebook/react-native/pull/7716

Differential Revision: D3341121

fbshipit-source-id: 91bea4e906c68b9a687be4edfb17a0e3ea815d64
2016-05-24 11:28:21 -07:00
Nick Lockwood 3f08fe4b7f Update RCTNetworking, RCTNetInfo and RCTLocationManager to use new events system
Summary: Updated networking and geolocation to use the new events system.

Reviewed By: javache

Differential Revision: D3339945

fbshipit-source-id: f1332fb2aab8560e4783739e223c1f31d583cfcf
2016-05-24 10:29:00 -07:00
Ben Nham 71bf8a3e48 Only clear image contents on memory warning
Summary:
Some apps are complaining about flashing images when performing navigation transitions. An example issue would be:

1. Load a master list view with many images
2. Click on an image to go to a detail view
3. Go back to the master list view

At step (3), users see a number of images flash from a placeholder image back to the final image because `-[RCTImageView didMoveToWindow]` calls `clearImage` when the image view exits the view hierarchy between (1) and (2) and calls `reloadImage` (which sets the image property asynchronously) when the image view re-enters the view hiearchy between (2) and (3).

This diff fixes the issue by being less aggressive about clearing image contents. It only clears image contents when the app receives a memory warning or the app goes into the background.

For comparison, CKNetworkImageComponent in ComponentKit doesn't have this purging behavior at all.

Reviewed By: javache

Differential Revision: D3325009

fbshipit-source-id: efca10099cdfdb49afbb3f550854d4b8a40511d0
2016-05-24 08:43:23 -07:00
taelimoh 7113367000 Changed module name from 'ReactNative
Summary:
Platform is in React-Native not React.
Closes https://github.com/facebook/react-native/pull/7718

Differential Revision: D3340334

fbshipit-source-id: 3816f8966bc5b675097182aaf3304d465fbebb95
2016-05-24 08:13:22 -07:00
David Aurelio 3d8725dfdb Respect original enumerability/writability when polyfilling globals
Summary:
Reuses the original property descriptor when overwriting / polyfilling globals to ensure enumerability and writability are the same
Closes https://github.com/facebook/react-native/pull/7704

Differential Revision: D3338119

Pulled By: davidaurelio

fbshipit-source-id: ab456324a3346cd3ec8b2c3e3a2378408c92087c
2016-05-24 06:58:17 -07:00
David Aurelio 6629ae9fdf adapt instantiation of node-haste/DependencyGraph to new version
Reviewed By: bestander

Differential Revision: D3339969

fbshipit-source-id: 2b81f8019223b060f3e3afb940cc58360ed024e5
2016-05-24 05:13:27 -07:00
Martin Kralik 2c8abebccc improved description for RCTTouchEvent
Summary: This will make error messages more helpful.

Reviewed By: javache

Differential Revision: D3292400

fbshipit-source-id: d1e0bb24593058b75422824c0d351ede1320029e
2016-05-24 05:13:27 -07:00
Janic Duplessis a71a9efe96 Remove deprecated PullToRefreshViewAndroid and onRefreshStart / endRefreshing
Summary:
Removes the deprecated APIs that were replaced by `RefreshControl`. Those API have been deprecated for a while already so I think it's fine to remove them at this point. Also ported the `SwipeRefreshLayoutTestModule` test to use `RefreshControl` instead of `PullToRefreshViewAndroid`.

**Test plan (required)**

Made sure no references are left in the codebase to `PullToRefreshViewAndroid`, `onRefreshStart` and `endRefreshing`.
Tested that `ScrollView` examples in UIExplorer still work properly.
Check that the `SwipeRefreshLayoutTestModule` passes on CI.
Closes https://github.com/facebook/react-native/pull/7447

Reviewed By: mkonicek

Differential Revision: D3292391

Pulled By: bestander

fbshipit-source-id: 27eb2443861e04a9f7319586ce2ada381b714d47
2016-05-24 03:28:25 -07:00
Nick Lockwood 18d6d85320 Fixed UIExplorer
Summary: CI_USE_PACKAGER flag was set only for testing, not running.

Reviewed By: nathanajah

Differential Revision: D3334982

fbshipit-source-id: 3f98e697bd144a4ac6d8d7cfabf546bb55de1695
2016-05-24 02:58:23 -07:00
Urban Cvek ddc374fac8 Add renderAsOriginal to selectedIcon
Summary:
Hey,
I've created a PR a few weeks ago #7264. It got merged in and then I received some emails and got mentioned in a few issues that it doesn't use renderAsOriginal prop on selectedIcon. Instead the app would use tint color.

The problem can be seen here #7467.

I've now added a method in TabBarItem that sets selectedIcon to renderAsOriginal if the prop is set.
I added a "relay" icon to UIExplorer TabBarIOS example so you can see the item is now rendered in color as the image supplied.

Oh and also should this PR be made from master. Had to work on this issue from 0.27 because the master was broken for me.
Closes https://github.com/facebook/react-native/pull/7709

Differential Revision: D3339795

fbshipit-source-id: d8d4699bb617ecae8996a6627f3774c6473c19e0
2016-05-24 01:58:23 -07:00
James Ide 1343248bbe Set statics on the NavigationCard container
Summary:
NavigationCard is wrapped in a container, which breaks statics so apply the statics to the wrapped class instead.
Closes https://github.com/facebook/react-native/pull/7483

Differential Revision: D3336226

Pulled By: ericvicenti

fbshipit-source-id: ae28e7be7a6227700c2c11081c5605f3667d1494
2016-05-23 20:43:28 -07:00
Konstantin Raev f60cabf34b website generation
Summary:
TestPlan:
- cd website
- node ./server/generate.js
Closes https://github.com/facebook/react-native/pull/7706

Differential Revision: D3335839

fbshipit-source-id: bd4a65d23ce242a5aa1d6a545dafa6be565e43c5
2016-05-23 12:28:38 -07:00
Anoop Chaurasiya be38ae1169 provide verbose error-message on bundle-load-failure
Reviewed By: fkgozali

Differential Revision: D3329107

fbshipit-source-id: 33c02ff066ec9ad415a5cc4639347ebdef67c604
2016-05-23 11:13:24 -07:00
Hedger Wang 0b72eba869 Fix UI Explorer in Android.
Summary:
The refactor work (renamed `navigationState.children` to `navigationState.routes`) from D3333735
broken UI Explorer in Android. Fix it.

Reviewed By: ericvicenti

Differential Revision: D3334014

fbshipit-source-id: 345fbb5eabc792a49c6f2f82ce8c03679bc75940
2016-05-23 10:58:26 -07:00
Eric Rozell 68af89dcbf Update node-haste dependency to 2.12.0
Summary:
Update to node-haste 2.12.0 to support pass through configuration of supported platforms.
Closes https://github.com/facebook/react-native/pull/7660

Differential Revision: D3335034

Pulled By: mkonicek

fbshipit-source-id: d238b90a90d51654301d61251ceb26d183fef57a
2016-05-23 10:28:34 -07:00
Fred Liu ca71143ff4 Faster animation
Summary: Reduce auto-swipe animation duration to 200 ms to increase swipe speed.

Reviewed By: zjj010104

Differential Revision: D3333942

fbshipit-source-id: a9e0b15926ef854adcd9e1d2c1e67fd080139d84
2016-05-23 10:28:34 -07:00
Emil Sjolander 1767a0a828 Correctly implement measure callback with measure modes
Reviewed By: astreet

Differential Revision: D3330139

fbshipit-source-id: 2ea6e4b463817e9ccc5f2d9395736f68f8d972e4
2016-05-23 10:28:34 -07:00
Marc Horowitz f7c4ed8926 Fix chrome debugging on android
Summary:
Java loadApplicationScript changed, but the C++ code in the
debug ProxyExecutor which called it did not.  This fixes the fbjni
method lookup.

fixes #7659

Reviewed By: AaaChiuuu

Differential Revision: D3331472

fbshipit-source-id: 33312dccc3c7687f51742e42f9e0397f9c925e76
2016-05-23 09:43:23 -07:00
Alexander Blom 81e4b4202a Don't block waiting for UI thread to be ready
Reviewed By: astreet

Differential Revision: D3323227

fbshipit-source-id: bc8a815f9dca43c8c1adebc7b2554f931f135f33
2016-05-23 09:28:21 -07:00
Nick Lockwood d9737571c4 Updated AppState module to use new emitter system
Summary: AppState now subclasses NativeEventEmitter instead of using global RCTDeviceEventEmitter.

Reviewed By: javache

Differential Revision: D3310488

fbshipit-source-id: f0116599223f4411307385c0dab683659d8d63b6
2016-05-23 09:13:37 -07:00
Nick Lockwood c87b737ca1 Fixed tests
Reviewed By: bestander

Differential Revision: D3334669

fbshipit-source-id: ba0ae2ec5ea06c27d40ceed3ca8bf7a9da27dda9
2016-05-23 08:28:28 -07:00
David Aurelio 4c76e5476c remove premature optimizations
Reviewed By: javache

Differential Revision: D3325805

fbshipit-source-id: cdf8f4f3744d70fd37e8fa35c44ca8110ea4395a
2016-05-23 07:28:25 -07:00
Konstantin Raev 5d06402b4a Made npm deployment to be independent of git tags cache
Summary:
Fixes npm deployment script as in https://circleci.com/gh/facebook/react-native/6745.

Example situation:
- admin is ready to release 0.26.0
- admin adds tag v0.26.0 and pushes to origin
- Circle CI build fails because of code error
- admin cherry-picks a fix and tags v0.26.0 again and pushes to origin
- Circle does not update local tag v0.26.0 because it already has it cached, compiles the code but fails to deploy to npm because v0.26.0 is not on branch HEAD from Circle point of view

The previous version of the script was checking the tags on current commit as well but it used the local branch tags.
This change fetches tags from `origin` fresh and allows us to redeploy the same version multiple times.
Closes https://github.com/facebook/react-native/pull/7619

Differential Revision: D3334469

fbshipit-source-id: b423fc19516dc4f5f7f2605224e62b8a378c8a7d
2016-05-23 06:58:28 -07:00
Shiran Ginige a3f50ec8a0 Fixing the issue on packager (failing with siblings error)
Summary:
The packager was failing with below error after a fresh clone

npm ERR! peerinvalid The package react@15.1.0 does not satisfy its siblings' peerDependencies requirements!

Changed the dependancy for **^react@15.1.0-alpha.1** to **^react@15.1.0** and it was fixed.
Closes https://github.com/facebook/react-native/pull/7692

Differential Revision: D3334425

fbshipit-source-id: ee86fc2e3c6f19b2430658d91d0a88c50bcf11de
2016-05-23 06:13:20 -07:00
Janic Duplessis bb5aede6e3 Fix RefreshControl race condition
Summary:
Improved version of #7317.

`setRefreshing` and `setProgressViewOffset` needs to be called after the view has been layed out. Instead of using `post` to do that we update the `refreshing` and `progressViewOffset` values in the first call to `onLayout`.

I also noticed that `progressViewOffset` default value wasn't exactly the same as when not calling `setProgressViewOffset` at all. Tweaked the values to match android defaults.

**Test plan (required)**
Make sure the integration test passes,
In UIExplorer: test RefreshControl with `refreshing = true` initially, test `progressViewOffset`.
Closes https://github.com/facebook/react-native/pull/7683

Differential Revision: D3334426

fbshipit-source-id: ddd63a5e9a6afe2b8b7fe6a25e875a40f4e888c6
2016-05-23 05:43:25 -07:00
James Ide 69bf0bd8c1 Run CircleCI tests on the latest version of Node
Summary:
Travis CI runs Node 4 (LTS), so make CircleCI run Node `<latest>` which is Node 6.
Closes https://github.com/facebook/react-native/pull/7542

Differential Revision: D3334397

fbshipit-source-id: 15a758011626fca4efdc4c1b36891a4d73c52e94
2016-05-23 05:13:29 -07:00
Pieter De Baets 4880309e72 Prevent Systrace from including React in the preloaded modules section
Reviewed By: tadeuzagallo

Differential Revision: D3304923

fbshipit-source-id: 25dea5b57002578ccb3e38e8946c6b73db008ed0
2016-05-23 04:58:24 -07:00
MIYOKAWA, Nobuyoshi 8f9a3aa0e2 Add .iml to ignore target.
Summary:
Sorry for trivial one, but I feel no need to share '.iml' in a project, so it should be ignored.
Closes https://github.com/facebook/react-native/pull/7689

Differential Revision: D3334367

fbshipit-source-id: 2a68aa93084a51d0b3d24427c71bc7c12e41ed78
2016-05-23 04:58:24 -07:00
Konstantin Raev 4378ecb8e1 Fixes NPE when NetworkingModule runs onCatalystInstanceDestroy
Reviewed By: andreicoman11

Differential Revision: D3328278

fbshipit-source-id: 7cf43a4564b2b799b13307f8604eb48e5c512379
2016-05-23 04:44:11 -07:00
Nathan Azaria 913b4ccee4 Changed RUNNING_ON_CI to CI_USE_PACKAGER environment variable.
Reviewed By: javache

Differential Revision: D3327726

fbshipit-source-id: 6293b71a2ca7783b089f16fe2089c8893e93a621
2016-05-23 04:44:11 -07:00
Nick Lockwood c8f39c3d2c Added small decoded image cache to prevent images flashing when component is reloaded
Summary:
In RN we cache image data after loading/downloading an image, however the data we store is the compressed image data, and we decode this asynchronously each time it is displayed.

This can lead to a slight flicker when reloading image components because the decoded image is discarded and then re-decoded.

This diff adds a small (5MB) cache for decoded images so that images that are currently on screen shouldn't flicker any more if the component is reloaded.

Reviewed By: bnham

Differential Revision: D3305161

fbshipit-source-id: 9969012f576784dd6f37d9386cbced2df00c3e07
2016-05-23 03:43:30 -07:00
Hedger Wang 1e626027f5 Rename `navigationState.children` to `navigationState.routes`.
Summary:
[Experimental API breaking changes]

The notion of `parent` or `children` in navigaton is misleading. We have no intention to maintain or
build the nested or hierarchical navigation states. To be clear, rename `navigationState.children` to
`navigationState.route`.

Reviewed By: ericvicenti

Differential Revision: D3332115

fbshipit-source-id: c72ed08acaf030fb9c60abf22fb15cc0f44b3485
2016-05-22 16:28:27 -07:00
Philip Heinser 75d538e3eb Added passpoints to showcase
Summary:
Adding an app to the Showcase.
Closes https://github.com/facebook/react-native/pull/7645

Differential Revision: D3332779

fbshipit-source-id: 2fa4ce62106b9a2fbc2126a2e4126cb52f773c53
2016-05-21 12:28:21 -07:00
Joel Marcey 14dd3845c9 Make Getting Started labels a bit more clear
Summary:
"Target" over "Platform" to represent target for your RN app
"Development OS" over "OS" to represent your RN Development environment

<img width="526" alt="screenshot 2016-05-21 09 48 47" src="https://cloud.githubusercontent.com/assets/3757713/15449679/87e1c9fa-1f39-11e6-99e9-822c2022c4db.png">
Closes https://github.com/facebook/react-native/pull/7674

Differential Revision: D3332780

fbshipit-source-id: b0acfc843e00a9bd71b940c5f51507667ba5123e
2016-05-21 11:43:25 -07:00
Joel Marcey 97f803bc2e Add information about verifying Xcode Command Line Tools are installed
Summary:
<img width="694" alt="screen shot 2016-05-19 at 10 12 35 am" src="https://cloud.githubusercontent.com/assets/3757713/15402657/3f9a5896-1daa-11e6-842d-7a6c57b86b9f.png">
Closes https://github.com/facebook/react-native/pull/7637

Differential Revision: D3332705

Pulled By: JoelMarcey

fbshipit-source-id: a01b98305fe1b11559e7c9893e7844cb37599fc4
2016-05-21 09:58:25 -07:00
Andrej Badin 6d616d0e5b Improve Navigation panel column layout for landscape/portrait
Summary:
Improve column layout for _phone vs. tablet_ & _portrait vs landscape_ variations.
This change only affects handheld devices, or devices with really small (physical) screen dimensions.

See previews bellow:

Phone - landscape
![phone-landscape](https://cloud.githubusercontent.com/assets/829963/15448311/53863428-1f5e-11e6-9e05-d98587b9752f.png)

Phone - portrait
![phone-portrait](https://cloud.githubusercontent.com/assets/829963/15448309/5385eb9e-1f5e-11e6-8d12-6bda7e1d2e7f.png)

Tablet - landscape
![tablet-landscape](https://cloud.githubusercontent.com/assets/829963/15448312/538719a6-1f5e-11e6-9a2c-52d0c9109f09.png)

Tablet - portrait
![tablet-portrait](https://cloud.githubusercontent.com/assets/829963/15448310/53862636-1f5e-11e6-87ff-727568d7dd1f.png)
Closes https://github.com/facebook/react-native/pull/7669

Differential Revision: D3332676

Pulled By: vjeux

fbshipit-source-id: 8cfc1903e35fd62c82fcd8dd1e05a1e2062c555d
2016-05-21 09:13:22 -07:00
Janic Duplessis 6961fd23ba Use a separate babel config for the local-cli and the packager
Summary:
This separates the babel config of the local-cli and the packager from the one used by the transforms of the packager since it doesn't run in the same environment and the local-cli/packager doesn't require react specific transforms and runs in node 4 so we can also avoid some es2015 transforms that node already supports.

I had to move the code in cli.js so it can still run in node 0.12 that doesn't support `const` since it is no longer transformed.

**Test plan**
Run the local-cli on node 0.12 and there should be a message saying that it requires at least node 4.
Run the local-cli on node 4 and 5 and everything should work the same as before.

I was also hoping for some perf gains but there was nothing noticeable. I did benchmark the babel-register call and it stayed pretty much the same. As for runtime performance it can help if there are optimisations for es2015 features in node.
Closes https://github.com/facebook/react-native/pull/6155

Reviewed By: bestander

Differential Revision: D3301008

Pulled By: davidaurelio

fbshipit-source-id: 504180d158a1e50bc03e28fb0d1e53d0731ce32f
2016-05-21 06:58:26 -07:00
Nicolas Charpentier 25ea176f63 Fix tab in Examples/UIExplorer/SwitchExample.js
Summary: Closes https://github.com/facebook/react-native/pull/7585

Differential Revision: D3332470

fbshipit-source-id: 660dbb3e635a45cff35583b1a01094ec09ecb6fb
2016-05-21 00:13:27 -07:00
Chris Hopman 2ec9e0c690 Stop catching exceptions in the cxx bridge
Reviewed By: mhorowitz

Differential Revision: D3186631

fbshipit-source-id: 5664897b82277159c2b74b289f9a5d416633e243
2016-05-20 18:58:25 -07:00