Commit Graph

7723 Commits

Author SHA1 Message Date
Pieter De Baets 1a7c231ef3 Remove last arg from RCTProfileEnd, make macro's function-like
Reviewed By: tadeuzagallo

Differential Revision: D3801302

fbshipit-source-id: 297a58db876366e21e232094c1361aa0dcd9016d
2016-09-05 11:13:33 -07:00
Chris Geirman 3f5a263307 Delete Codementor
Summary:
There's no codementor app, neither Android nor iOS, so I believe it should not exist in the showcase. Furthermore, the article linked doesn't even mention react native. Not sure how this got added, but I think it should be removed as it undermines the credibility of the showcase page by being there.
Closes https://github.com/facebook/react-native/pull/9744

Differential Revision: D3819328

Pulled By: mkonicek

fbshipit-source-id: d76fdb0fd3b644e25313b32d030d85071f88e276
2016-09-05 08:43:49 -07:00
Pieter De Baets dda3c5f48d Support sync method calls in the objc bridge
Reviewed By: mhorowitz

Differential Revision: D3801188

fbshipit-source-id: b990680049a46840472a25e66882f8a29890ae90
2016-09-05 07:44:00 -07:00
Pieter De Baets 753b37e479 Remove unused -[RCTBridgeMethod profileArgs]
Reviewed By: mhorowitz

Differential Revision: D3801106

fbshipit-source-id: 214a18b548f8142c0f3d6b2f7db7a24894d1f01d
2016-09-05 07:44:00 -07:00
Janic Duplessis 3c1b69c1a9 Add TextInput controlled selection prop on Android
Summary:
Android PR for TextInput selection, based on the iOS implementation in #8958.

** Test plan **
Tested using the text selection example in UIExplorer.
Closes https://github.com/facebook/react-native/pull/8962

Differential Revision: D3819285

Pulled By: andreicoman11

fbshipit-source-id: 9a2408af2a8b694258c88ab5c46322830c71452a
2016-09-05 07:13:46 -07:00
Ovidiu Viorel Iepure 2ea65ec872 'silent' option for Activity events
Summary: Activity events now have a `silent` boolean option that specifies whether or not the event phases are to be logged to the console. Defaults to `false`, preserving current behaviour for events that do not explicitly have this option set.

Reviewed By: davidaurelio

Differential Revision: D3810802

