Commit Graph

6492 Commits

Author SHA1 Message Date
Alex Kotliarskyi 0656b96354 Redbox: skip column number if it is 0
Summary:
Format before:
```
methodName
file_name.js @ 42:0
```

Format after
```
methodName
file_name.js:42
```

Reviewed By: javache

Differential Revision: D3350320

fbshipit-source-id: 456deb66bd34deb24bf8b8aa958883bdf4f99129
2016-05-27 11:43:34 -07:00
Nick Lockwood 1623e34c51 Updated Linking and PushNotificationIOS modules to use NativeEventEmitter
Reviewed By: javache

Differential Revision: D3352819

fbshipit-source-id: d218791a16aba597d2544691ef993711cf00522c
2016-05-27 10:28:23 -07:00
Nick Lockwood a4b5f1bf10 Test perf effect of reverting D3269333
Reviewed By: javache

Differential Revision: D3346235

fbshipit-source-id: 2008f8fb9df5d61da59bb0067b25acd5a71f256f
2016-05-27 09:58:28 -07:00
Siqi Liu 60e0d2c676 Make "Debug JS" dev menu option persist across app restarts on RN Android
Summary:
1. Make "Remote JS Debug" and "Start/Stop Profile" options persist across app restarts.
2. Check and confirm:
       - All options in the Android dev menu are persisted now.
       - The behavior is the same on Android and iOS now.

Reviewed By: mkonicek

Differential Revision: D3340097

fbshipit-source-id: 4087b6605031c650e164282244cedb006f8f6fd3
2016-05-27 09:58:27 -07:00
Javier Hernández 8d4b15d253 Add Ticketea
Summary:
Add Ticketea App
Closes https://github.com/facebook/react-native/pull/7776

Differential Revision: D3358599

Pulled By: mkonicek

fbshipit-source-id: 04d769ddbdbf10bb5da3817c5f0f3c1c6e23307f
2016-05-27 09:13:26 -07:00
Siqi Liu 26d3af3421 Redbox: skip column number if it is 0 in Android.
Summary:
As for symbolicated stack trace in the red box in Android, make column number not shown if it's zero.

Format Before:
{F61180667}

Format After:
{F61180666}

Reviewed By: mkonicek

Differential Revision: D3358317

fbshipit-source-id: 87981e678e22ab9f483727002175c8835941ceee
2016-05-27 07:58:22 -07:00
Aaron Chiu c82856fb7a unbreak RN startup
Reviewed By: lexs

Differential Revision: D3352709

fbshipit-source-id: 56cdec2dee46ab1f011bed9aadd14ea464ec4163
2016-05-27 05:13:23 -07:00
kiran 3f2f773388 Mentioned Google emulator instead of genymotion
Summary: Closes https://github.com/facebook/react-native/pull/7793

Differential Revision: D3358150

fbshipit-source-id: 881ea80dfc9cfd28337995a8648f14c51b468b0a
2016-05-27 04:58:29 -07:00
Nick Lockwood fc14f85f73 Reduce boxing overhead of arrays in uiBlockWithLayoutUpdateForRootView
Summary: The view update cycle in UIManager was relying on a bunch of boolean values boxes as NSNumbers in parallel arrays. This diff packs those values into a struct, which is more efficient and easier to maintain.

Reviewed By: javache

Differential Revision: D3253073

fbshipit-source-id: 3e1520c27b88bc1b44ddffcaae3218d7681b2cd2
2016-05-27 04:58:29 -07:00
Dave Miller a0562c7ccf Fix Modal when the Activity is paused or resumed
Summary:
When the activity hosting a Modal goes away, we should dismiss the dialog from the stack and then reconstitute it when the activity comes back.  This means that if an activity is paused because another activity is placed on top of it but our ui operation was delayed, it will not blow up finding no window since it is gone.

Also fixes a place where we should remove a listener for lifecycle events which we were not doing.

Reviewed By: halfjuice

Differential Revision: D3357286

fbshipit-source-id: c5c6dd8e5ef299762ed9aa15a6910ce9c0b111dc
2016-05-26 20:13:33 -07:00
Hedger Wang f7279b4074 Remove `key` from `NavigationState`.
Summary:
NavigationState is composed of many things such as `index`, `routes`.
The only way to effectively compare navigation states is to assume their immutability
and simply compare their references.

That said, `navigationState.key` does not really serves anything useful. The key does
not make a navigation state more unique or comparable.

This diff makes  `navigationState.key` irrelevant thus we could make NavigationState
simpler.

Reviewed By: ericvicenti

Differential Revision: D3351915

