Граф коммитов

7569 Коммитов

Автор SHA1 Сообщение Дата
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
David Aurelio f8ce2f9f70 remove unused property
Reviewed By: matryoshcow

Differential Revision: D3717515

fbshipit-source-id: 5ecba83367cd11b19b56d19edf72efe9db717e2b
2016-08-15 12:43:31 -07:00
Héctor Ramos 35a6cbac71 San Francisco React Native meetup recap
Summary:
New blog up up for review. I've added a bit of padding between posts in the blog index as well.
Closes https://github.com/facebook/react-native/pull/9362

Differential Revision: D3717908

Pulled By: bestander

fbshipit-source-id: ac3c01c43685548c6fa336541ccb9a9a01dd52a8
2016-08-15 12:28:46 -07:00
Andrew Y. Chen 506e1b1c6d Update the native CLC for relay queries
Reviewed By: yuzhi

Differential Revision: D3529747

fbshipit-source-id: e14ccd1d3f58dd2152f9782c7b0844747c4b81c7
2016-08-15 12:13:45 -07:00
James Ide 8eed600d5b Define Flow types for style and stylesheet objects, more checking
Summary:
- Define a Styles type for the object that gets passed into StyleSheet.create
- Define a StyleSheet type that is returned from StyleSheet.create
- Clean up the type declarations in StyleSheet.create
Closes https://github.com/facebook/react-native/pull/8882

Differential Revision: D3587964

Pulled By: gabelevi

fbshipit-source-id: 629e0176484436848be69b1417638e1200a3669a
2016-08-15 10:43:34 -07:00
Felix Oghina 5ee70415bc add oss-based fb activity and host classes
Reviewed By: andreicoman11

Differential Revision: D3655436

fbshipit-source-id: 3ca6535cd819171867c79f5e9801d9013676a80f
2016-08-15 09:43:40 -07:00
Emil Sjolander f7a22bc33c Use single function for margin, position, padding, and border
Reviewed By: lucasr

Differential Revision: D3715201

fbshipit-source-id: ea81ed426f0f7853bb542355c01fc16ae4360238
2016-08-15 09:28:41 -07:00
Emil Sjolander 0ea4198009 Add support for flex-grow, flex-shrink, and flex-basis
Reviewed By: lucasr

Differential Revision: D3714520

fbshipit-source-id: 80d3a9a1e2b6f74b863bbe22357f2c9865fa290e
2016-08-15 09:28:41 -07:00
Emil Sjolander 451cc2dee7 Use library style imports
Reviewed By: IanChilds

Differential Revision: D3714512

fbshipit-source-id: 4c42d52b3ab92903e9e9451df0ca1564e2d33f0f
2016-08-15 09:28:41 -07:00
Emil Sjolander 043a6cd2c1 Update clang-format rules
Reviewed By: IanChilds

Differential Revision: D3714510

fbshipit-source-id: f6d0436346416aab023aacbedd70ea189e583e8d
2016-08-15 09:28:41 -07:00
Mani Ghasemlou 8095707938 store borderColor in a non lossy way
Summary:
Fix for issue #3652 -

Converting from `int` to `float` is lossy for very large numbers, so storing `borderColor` as a single `Spacing` object (which uses `float`) was not working for certain colors.

So, this pull request splits `borderColor` into alpha and RGB components, and stores each of these as their own respective `Spacing` objects.

*Test Plan*

Check out cosmith sample code here that triggers the bug: https://rnplay.org/apps/l1bw2A

What currently looks like this:

<img width="548" alt="screen shot 2016-08-13 at 6 22 28 pm" src="https://cloud.githubusercontent.com/assets/1630466/17645965/9346f05e-6183-11e6-8d40-3e458b08fd9a.png">

Should look like this (with my fix applied):

<img width="543" alt="screen shot 2016-08-13 at 6 20 08 pm" src="https://cloud.githubusercontent.com/assets/1630466/17645968/9c26d1d0-6183-11e6-8759-75a5e99f498a.png">
Closes https://github.com/facebook/react-native/pull/9380

Differential Revision: D3716707

Pulled By: foghina

fbshipit-source-id: 1164378112e2a58d43c8f5fc671c2efdb64b412b
2016-08-15 09:13:28 -07:00
David Aurelio 8240339dca Clear bundles for potential dependency resolution changes
Summary:
This clears the packager server cache for potential changes of module resolutions.
We will make this a lot better in the future, but for now this crude mechanism will have to do.

Reviewed By: cpojer

Differential Revision: D3713143

fbshipit-source-id: 7c81f40e8ec71404c3369211b29f63928d6634b9
2016-08-15 08:43:34 -07:00
Connor McEwen 0fb2ccfcc3 Add JS library for requesting Android M Permissions
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

The Android permissions native module was open sourced recently (b7352b4667) but it is currently undocumented and requires directly interfacing with the native module.

This provides a JS wrapper to make it easier to use the permissions module and documents it.

This could be cleaner if the native code used Promise blocks instead of callbacks, but I didn't want to change the native code without a thumbs up since I'm guessing this is used in one of facebook's apps. Happy to do that if it makes sense

I also tried to make the `PERMISSIONS` object a class property - it works in the actual code but not in the documentation (think it's a jsdocs problem), so decided to initialize in the constructor.

**Test plan (required)**

If the API looks good, I will change the UIExplorer example to use this.

cc andreicoman11
Closes https://github.com/facebook/react-native/pull/9292

Differential Revision: D3716303

Pulled By: andreicoman11

fbshipit-source-id: cd40b8757fdf70ea8faecfb58caa00e99a99789e
2016-08-15 05:58:33 -07:00
Edward Delaporte 1a683fa5e8 Warn about long run time of init.
Summary:
I, like many before me, had to Google why react-native init appeared to hang the first time I tried it.

It turns out it can just take a really long time, but does not give any warning of this fact.

This patch provides such a warning.
Closes https://github.com/facebook/react-native/pull/9406

Differential Revision: D3716357

Pulled By: bestander

fbshipit-source-id: 6a460c881a20b9edb1bd1c8c5df09e5a7e5020ed
2016-08-15 04:43:51 -07:00