Commit Graph

7532 Commits

Author SHA1 Message Date
Dan Abramov 1aef7e4629 Update hook event names
Summary:
This brings RN up to date with https://github.com/facebook/react/pull/7472 (scheduled for React 15.3.1).
If you use React 15.3.1 with RN without this patch, Systrace output will lack the reconciler events.

(Since it’s a niche feature it didn’t seem to me that full backward compat is necessary so I just removed old hooks. This won’t cause crashes—it’s just you won’t get events in Systrace if you use new React but old RN.)
Closes https://github.com/facebook/react-native/pull/9383

Differential Revision: D3738463

Pulled By: spicyj

fbshipit-source-id: 791cdbc5558666a101fa403f4e7852f700038fc9
2016-08-18 15:58:48 -07:00
Bjørn Thomsen aacfc372c9 Missing function tags
Summary:
It seems like it's not written in es6, hence no arrow functions, therefor we must have the function tag for it to work?
Closes https://github.com/facebook/react-native/pull/9463

Differential Revision: D3736797

fbshipit-source-id: c41bbd5f6867aa0f7668f8562e69dc2812eba80a
2016-08-18 11:58:39 -07:00
Jennifer Wang 4b6af5fa63 Add wrapper class for async storage
Reviewed By: wsanville

Differential Revision: D3654554

fbshipit-source-id: bc21da4b5c46228136cc80592f84206d2deb541e
2016-08-18 10:43:32 -07:00
Emil Sjolander 805d06087b Fix border color
Summary: Border colors broke with recent change to default values in csslayout Spacing. This is a quick fix until we move react-native borders away from using Spacing.java which is a hack in the first place.

Reviewed By: lexs

Differential Revision: D3735435

fbshipit-source-id: 747c85798cb02e1a5139de038eb26b64ac4c5bf3
2016-08-18 10:28:38 -07:00
David Aurelio f83c869411 Fix module IDs of initial require calls
Summary: The logic of assigning module IDs to the initial require calls of a bundle was faulty, counting up from -1 instead of counting down. This change ensures that IDs are -1, -2, ...

Reviewed By: matryoshcow

Differential Revision: D3735560

fbshipit-source-id: 89efa3e73b39c2f8bfed8a6a30487733d1a8b145
2016-08-18 07:28:43 -07:00
Martin Kralik ee49dd756d check for NSPhotoLibraryUsageDescription in plist
Reviewed By: javache

Differential Revision: D3723122

fbshipit-source-id: a5393c7dd3c36a15bec3f2e79859920419cc6726
2016-08-18 07:28:43 -07:00
vaukalak 26e8ae74b6 added onComplete callback to animation config
Summary:
This fix provides possibility to subscribe to a child animation lifecycle. You'll be able to observe every single animation:
```
Animated.sequence([
            Animated.timing(
                this.state.scale,
                {
                    toValue: 0,
                    duration: 300,
                    onComplete: () => this.setState({someProp: 'new value'})
                }
            ),
            Animated.timing(
                this.state.scale,
                {
                    toValue: 1,
                    duration: 300
                }
            ),
        ]).start();
```
`state.someProp`, will updated with `'new value'` when the first animation will be completed.
Closes https://github.com/facebook/react-native/pull/8494

Reviewed By: javache

Differential Revision: D3735322

Pulled By: foghina

fbshipit-source-id: fb69a4b993f7ab6a16da4fdd670e6c0b11c93517
2016-08-18 04:58:39 -07:00
Ben Nham 4ad01be3a0 Remove iOS 7 version check in RCTJSCWrapperCreate
Reviewed By: michalgr

Differential Revision: D3729175

fbshipit-source-id: 43ee2ba19b3d8fed20bd268d1e2d0fab83e2fe9f
2016-08-18 03:28:34 -07:00
Emil Sjolander fd34c6d567 Move default spacing out of csslayout
Reviewed By: foghina

Differential Revision: D3709574

fbshipit-source-id: 6e0277bd97407a5c642d742f93ca2ac70d7307da
2016-08-18 03:28:34 -07:00
Don Yu a2a8d7f5da Fix onItemSelected firing for ReactPicker on initial layout.
Reviewed By: AaaChiuuu

Differential Revision: D3732557

fbshipit-source-id: ed031dbf205996dab8cb0555af972e6f26c0d202
2016-08-17 22:13:45 -07:00
Kevin Lacker 50e0d8e171 Tweak the rules for the showcase
Summary:
This just slightly alters the showcase rules to say that a technical blog post should be company-branded. Better to make exceptions the other way for particularly good posts, rather than to complain to people who are following the rules that the post doesn't seem "showcaseworthy".
Closes https://github.com/facebook/react-native/pull/9455