fbshipit-source-id: 75d5fa432d2a693f999a91b11e3bff1fdd42e61d
2016-05-26 18:13:23 -07:00
Janic Duplessis 26e8426248 Cross platform ActivityIndicator
Summary:
The API for `ActivityIndiatorIOS` and `ProgressBarAndroid` is very similar and can be merged in a cross platform component that displays a circular indeterminate loading indicator.

This deprecates `ActivityIndiatorIOS` and non-horizontal `ProgressBarAndroid` in favor of this new component.

**Test plan (required)**

Tested with the ActivityIndicator example in UIExplorer on android and ios. Also made sure that `ActivityIndicatorIOS` still works and displays a deprecation warning. Also tested that `ProgressBarAndroid` with `indeterminate == true` and `styleAttr != 'Horizontal'` displays a deprecation warning.
Closes https://github.com/facebook/react-native/pull/6897

Differential Revision: D3351607

Pulled By: dmmiller

fbshipit-source-id: b107ce99d966359003e8b3118cd97b90fa1d3d7d
2016-05-26 13:58:17 -07:00
Robert Rose 98dd91825f Fixing Issue #7526
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

Fixing a bug detailed in Issue #7526 where Android app was crashing when using a binary number.

**Test plan:**
- Build & Run UIExplorer
- Build & Run UIExplorer with `const binaryNumber = 0b101010` inserted into UIExplorerApp.android.js
- Use `react-native init` to create a new blank project, then replace files in node_modules and insert `const binaryNumber = 0b101010` into index.android.js.
Closes https://github.com/facebook/react-native/pull/7730

Reviewed By: avaly

Differential Revision: D3353119

Pulled By: bestander

fbshipit-source-id: 098442da32a29c369f5932b7a4004e8d7f4cb91f
2016-05-26 13:43:29 -07:00
Konstantin Raev 7ca8e0e8b1 Stabilized TestIdTestApp integration test
Summary:
- TestIdTestModule instrumentation tests is responsible for too many occasional crashes, e.g. https://circleci.com/gh/facebook/react-native/7054.
This should fix the problem (will monitor over next week)

- Made file naming more consistent

- 5 retries don't make e2e tests more stable, reduced back to 3 but I need to investigate how to make it more reliable
Closes https://github.com/facebook/react-native/pull/7784

Differential Revision: D3354444

fbshipit-source-id: d058362edbec09522a4828998e01988a82a74487
2016-05-26 13:43:29 -07:00
Sean Kinsey a96fcc7ce1 Optimize and flowify mapWithSeparator
Summary:
Update mapWithSeparator so that Flow can reason about the arguments and return
type. For simplicity, it is expected that the type of the separator will be the
same as that of the mapped item.

Reviewed By: vjeux

Differential Revision: D3323557

fbshipit-source-id: 75b59e928d4e8c309b5933499a14744370ee5660
2016-05-26 12:28:55 -07:00
Charles Dick f948662013 Drop JSC code on background
Reviewed By: lexs

Differential Revision: D3311037

fbshipit-source-id: e46559108c51f1cd163ed5c557d23c21f696ef88
2016-05-26 11:13:42 -07:00
Alex Kotliarskyi bdab834036 Improve how inspector handles native components
Reviewed By: sebmarkbage

Differential Revision: D3347768

fbshipit-source-id: 221ec54dc7bf9513a76578d90a272ed41fe189f9
2016-05-26 10:58:30 -07:00
Nathan Azaria be34e046c2 Fixed broken link in Animations documentation
Reviewed By: bestander

Differential Revision: D3346075