fbshipit-source-id: 38d14b9e6c6502fbc73eece9466f20b60d19965e
2016-09-05 06:43:51 -07:00
Jake Murzy 64009b61cc fix NativeAnimated event listener bug
Summary:
This bugfix cleans up reference to value listener upon unsubscribing to native events ultimately preventing RCTEventEmitter from throwing a [listener count error](https://github.com/facebook/react-native/blob/v0.33.0-rc.0/React/Modules/RCTEventEmitter.m#L90):

`Attempted to remove more RCTNativeAnimatedModule listeners than added`

/cc janicduplessis sahrens

🍺
Closes https://github.com/facebook/react-native/pull/9729

Differential Revision: D3818241

Pulled By: sahrens

fbshipit-source-id: e235e3f97534ef2a50df29877ce36d3b6095237e
2016-09-04 15:58:47 -07:00
Gant dcdf16a0fb RefreshControl Position Bug
Summary:
Refresh bug #7976
This bug has persisted for 3 versions of React Native.   Currently everyone is having to do a silly fix, documented in the bug.   I spent an hour trying to find the source of the bug.   Failing to find the issue quickly, I've just decided to make this simple bugfix.

According to janicduplessis #7976 we will likely be re-writing this control in iOS 10.
Closes https://github.com/facebook/react-native/pull/9249

Differential Revision: D3817227

fbshipit-source-id: f98282aadeca3e85239836f589eda901d454f2ce
2016-09-04 01:43:38 -07:00
David Aurelio 13994d5810 re-enable and fix tests
Summary:
When bringing back `node-haste` to React Native, I left an `fdescribe` in a test that led to ~70 tests being skipped.
This re-enables these tests, and fixes test failures

Reviewed By: cpojer

Differential Revision: D3811225

fbshipit-source-id: 67a16f385759bb829f1f3f559862eab7e78f2097
2016-09-03 01:13:37 -07:00
Nobuhito Kurose 5ba40fe6ef Improve loading error handling on Android WebView
Summary:
Loading invalid urls will happen in normal use so this line should be console.warn instead.
Actually ios WebView uses console.warn for this.
See https://github.com/facebook/react-native/issues/2904.
Closes https://github.com/facebook/react-native/pull/9623

Differential Revision: D3815167

Pulled By: spicyj

fbshipit-source-id: 0badb811b79d89d54c70b41692c609da0a3ef169
2016-09-02 23:28:35 -07:00
Aaron Chiu 367c71241a convert CoreModulesPackage to use @ReactModuleList
Reviewed By: astreet

Differential Revision: D3809512

fbshipit-source-id: 658284c642d55cf5f90e16901fdf6d4229d6b762
2016-09-02 19:13:27 -07:00
Indragie Karunaratne 31c8e20c8e Remove -[RCTJSExecutor errorForJSError:]
Reviewed By: javache

Differential Revision: D3814718

fbshipit-source-id: 9b8c91cb81d77fda4959df26806d54c9b7be42a0
2016-09-02 17:43:37 -07:00
Aaron Chiu 3d1b79cd15 covert RNFeedPackage and it's modules to use @ReactModule and @ReactModuleList
Reviewed By: lexs

Differential Revision: D3796860

fbshipit-source-id: d4b5f3635754ef28277b79cb1ea9bab07ba3ea6e
2016-09-02 16:28:43 -07:00
Mehdi Mulani 6c909ef80d Render UIExplorer examples functionally to handle landscape orientation correctly
Reviewed By: javache

Differential Revision: D3810007

fbshipit-source-id: ff8dfa4b326bb385ea91592b374f5a45a6d4ff64
2016-09-02 14:43:44 -07:00
Marc Horowitz 3940f06211 Add more profiling, fix existing profiling, perf fix
Reviewed By: javache

Differential Revision: D3807467

fbshipit-source-id: 3ff6feebd6d7966952152bac708389506de721e6
2016-09-02 12:43:48 -07:00
Christoph Pojer d7fdc448d5 Update to Jest 15
Reviewed By: kassens

Differential Revision: D3805404

fbshipit-source-id: 0aa60cf1be889b306b41876f7b09f4f7f933fcf1
2016-09-02 05:58:34 -07:00
Adam Comella cd1a86db36 Improve ellipsizeMode prop
Summary:
There are a couple of buggy behaviors in the current implementation of the `ellipsizeMode` prop on Android:
  - Setting the `numberOfLines` prop stomps on whatever value you provided for `ellipsizeMode` earlier.
  - The value you've provided for `ellipsizeMode` is used even if you've configured your view to have an unlimited size (i.e. `numberOfLines` is 0 or unspecified).

This change fixes these issues which makes Android's `ellipsizeMode` prop more consistent with iOS's. Additionally, it renames LineBreakMode to EllipsizeMode in a couple of places.

**Test plan (required)**

Verified that the `numberOfLines` and `ellipsizeMode` props work correctly in an Android test app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/9594

Differential Revision: D3810166

Pulled By: foghina

fbshipit-source-id: 229c9bfc3ef10670a1090311ea9d095cb2c1121a
2016-09-02 00:58:41 -07:00
michaelAndersonCampingWorld d8abea1bf7 Explicit information to help in linking
Summary:
It's very confusing that this modules doesn't work like most others. I believe it would be beneficial to state that upfront. When you know that you *have* to link the CameraRoll library then the resources help you know how to link are pretty straightforward.
Closes https://github.com/facebook/react-native/pull/9708

Differential Revision: D3809715

fbshipit-source-id: b100874426146d38251c52fde29502e4dda74d40
2016-09-01 21:43:47 -07:00
Marc Horowitz a8cf12a932 Fix some unsafe thread behavior
Reviewed By: javache

Differential Revision: D3789293

fbshipit-source-id: 80118c7f8faf487fe35d4d83a91f023219f6bf80
2016-09-01 19:58:58 -07:00
Pieter De Baets 6abacc893b Use NSURLComponents.queryItems instead of parsing query strings
Reviewed By: mmmulani

Differential Revision: D3742617

fbshipit-source-id: 2d6580919fa546d89266943a917165fbc44aa8e8
2016-09-01 19:43:48 -07:00
Pieter De Baets 07553d0f1c Update React Native minimum OS version to iOS8
Reviewed By: majak

Differential Revision: D3723143

fbshipit-source-id: 482f9820370b752d937e6df7f74c33d53a0a2e7d
2016-09-01 19:43:47 -07:00
Aaron Chiu 605a0a62dc Add annotation processor to create static ReactModule infos
Reviewed By: lexs

Differential Revision: D3781016

fbshipit-source-id: 8169e8b55fc044df2230fd01e912c4e96a044f98
2016-09-01 19:28:57 -07:00
Charles Dick c06c1e1786 Add values to JSC heap capture visualizaion
Reviewed By: bnham

Differential Revision: D3757492

fbshipit-source-id: 2e311878ca773b7d1ec680a2dc6422633f98a3a7
2016-09-01 17:29:05 -07:00
Charles Dick a0f55c9bca Change how values are captured in JSC heap snapshots
Reviewed By: dcaspi

Differential Revision: D3757449

fbshipit-source-id: 9952f7ffb9b725ad3e0e3ca0b13b02d2d469bb95
2016-09-01 17:29:05 -07:00
Andrew Y. Chen 00d65870fe Improve ReactRootView's onMeasure error message
Reviewed By: AaaChiuuu

Differential Revision: D3806888

fbshipit-source-id: 0433a7950b9673a2195b8dfdedb12b4c90156184
2016-09-01 16:28:47 -07:00
Marc Horowitz 1d571c5ed5 Don't use the same throw for calling into JSC, and calling into native modules
Differential Revision: D3779181

fbshipit-source-id: 7fb17c9c90abd9302137dad3a326c6ce30e7ca86
2016-09-01 15:13:51 -07:00
Ovidiu Viorel Iepure 46e47aaecd Telemetry for update bundle event
Summary: Updating an existing bundle is now logged as a telemetric event.

Reviewed By: davidaurelio

Differential Revision: D3804754

fbshipit-source-id: adab3b054a161bd9535ad01d52573fb7bb177d43
2016-09-01 11:14:07 -07:00
Arian Stolwijk a02c238464 Fix code example: NSNumber should be marked `nonnull` for compatibility with Android
Summary:
I was following the Native Modules guide for iOS, when I noticed this error in the example code:

> Argument 2 (NSNumber) of CalendarManager.addEvent has unspecified nullability but React requires that all NSNumber arguments are explicitly marked as `nonnull` to ensure compatibility with Android.

Marking the parameter NSNumber type as `nonnull` fixes the error in the example.
Closes https://github.com/facebook/react-native/pull/9705

Differential Revision: D3804661

Pulled By: JoelMarcey

fbshipit-source-id: 92ec8a08ff2a179e4a8935de4cecd7b8d993469b
2016-09-01 08:43:48 -07:00
Adam Comella bcf48e74ae Include image dimensions & url in Image's onLoad callback
Summary:
This is similar to the iOS feature that was implemented by 84f68c338a.

**Test plan (required)**

Verified that the image dimensions are included in the `onLoad` callback in a test app. Also, this change is used in my team's app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/9608

Differential Revision: D3797659

Pulled By: foghina

fbshipit-source-id: ea83a907bf6b0b61d9bc1e90fc7c64b7132db81f
2016-09-01 02:44:00 -07:00
Kaitlyn Lee 1e5d52bf0b Improve swipable row gestures to feel more natural
Summary: Modified logic and constants to make the swipable row animations feel more natural and smooth.

Reviewed By: fred2028

Differential Revision: D3801391

fbshipit-source-id: d4301fe01a190803b5bc27373a9755086b6c431d
2016-08-31 18:13:35 -07:00
Pieter De Baets 46b54fd7a8 Support bundle argument for image loading
Reviewed By: mmmulani

Differential Revision: D3768798

fbshipit-source-id: 5b35f06957cebfe74aca90fe6a456f7f739509a9
2016-08-31 17:43:49 -07:00
Pieter De Baets 74308209f9 Cleanup FBReactKit BUCK paths
Reviewed By: mmmulani

Differential Revision: D3785232

fbshipit-source-id: 8abb2789420eca9a2f7a88dbf43f2a58ded081c8
2016-08-31 17:43:49 -07:00
Adam Comella 5d7227a822 Use mergeFast in a hotspot
Summary:
In profiling our app, we found that the usage
of `merge` in `Text.js` was showing up as a
hotspot. We've replaced this usage of `merge`
with `mergeFast`.

**Test plan (required)**

This change is used in my team's app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/9654

Differential Revision: D3801791

fbshipit-source-id: 004652ed6537b557d00541ab2e5fbe64b56fa73b
2016-08-31 17:28:35 -07:00
Pieter De Baets 17205aac57 Track BatchedBridge in FBReactModule to decide when to re-apply feature flags
Reviewed By: majak

Differential Revision: D3735447

fbshipit-source-id: a38c34feddb3f11cb5b99783054849fd291fc14f
2016-08-31 16:14:03 -07:00
m3vaz 61832b4323 _getText defaults to blank string when no default value set
Summary:
One of the potential fixes that grabbou suggested was to make _getText return an empty string in the worst case of null value and null defaultValue.
Closes https://github.com/facebook/react-native/pull/9553

Differential Revision: D3800913

fbshipit-source-id: 30d9c0a7384d39477a71947714eec3340ba5380f
2016-08-31 16:14:03 -07:00
Alexander Oprisnik c0de1a7011 Only initialize FrescoModule once
Summary:
Fresco should only be initialized once. Re-initializing causes a few problems (https://github.com/facebook/react-native/issues/8677) and we don't need to do it.
If a Fresco configuration needs to change, you can just restart the application or add delegates for parts that can change and manually update them instead.

Reviewed By: astreet

Differential Revision: D3790908

fbshipit-source-id: 9df4c3be15ca49433120abd7ba1a4f5ae2a3f1c1
2016-08-31 14:58:44 -07:00
Ryan Gomba 82dba51f1a Modulo node
Summary:
This diff adds ModuloAnimatedNode on iOS. It separates out code originally submitted in #9048.

Test plan (required)

Set up an animation with a modulo node, and `useNativeModule: true`. Compare results with `useNativeModule: false`.
Closes https://github.com/facebook/react-native/pull/9626

Differential Revision: D3799636

fbshipit-source-id: 594499f11be41bf3ee709249056a3feedeace9eb
2016-08-31 14:43:43 -07:00
Ben Nham 7db93a376b configure glog sink for custom jsc
Reviewed By: alexeylang

Differential Revision: D3789493

fbshipit-source-id: b3ecbd1caddfeef5e948e43444be95207c573f67
2016-08-31 11:29:05 -07:00
Adam Comella 6897f40af7 Fix sizing of absolutely positioned nodes inside overflow:hidden parent
Summary:
When an absolutely positioned node appeared inside an overflow:hidden
parent, we were limiting its height. This is inconsistent with how
layout behaves on the web.
Closes https://github.com/facebook/css-layout/pull/218

Reviewed By: lucasr

Differential Revision: D3797285

Pulled By: emilsjolander

fbshipit-source-id: 98f98e77aa26edce86b9882c1cac284799b69a27
2016-08-31 08:13:41 -07:00
Emil Sjolander e5aa29c195 Fix and add tests for cssedge priority
Reviewed By: lucasr

Differential Revision: D3791106

fbshipit-source-id: 3e0c943f94218848a1fbf36e5ae48dbc720ea923
2016-08-31 08:13:41 -07:00
Adam Comella 06e52f8e8c Fix bug in timer clean up
Summary:
One of the impacts of this bug is that Java is firing timer
completion events into JavaScript for timers that should have
been deleted. JavaScript filters these out so it doesn't impact
the app developer. However, Java is completing more timers
than necessary.

When cleaning up a timer, we were accidentally deleting the
whole set of timers for that context. Instead, we should
just delete that timer from its context.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/9361

Differential Revision: D3797573

fbshipit-source-id: c30ed600af741601f2babdfc61da9aac549cbadb
2016-08-31 07:28:39 -07:00
Felix Oghina 69c889815e Expose image cache interrogation to JS
Summary: Add a static `Image.queryCache` function that can query multiple URLs at once. The result is a map where each URL that is in cache is mapped to the cache type (memory/disk). URLs that are not cached do not appear in the result.

Reviewed By: lexs

Differential Revision: D3791333

fbshipit-source-id: b183015d97423f0c095bf891f035dac2e23d8d11
2016-08-31 05:13:39 -07:00
Felix Oghina d3282e3bb1 Clean up fresco cache clearing code
Summary: I noticed we're doing too much manual work here, when Fresco has a nice handy shortcut for clearing all caches.

Reviewed By: kirwan

Differential Revision: D3791356

fbshipit-source-id: 4a55d0280e9483267741ae75383b50ca0b74c5c6
2016-08-31 03:13:32 -07:00
Scott Wolchok 8a8ac771b1 clean up NSClassFromString in Libraries/
Reviewed By: adamjernst

Differential Revision: D3794507

fbshipit-source-id: 5f6f8d3ccfcb8a7339532ca1c092750b85d622d2
2016-08-30 17:58:47 -07:00
Scott Buckfelder 16f76d4407 SKETCH Add performance tracking for rendering
Differential Revision: D3709400

fbshipit-source-id: a006b60feb3fc5cb55cc2e6f08275fcc8de1d3e1
2016-08-30 14:28:37 -07:00
Héctor Ramos 5d32075363 Remove short descriptions for non-blog-post layouts
Summary:
My earlier PR, #9648, introduced an issue that [broke the website](https://circleci.com/gh/facebook/react-native/10634). This PR addresses the issue.
Closes https://github.com/facebook/react-native/pull/9666

Differential Revision: D3791596

Pulled By: JoelMarcey

fbshipit-source-id: a7bc33ce0f640c2760ae612dee589c0ceb31803e
2016-08-30 10:58:45 -07:00
Kevin Gozali 150fe7cb9c fixed polyfill for BackAndroid
Summary:
`BackAndroid.addEventListener()` returns a subscription object with a `remove()` function in android. Before this fix, the iOS equivalent doesn't return anything, which means, if there's a component doing something like this, it would redbox:

```
componentWillMount() {
  this._subscription = BackAndroid.addEventListener('hardwareBackPress', () => {...});
}

componentWillUnmount() {
  this._subscription.remove(); // --> redbox in iOS before this fix
}
```

Differential Revision: D3790480

fbshipit-source-id: 1e607171bf2892a6b64977c4fd052c5df0bc4a0d
2016-08-30 10:58:45 -07:00
Sokovikov 0a1d7280eb add missing KeyboardAvoidingView documentation
Summary: Closes https://github.com/facebook/react-native/pull/9667

Differential Revision: D3791743

Pulled By: hramos

fbshipit-source-id: 823bf44028d8fb01f13510753362b8da3692f936
2016-08-30 10:43:33 -07:00
hl3hl3 2e8d027a9e Missing braces
Summary: Closes https://github.com/facebook/react-native/pull/9624

Differential Revision: D3791593

Pulled By: hramos

fbshipit-source-id: 04bf3eee2d21cf2d5e61de234d5b798acaa9570b
2016-08-30 09:43:55 -07:00
Adam Comella 158a73b8a5 Text component: Pass event object to onPress and onLongPress handlers
Summary:
This makes the Text component more consistent with the contracts implemented by the Touchable* components.

**Test plan (required)**

Verified the event object gets passed to the `onPress` and `onLongPress` handlers in a test app. Also, this change is being used by my team's app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/9657

Differential Revision: D3790550

fbshipit-source-id: 026b579ef6b354d9519abd5e9a92f0d562159132
2016-08-30 05:43:47 -07:00