Differential Revision: D3733436

Pulled By: hramos

fbshipit-source-id: 572eb9f56b1f3a9c1af2362384d199a8ab5058ac
2016-08-17 17:43:53 -07:00
JRK 6f7ade1b0f Add `checkAndroid` back
Summary:
`checkAndroid` has been lost from my last PR. Finally...

[Reminder: https://github.com/facebook/react-native/pull/9190 and https://github.com/facebook/react-native/pull/9448]

I've created a new PR from this fresh new cloned repository. I think we're done with this one !
Closes https://github.com/facebook/react-native/pull/9457

Differential Revision: D3731997

fbshipit-source-id: 4ec3285bc43093b23517a36fd952e9cfae832e37
2016-08-17 17:43:53 -07:00
Charles Dick 28768a715f add keyboard shortcuts to aggrow
Differential Revision: D3724598

fbshipit-source-id: e744d710ccb49f67101abcdded17085f6e7c8b23
2016-08-17 11:28:31 -07:00
Pieter De Baets a0b3565847 Fix snapshottests under iOS10
Reviewed By: dinhviethoa

Differential Revision: D3722988

fbshipit-source-id: 4345b757e28700ac61e1de38b61430e78948e58a
2016-08-17 10:44:01 -07:00
Emil Sjolander 0da5fd21c7 Compute edge values similar to how Spacing.java does it
Reviewed By: lexs

Differential Revision: D3728742

fbshipit-source-id: aa19400880afa49664f7bde72b1df45314e699bb
2016-08-17 10:44:01 -07:00
Emil Sjolander fa9cf22074 Remove CSSPosition in favor of CSSEdge
Reviewed By: IanChilds

Differential Revision: D3728740

fbshipit-source-id: 19dc817a637b80d1f6df8d76982feb2e1fb2705a
2016-08-17 10:44:01 -07:00
Pieter De Baets 0b1954cace Avoid dispatching network callbacks when already on the right queue
Reviewed By: mmmulani

Differential Revision: D3690133

fbshipit-source-id: a1769016a05b3163a3b1c93f448864aeaecc6e46
2016-08-17 10:44:01 -07:00
Pieter De Baets 66bea7d1e5 Perform all callbacks from RCTNetworkTasks on a given queue
Reviewed By: mmmulani

Differential Revision: D3690022

fbshipit-source-id: 55c0121f7a99cc2186e68d0bb3ebfe5355af98fc
2016-08-17 10:44:01 -07:00
Pieter De Baets e4ac66b0ee Unbreak UIManager.takeSnapshot
Reviewed By: majak

Differential Revision: D3729478

fbshipit-source-id: 35869e4327debae78f36638694d09f30c6478661
2016-08-17 10:28:36 -07:00
Lukas Piatkowski 3d7fe3e6d3 Mark in Sampling Profiler when the execution is outside of the VM
Differential Revision: D3722907

fbshipit-source-id: c988c3ea2ab33496dc1453e6e54e624d9f295173
2016-08-17 08:28:48 -07:00
Lukas Piatkowski 0b88dbf1a0 DevMenu option to control Sampling Profiler's sample interval
Differential Revision: D3722898

fbshipit-source-id: 7bf1528b26a1ac6ed81943144ca433a211cf7b35
2016-08-17 08:28:48 -07:00
Lukas Piatkowski fe1a39a8f2 DevMenu option to start the Sampling Profiler on init
Differential Revision: D3722550

fbshipit-source-id: 5a805753b4893a167df8bcf95c0e05ed22a15283
2016-08-17 08:28:48 -07:00
Charles Dick 294c70cc63 use string values to get names for JSC heap capture react tree
Reviewed By: dcaspi

Differential Revision: D3723800

fbshipit-source-id: a013525f77484dfb8dc39ced81feee42bccba70d
2016-08-17 08:13:49 -07:00
Charles Dick 348a8078bc dump string values in JSC heap capture
Reviewed By: dcaspi

Differential Revision: D3723764

fbshipit-source-id: 06ca770808a94bb8b567bab36c1729f1e696484e
2016-08-17 08:13:49 -07:00
Pieter De Baets fba96ab990 Use image references consistently in UIExplorer
Reviewed By: davidaurelio

Differential Revision: D3728780

fbshipit-source-id: 4da6a0417eea1ccd0ec0d25574959661f05decb1
2016-08-17 04:43:52 -07:00
Charles Dick f2f27d6254 add marked block overhead to JSC heap capture aggrow
Reviewed By: bnham

Differential Revision: D3728678

fbshipit-source-id: 2c17003449dddb0ea68d3f6b097fd7704758cf5f
2016-08-17 03:43:34 -07:00
Andrei Coman db1b0e9be9 Reverted commit D3668840
Reviewed By: bestander

Differential Revision: D3668840

fbshipit-source-id: 553600a06c6a97c3a653815ba6fe61aaa1dad937
2016-08-17 02:58:30 -07:00
sam 5dcf7199fc add 昨日热推 app to showcase
Summary: Closes https://github.com/facebook/react-native/pull/9398

Differential Revision: D3727064

Pulled By: lacker

fbshipit-source-id: f16018d71245d50f5ef920beb51840f14e8c774a
2016-08-16 18:28:47 -07:00
David Aurelio 555430089e Remove cached bundle if update fails
Summary: If a bundle failed to build, a file change would trigger the *update bundle* path, without ever being able to resolve the bundle. If a bundle can't be updated, we evict it from the cache.

Reviewed By: cpojer

Differential Revision: D3726567

fbshipit-source-id: a342f00c5a41364551194c33082718e5483fd7a4
2016-08-16 17:43:41 -07:00
David Aurelio 754da27d94 Remove rejected promises from the cache
Summary: Rejected promises in the cache would prevent the cache from persisting. This removes rejected promises from the cache, so that subsequent successful cache updates can be persisted.

Reviewed By: cpojer

Differential Revision: D3726691

fbshipit-source-id: ddec03676a7a89264fe64b4af4b183cbead638fb
2016-08-16 17:43:41 -07:00
Tim Yung c36d356f6c JS1: Fix Scrolling in YellowBox
Summary: Removes the inspector click handler that was stealing the scroll gesture from `ScrollView`. Instead, I've added a "Minimize" button. This also fixes a bug where the `ScrollView` was appearing underneath the button bar (and therefore permanently obscuring the last few lines of the warning).

Reviewed By: jingc

Differential Revision: D3725499

fbshipit-source-id: 1ec0e0ddf5e1e50989e297811a32779e6610c745
2016-08-16 16:13:51 -07:00
Charles Dick d54b3b8701 Add react component names to JSC heap capture
Differential Revision: D3709253

fbshipit-source-id: dc158d6a096c3e91baeadbaafbf14904493392aa
2016-08-16 13:58:41 -07:00
Connor McEwen 6df41d5184 Change Android Permission Module to use promises
Summary:
This is a follow-up to #9292 satya164
Closes https://github.com/facebook/react-native/pull/9325

Differential Revision: D3723568

fbshipit-source-id: d553a70bde53ed5d7c1f5f544c85c5c5935e3ca4
2016-08-16 12:58:39 -07:00
Paul O'Shannessy 7655e537ed Upgrade to React v15.3.1-rc.2
Reviewed By: spicyj, sebmarkbage

Differential Revision: D3720586

fbshipit-source-id: c739762a2c263b7dd0c321311e4c173e9dcacfcf
2016-08-16 11:28:32 -07:00
Mehdi Mulani e9d6f29b64 Don't allow unsetting a region in RCTMapView
Reviewed By: javache

Differential Revision: D3723065

fbshipit-source-id: c922d03fa6c2a696b2ec00965b17b7215060aee5
2016-08-16 10:59:03 -07:00
Jonathan Chen 7ca3764eae Fix Wikipedia link
Summary:
The end of the Wikipedia link has a parenthesis, which was incorrectly used as end of markdown format for link.
Closes https://github.com/facebook/react-native/pull/9429

Differential Revision: D3722972

Pulled By: javache

fbshipit-source-id: af00f0291f00c6f2bf9bfeb7555fecd957cc6925
2016-08-16 09:58:45 -07:00
Martin Konicek 700574fe76 Use an ES6 class in ListView docs
Reviewed By: mkonicek

Differential Revision:
D3723141
Ninja: docs only

fbshipit-source-id: e1030f85b524777d2efbedb3cf78c218c34bad88
2016-08-16 09:58:45 -07:00
Emil Sjolander fc5bed8693 Support 64 bit platforms
Reviewed By: davidaurelio

Differential Revision: D3722479

fbshipit-source-id: c132f24c92c8476b328713861ad30670a43040c4
2016-08-16 08:58:53 -07:00
Felix Oghina af2bb20893 make main component name nullable
Summary: Sometimes the main component name is not known at activity construction time and depends on e.g. reading shared preferences. To support this use case, make `(Fragment)ReactActivity#getMainComponentName()` nullable and return `null` by default. In this case, the app will not be loaded in `onCreate` by default and the user has to call `loadApp` manually once the component name is known.

Reviewed By: andreicoman11

Differential Revision: D3722517

fbshipit-source-id: 062eed158798606e4160f1c142b23fd98ca618c8
2016-08-16 07:43:31 -07:00
Pieter De Baets 2f78852411 Fix warning on unused return values in RCTSRWebSocket
Summary:
Assert that the return value of these methods is sane.

Closes https://github.com/facebook/react-native/issues/8108

Reviewed By: majak

Differential Revision: D3722629

fbshipit-source-id: 2a67daae6dc380721e5dad27acd2ab67f71d0c6c
2016-08-16 07:28:28 -07:00
Charles Dick 1199c5ade9 Add function name, url, line, column to heap capture
Reviewed By: bnham

Differential Revision: D3703012

fbshipit-source-id: 8e15deeeabe15da2a87a71c2baf0fa72d5bc6568
2016-08-16 06:59:06 -07:00
Emil Sjolander 30847b2b35 Fix parameter order
Differential Revision: D3722391

fbshipit-source-id: 9adaf7b80d7bad93887a122c10eb06159a5189c2
2016-08-16 05:58:34 -07:00
Andrei Coman 35d60ecac8 Reinstate view example for screenshot tests
Reviewed By: javache

Differential Revision: D3716630

fbshipit-source-id: 07381f0afe541d0bfea8de6a719d0fa176ccbc3f
2016-08-16 04:58:30 -07:00
Alon Schwarz 862b6570ee Add 'center' to the allowed values in Android Image.resizeMode proptype
Reviewed By: foghina

Differential Revision: D3703258

fbshipit-source-id: fc2546a8c2e595ec51416f3453a12d087cc68515
2016-08-16 04:15:03 -07:00
JRK dd6370fed2 Ask for device when using adb with run-android
Summary:
Sometimes adb see many devices (see: http://puu.sh/qoASz/c13f010dd0.jpg) and it can't `adb reverse` because of that (see: http://puu.sh/qoAR1/8412dfe25a.jpg)

So I've added the possibility to choose a device when you `run-android` your app.

Final result: http://puu.sh/qoB12/329d5c27db.jpg
Closes https://github.com/facebook/react-native/pull/9190

Differential Revision: D3719050

fbshipit-source-id: 269cf8507e067218880aa1e0c0e0e625228e25b5
2016-08-16 00:58:26 -07:00
Muraleekrishna c7d0bc73c2 Fix documentation inconsistancy with flexbox alignItems default value
Summary:
As per mozilla docs alignItems already has made `stretch` as default
value

https://developer.mozilla.org/en-US/docs/Web/CSS/align-items.

This resolves issue https://github.com/facebook/react-native/issues/8920
Closes https://github.com/facebook/react-native/pull/9397

Differential Revision: D3718410

fbshipit-source-id: 6c747396fd06652e17cb21a79b0dfa513841cabd
2016-08-15 20:28:30 -07:00
Sriram Ramasubramanian dcef202aab Pass in the locale identifier from Android
Reviewed By: AaaChiuuu, achen1

Differential Revision: D3668583

fbshipit-source-id: f34b6e24d9ff4fa044d24f4133c9c85564a3f00f
2016-08-15 18:28:40 -07:00
Ian MacLeod 02557d2cfe Accept children of all types for NavigationHeaderTitle
Summary:
`<Text>` accepts more than just string as its children; and it's handy to be able to style nav titles without a proptype warning throwing
Closes https://github.com/facebook/react-native/pull/8338

Differential Revision: D3719045

fbshipit-source-id: a02d181b5e133dbe467fbaca794f0d2119be2da7
2016-08-15 18:13:30 -07:00
Lloyd d20918319a Update docs to use correct import statement
Summary:
Docs currently contain incorrect example code.
React should be imported from react since https://github.com/facebook/react-native/releases/tag/v0.25.1
Closes https://github.com/facebook/react-native/pull/9418

Differential Revision: D3719742

Pulled By: hramos

fbshipit-source-id: 0d6a9cc8900c534e92ffe1f7883f81079934a6e0
2016-08-15 15:58:40 -07:00
Ben Nham 53c5c4f8c3 Rename custom JavaScriptCore.framework to JSC.framework
Reviewed By: michalgr

Differential Revision: D3709748

fbshipit-source-id: bc2a7124127944c5d24e584747074065eefa1207
2016-08-15 15:13:40 -07:00