fbshipit-source-id: 3dc066af8ea1ada180e7c7f33108b148f17d73f2
2016-05-26 09:28:25 -07:00
Adam Comella 26aa27da63 Fix TextInput autocorrect (#7496)
Summary:
Autocorrect was broken for controlled TextInput components by a change to batch event handling in React Native:
9f11f8c263

For example, a TextInput like this would be affected by this bug:

```javascript
<TextInput
  autoCorrect={true}
  style={{height: 26, width: 100}}
  onChangeText={(text) => this.setState({ text })}
  value={this.state.text}
/>
```
This fix uses the same approach as
0cd2904b23

The problem is that TextInput's _onChange handler relied on this.props.value being updated synchronously when calling this.props.onChangeText(text). However, this assumption was broken when React Native event handling started being batched.

The fix is to move the code that relies on this.props.value being up-to-date to componentDidUpdate.

**Test plan (required)**

Tested autocorrect now works on iOS in a small app and a large app. Also tested t
Closes https://github.com/facebook/react-native/pull/7676

Differential Revision: D3346221

Pulled By: nicklockwood

fbshipit-source-id: 715df3e8a03aa58cb0a462de4add02289d42782f
2016-05-26 07:28:18 -07:00
Emil Sjolander 0bbfe79623 Set a size of the root view before running test
Reviewed By: astreet

Differential Revision: D3352500

fbshipit-source-id: e6bb81601448a08fa216865b5b92f8739646fc05
2016-05-26 06:58:24 -07:00
Alexander Blom 45636ed7f4 Add more tracing to startup
Reviewed By: astreet

Differential Revision: D3352462

fbshipit-source-id: 9f10bb40eef9a262ae3ea6f8b2cd27b5774fc4da
2016-05-26 06:28:25 -07:00
Janic Duplessis 0fb5ccf6af Add support for delete animation in LayoutAnimation on Android
Summary:
Android follow up to #6779

**Test plan**
Tested add/removing views in the UIExample explorer with and without setting a LayoutAnimation. Tested that user interation during the animation is properly disabled.

![layout-anim-2](https://cloud.githubusercontent.com/assets/2677334/14760549/d60ebe2a-0914-11e6-8f17-ea04d8bf813b.gif)
Closes https://github.com/facebook/react-native/pull/7171

Differential Revision: D3352450

Pulled By: astreet

fbshipit-source-id: 233efa041626eb26d99511d12a924e54a10f96cc
2016-05-26 05:28:26 -07:00
taelimoh 4879f88a75 change undeclared variable to intended value
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/7770

Differential Revision: D3352007

fbshipit-source-id: eedb964d245445b61fed79245380f0803473c455
2016-05-26 01:43:30 -07:00
strazi a4f1857bf5 Adding Readzi application to showcase.
Summary:
Adding my application Readzi to the showcase.
Closes https://github.com/facebook/react-native/pull/7721

Differential Revision: D3349649

fbshipit-source-id: 8d21943e71163e545d7e1bb683e0733250290c01
2016-05-25 20:44:59 -07:00
YuTin Liu 9150cc5f96 add AirPoPo to showcase
Summary:
as title, thank you very much.
Closes https://github.com/facebook/react-native/pull/7747

Differential Revision: D3351212

fbshipit-source-id: 06622222cc198c9558222fadc152611ee77970ac
2016-05-25 19:13:26 -07:00
Chris Hopman 3b3b46d86e Move new bridge java stuff to OSS
Reviewed By: mhorowitz

Differential Revision: D3300152

fbshipit-source-id: 9a76b10579bbfc5bde3a5094b99b64c38f4c1da9
2016-05-25 17:58:43 -07:00
Zhao Han 5c6bbf7f1f Add WeatherEh to showcase
Summary:
Skipping eveything in the contribution guide because adding an app to the Showcase
Closes https://github.com/facebook/react-native/pull/7627

Differential Revision: D3348782

fbshipit-source-id: 0994fd64be5ec132c70090b0852b00b6da0177ee
2016-05-25 17:43:22 -07:00
Jeremy Wyld af149b3a11 Correctly reference cwd instead of __dirname
Summary:
This is for issue #7670.  I consider this a typo, but maybe you don't.

In order to see the problem, you need to have the packager search for the configuration in a place that doesn't have one and the default configuration can't be provided.  It's likely that no one is doing this and also why this probably wasn't seen.
Closes https://github.com/facebook/react-native/pull/7671

Differential Revision: D3350412

fbshipit-source-id: 5f9b520f7d5cbc749e2b898e7bbf2cd84d81ace0
2016-05-25 17:43:22 -07:00
Martin Konicek 7e62c1165b Fix Gradle setup in 'Integrating with existing apps'
Summary:
Based on https://github.com/facebook/react-native/pull/7470, fixing the case when an existing Android app uses React Native as well as 3rd-party React Native modules.

With this PR Gradle should always pick up React Native binaries from node_modules rather than fetching old binaries from JCenter.
Closes https://github.com/facebook/react-native/pull/7759

Differential Revision: D3348640

fbshipit-source-id: 7509eb54bba6e59cf7f4a116bf444fc4983d2d33
2016-05-25 13:43:27 -07:00
Yann Pringault ed47efe4a1 Add Array.prototype.includes polyfill
Summary:
Add `Array.prototype.includes` polyfill.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes

I had all my `includes` running well on iOS 9 but when switching to Android `includes` threw an error.
[The compatibility table](http://kangax.github.io/compat-table/esnext/#test-Array.prototype.includes_Array.prototype.includes) shows that is not supported on Android yet as well as iOS 6-8.
With Chrome debugging it's working on both environment.
Closes https://github.com/facebook/react-native/pull/7756

Reviewed By: davidaurelio

Differential Revision: D3346873

Pulled By: vjeux

fbshipit-source-id: 2e17d29992873fbe4448b962df0423e516455b4b
2016-05-25 11:58:24 -07:00
Hedger Wang 8097fcf4e7 Fix NavigationTransitioner.
Summary:
- Address the issues reported at 7db7f78dc7 (commitcomment-17575647)
- Fix the logic that reduces the scenes.
- Fix the logic that computes the active scene for `renderOverlay`.

Reviewed By: ericvicenti

Differential Revision: D3344716

fbshipit-source-id: 3fce517ff1de212f412a77936012695bd2dcfc3c
2016-05-25 11:28:21 -07:00
Olivier Notteghem 80741a170a Prevent race condition leading to deadlock when destroying activity w/ catalyst instance.
Reviewed By: astreet

Differential Revision: D3345567

fbshipit-source-id: 8ac550456c99549a6c4bc2d2cdb19334f9e85c71
2016-05-25 11:13:19 -07:00
Pieter De Baets 4b0f0881eb Make RCTTiming module lazy
Reviewed By: nicklockwood

Differential Revision: D3346796

fbshipit-source-id: e7fa02f47bfca44272857864472c3f8ef59f56e5
2016-05-25 10:43:27 -07:00
Anoop Chaurasiya 1586a32fa7 add support to provide fallback-sourceURL: in case primary-sourceURL fails to load
Reviewed By: javache

Differential Revision: D3339692

fbshipit-source-id: 93fa1821bf4abca878832d4f75c6b9968d8d0460
2016-05-25 10:28:27 -07:00
yuyaohshimo 298dc7c152 Add "Coiney Madoguchi" to showcase
Summary:
"Coiney Madoguchi" is a registration app for Coiney (http://coiney.com/).
Closes https://github.com/facebook/react-native/pull/7299

Differential Revision: D3245067

Pulled By: mkonicek

fbshipit-source-id: 207a975593625d910b0c06e794fa95ed7b8d2789
2016-05-25 08:28:23 -07:00
Francois Dumas 84f82e5cdd use RN version from node_modules instead of jcenter
Summary:
the current `build.gradle` configuration make all third-party plugins to pull react native from jcenter instead of using version from `node_modules`.

For example, a newly generated project with RN 0.25 using https://github.com/ProjectSeptemberInc/gl-react-native leads to the following gradle output:

```
Download https://jcenter.bintray.com/com/facebook/stetho/stetho-okhttp/1.2.0/stetho-okhttp-1.2.0.pom
Download https://jcenter.bintray.com/com/facebook/stetho/stetho/1.2.0/stetho-1.2.0.pom
Download https://jcenter.bintray.com/com/facebook/stetho/stetho/1.2.0/stetho-1.2.0.jar
Download https://jcenter.bintray.com/com/facebook/stetho/stetho-okhttp/1.2.0/stetho-okhttp-1.2.0.jar
Download https://jcenter.bintray.com/com/facebook/react/react-native/0.20.1/react-native-0.20.1.aar
```
Closes https://github.com/facebook/react-native/pull/7470

Differential Revision: D3346526

Pulled By: mkonicek

fbshipit-source-id: 0f1d051f4340f35403931727982900a9fc7abad5
2016-05-25 07:58:23 -07:00
Nick Lockwood b49633e020 Fixed image test flakiness by tying decoded image cache to module lifecycle
Summary: The decoded image cache was previously static, meaning that cached images could persist beyond the lifetime of the module. This resulted in some flakiness in the RCTImageLoaderTests due to the loader returning cached image instanced from previous tests instead of the correct instance.

Reviewed By: bestander

Differential Revision: D3346329

fbshipit-source-id: 375af8894cef1c5b6303c6cdfd7eb57ebcfe3251
2016-05-25 06:58:23 -07:00
Nick Lockwood 57e9df4af2 Fixed multiline textinput onChange event
Summary: Broken in d9737571c4

Reviewed By: tadeuzagallo

Differential Revision: D3346276

fbshipit-source-id: 0cd67edb38b9f80b0976616059f9c2454cb34448
2016-05-25 06:13:25 -07:00
Philipp von Weitershausen 1e4d9d4897 Expose Systrace from the 'react-native' package
Summary:
This allows React Native apps to instrument their own code via Systrace.measureMethod() and the like.

**Test Plan:** Used require('react-native').Systrace in my own app successfully to instrument my own code.
Closes https://github.com/facebook/react-native/pull/7734

Differential Revision: D3346222

Pulled By: javache

fbshipit-source-id: 08ffc781a1187db89c6e9a0714d644dbc485724c
2016-05-25 05:28:22 -07:00
Nick Lockwood b71db11554 Update RCTNetworking, RCTNetInfo and RCTLocationManager to use new events system
Summary: Updated networking and geolocation to use the new events system.

Reviewed By: bestander

Differential Revision: D3346129

fbshipit-source-id: 957716e54d7af8c4a6783f684098e92e92f19654
2016-05-25 04:28:36 -07:00
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