Commit Graph

4176 Commits

Author SHA1 Message Date
Nick Lockwood 7b13ce30f2 Fix flow
Reviewed By: gabelevi

Differential Revision: D2734936

fb-gh-sync-id: 0c085c4968e52907a60bbd1d8af30dac6f449e46
2015-12-08 12:03:34 -08:00
David Aurelio d013554083 Prepend magic number to unbundle files
Summary:
In order to be able to reliable identify unbundles when loading files, prepend a magic number (0xFB0BD1E5)
public

Reviewed By: martinbigio

Differential Revision: D2734359

fb-gh-sync-id: b469e26459234e7f6270fffa0b872a93d137381d
2015-12-08 11:03:25 -08:00
Edvin Erikson c489660f26 Inspecting stateless components.
Summary:
Fixes #4602

Fixes a bug where the app crashes when you try to inspect a stateless
component.
Fixed by replacing all occurrences of the getPublicInstance method in
Libraries/Inspector/Inspector.js with the _instance property instead.
Defaults to an empty object if _instance is falsy.
Closes https://github.com/facebook/react-native/pull/4642

Reviewed By: svcscm

Differential Revision: D2734491

Pulled By: androidtrunkagent

fb-gh-sync-id: 4ea753b7e0ef3fd05af2d80abadc365c5c787f98
2015-12-08 10:13:25 -08:00
Konstantin Raev c9d796fc6a NetInfo: Cleaned up code and examples
Reviewed By: andreicoman11

Differential Revision: D2723578

fb-gh-sync-id: b7bb9ce69f24ff5dcf38409de92d57f53da003fa
2015-12-08 09:35:22 -08:00
Emilio Rodriguez e2c35dddba Added support for styling the PickerIOS
Summary:
 - PickerIOS accepts now a new prop: style
 - this prop modifies the native style of the RCTPicker allowing to modify the font size of the items (fontSize), color of the items (color, only 6 char HEX values for now) and alignment of the items (textAlign)
Closes https://github.com/facebook/react-native/pull/4490

Reviewed By: svcscm

Differential Revision: D2723190

Pulled By: nicklockwood

fb-gh-sync-id: ab9188192f1d0d087787dfed8c128073bfaa3235
2015-12-08 07:48:26 -08:00
Mike Armstrong e7a4b20d75 exceptions generated from incorrect arg usage on JSC trace and LegacyProfile functions
Reviewed By: astreet

Differential Revision: D2729015

fb-gh-sync-id: a3f56554ff6e77170e07aaf93934f93522b3a81b
2015-12-08 06:14:34 -08:00
Andrei Coman 5aef380609 Refactor NetInfo
Reviewed By: foghina

Differential Revision: D2718059

fb-gh-sync-id: 5c4e946991be27c5ae2bcc3eec32b5bc596545bd
2015-12-08 04:56:26 -08:00
Nick Lockwood b672294858 Added RCTImageSource
Summary:
public

The +[RCTConvert UIImage:] function, while convenient, is inherently limited by being synchronous, which means that it cannot be used to load remote images, and may not be efficient for local images either. It's also unable to access the bridge, which means that it cannot take advantage of the modular image-loading pipeline.

This diff introduces a new RCTImageSource class which can be used to pass image source objects over the bridge and defer loading until later.

I've also added automatic application of the `resolveAssetSource()` function based on prop type, and fixed up the image logic in NavigatorIOS and TabBarIOS.

Reviewed By: javache

Differential Revision: D2631541

fb-gh-sync-id: 6604635e8bb5394425102487f1ee7cd729321877
2015-12-08 03:32:30 -08:00
Mike Armstrong dcebe8cd37 Use ascii characters to construct JSStringRef
Reviewed By: astreet

Differential Revision: D2700781

fb-gh-sync-id: be790600ea3d4c0238553efe69a0979c177ddb2d
2015-12-08 01:39:28 -08:00
James Ide a659c9346c [Docs] Fix up small typo in code style docs 2015-12-07 23:24:23 -08:00
James Ide c031ccdc57 JSX style
Wrote some notes on the standard JSX / XHP style
2015-12-07 23:23:26 -08:00
Spencer Ahrens 4ce03582a0 Improve Text perf
Summary:
public

Most apps create tons of text components but they are actually quite heavy because of the the Touchable mixin which requires binding tons of functions for every instance created.

This diff makes the binding lazy, so that the main handlers are only bound if there is a valid touch action configured (e.g. onPress), and the Touchable mixin functions are only bound the first time the node is actually touched and becomes the responder.

ScanLab testing shows 5-10% win on render time and memory for various products.

Reviewed By: sebmarkbage

Differential Revision: D2716823

fb-gh-sync-id: 30adb2ed2231c5635c9336369616cf31c776b930
2015-12-07 23:12:28 -08:00
Christopher Dro e25d5c2f37 Merge pull request #4634 from christopherdro/debugging-docs
[Docs] Typo fix for adb reverse command in Debugging.md
2015-12-07 23:11:33 -08:00
Christopher Dro 17428982eb [Docs] Typo fix for adb reverse command in Debugging.md 2015-12-07 23:06:04 -08:00
Sam Swarr 61272e69e9 Fix race condition in packager list dependencies
Reviewed By: martinbigio

Differential Revision: D2732655

fb-gh-sync-id: 6d3d730b499c183d3f6977a30ec37a799cc17c33
2015-12-07 19:26:28 -08:00
Nick Lockwood f9b744d501 Use lazy getters to reduce `require('react-native')` overhead
Summary:
public

In the open source React Native implementation, the recommended approach for importing modules is by importing a the `ReactNative` object, which includes all available modules.

This is rather inefficient because it ends up initializing all the JS modules, even if you don't use them.

This diff switches the properties of the `ReactNative ` object to lazy getter functions, which defers the `require` until the module is actually requested.

This doesn't prevent unused modules from being included in the JS bundle, but it will prevent them from being initialized unless/until they are used.

Reviewed By: vjeux

Differential Revision: D2722993

fb-gh-sync-id: 0e9a2beb3aa6cd087a0592bd59a8f9242040be0c
2015-12-07 17:00:42 -08:00
Mike Armstrong 0f98dedefe More markers for view operations
Reviewed By: astreet

Differential Revision: D2679126

fb-gh-sync-id: 882e815a7551d23b4594fdc2dd257b4f1cdbbab7
2015-12-07 15:25:27 -08:00
Brent Vatne 27f2e08a6c Merge pull request #4522 from niftylettuce/master
Switched recommendation from superagent to frisbee
2015-12-07 12:23:47 -08:00
Satyajit Sahoo 93f9a4a7ee Fix for flow (https://github.com/facebook/flow/tree/v0.19.0)
Summary:
From flow release notes (https://github.com/facebook/flow/releases),
> import type * as Foo is now disallowed in favor of import type Foo
Closes https://github.com/facebook/react-native/pull/4565

Reviewed By: svcscm

Differential Revision: D2723280

Pulled By: mkonicek

fb-gh-sync-id: 57074ab893c3e2eae3cefc3002853bfdfed91734
2015-12-07 11:29:24 -08:00
Nick Baugh 7605d2d8cd Switched recommendation from superagent to frisbee, Moved XMLHTTPRequest to bottom of doc page
Resolves issues per recommendations by @ide

Added axios reference
2015-12-07 13:53:01 -05:00
sathis abea6c30b4 Make style property available in Image.android.js like Image.ios.js
Summary:
Thanks ahanriat for pointing out  :)
Closes https://github.com/facebook/react-native/pull/4618

Reviewed By: svcscm

Differential Revision: D2729582

Pulled By: androidtrunkagent

fb-gh-sync-id: df7b9af24cc035c7a9618a7850d628961fcd776b
2015-12-07 10:47:28 -08:00
Brent Vatne ec11e6abff Merge pull request #4626 from pagrawl3/patch-1
Added Hubhopper to the showcase.
2015-12-07 10:07:47 -08:00
Pratham Agrawal 7600909caf Added Hubhopper to the showcase. 2015-12-07 23:03:12 +05:30
Alexander Blom 510d50fc17 Trigger GC and drop compiled code on low memory
Reviewed By: astreet

Differential Revision: D2658693

fb-gh-sync-id: 8cba49b67ac45a2dbf8b4c9c404d6fb9c97693f6
2015-12-07 08:46:25 -08:00
Martin Konicek 611e0619ca Rename PullToRefreshLayoutAndroid -> PullToRefreshViewAndroid
Summary:
The naming "Layout" is an Android-specific thing and not useful in JS. Let's stay consistent with naming like "ScrollView", "MapView" etc.

public

Reviewed By: bestander

Differential Revision: D2723163

fb-gh-sync-id: 6b86e5a649254c41e9d6b0ef6f1fe2ff4b9f3e9a
2015-12-07 08:33:25 -08:00
Tadeu Zagallo 02ded6d0bb Preserve all return registers on x86_64 trampoline
Summary:
public

Only the first quad-word and floating point return registers were being preserved,
make sure to preserve the 2nd ones as well (`%rdx` and `%xmm1`)

Reviewed By: jspahrsummers

Differential Revision: D2727523

fb-gh-sync-id: d8176512d2dfb5f664f634ecaaf34510515506ea
2015-12-07 06:43:28 -08:00
Mike Armstrong 69ce5ab5b8 JSC bindings for flow events
Reviewed By: astreet

Differential Revision: D2717887

fb-gh-sync-id: 40d03ac140669b8ebeb096917f2aba32fe260a1a
2015-12-07 03:51:29 -08:00
Olivier Notteghem a38ce5c570 match RN attachment images Feed experience with Native with spinner/fade in
Reviewed By: astreet

Differential Revision: D2722917

fb-gh-sync-id: a09b9a1a4b9a19b94471d8e93ec5bde53af7da06
2015-12-06 15:48:34 -08:00
Brent Vatne f1a575eb30 Update KnownIssues.md 2015-12-06 15:39:37 -08:00
Brent Vatne fb4f05ed7b Update KnownIssues.md 2015-12-06 15:09:22 -08:00
Atticus White ca9f0adee2 Improve Modal docs describing iOS only support
Summary:
Adds a note that the `Modal` component is only available in iOS.

I hit a bit of a pickle this weekend after realizing a handful of components I built will have to be rewritten. Unfortunately there's no notes in the documentation that the support is limited. Hopefully this can contribute towards avoiding those situations
Closes https://github.com/facebook/react-native/pull/4592

Reviewed By: svcscm

Differential Revision: D2727634

Pulled By: androidtrunkagent

fb-gh-sync-id: 2d0efcca8e17d16cf63d592e235261cea63e59ea
2015-12-05 18:48:28 -08:00
James Ide 795b5b5c00 Merge pull request #4585 from jato/docs-jato
[Docs] fixes minor typo by adding space
2015-12-05 17:41:27 -08:00
James Ide 0f0ed39d2e Merge pull request #4584 from christopherdro/fix-4582
[Docs] Fix broken links for Testing.md - Closes #4582.
2015-12-05 17:39:36 -08:00
Mihai Giurgeanu 31125b2ed7 Android - Fixing #4392
Summary:
This is just an workaround for making UIExplorer work in Android.
Closes https://github.com/facebook/react-native/pull/4405

Reviewed By: svcscm

Differential Revision: D2727452

Pulled By: tadeuzagallo

fb-gh-sync-id: af48fb8c462ab04874cfdb96c0fd4409bf6d92c3
2015-12-05 14:59:29 -08:00
jato ba81517150 fixes minor typo 2015-12-05 13:29:07 -08:00
Christopher Dro 55d1db6768 [Docs] Fix broken links for Testing.md - Closes #4582. 2015-12-05 12:19:58 -08:00
James Ide 4c531d220a Merge pull request #4575 from satya164/docsfix
Improve docs for Building from source
2015-12-04 21:22:03 -08:00
Satyajit Sahoo b89e14ab95 Improve docs for Building from source 2015-12-05 10:46:08 +05:30
Dave Miller fa884ee5e6 Fix Y-coord on touches
Summary:
public

D2670028 updated the x/y positions of touch events to be relative to the window, but measure still uses the location on the screen. Therefore, in Touchable.js, we were seeing taps get inproperly invalidated because they were erroneously considered outside of the touch rect. This diff moves back to the old version of pageX/Y on touch events that's compatible with the current version of measure.

Reviewed By: nicklockwood

Differential Revision: D2724917

fb-gh-sync-id: 978ae26fcaa23c47a4f619e2b7ff2d078388ae95
2015-12-04 20:54:39 -08:00
glevi@fb.com 383d991c40 Fix flow errors in fbobjc
Reviewed By: jeffmo

Differential Revision: D2724169

fb-gh-sync-id: d2736ce2550fe8bf45c18bce7d89a9cb5c98cb87
2015-12-04 11:56:29 -08:00
SangYeob Bono Yu f4c286f7ac Add support for Universal Links
Summary:
Adds support for [Universal Links](https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html).
Closes https://github.com/facebook/react-native/pull/4109

Reviewed By: svcscm

Differential Revision: D2658105

Pulled By: nicklockwood

fb-gh-sync-id: 7d94564f64cda7d31c79cf8f4c450ed2387057be
2015-12-04 09:05:31 -08:00
Konstantin Raev c71811e491 Added Circle CI integration to run Android unit tests
Summary:
A few caveats before accepting:
- Do I need to squash commits?
- Need to set up new Circle CI account connected to FB react-native repo
- After that replace tokens and links to the new ones

Setting up Integration tests should be straight forward next week https://circleci.com/docs/android
Closes https://github.com/facebook/react-native/pull/4566

Reviewed By: svcscm

Differential Revision: D2723119

Pulled By: androidtrunkagent

fb-gh-sync-id: 2c4a46b206f15f36d94d1b10ff9e339f5182782b
2015-12-04 08:10:28 -08:00
Nick Lockwood dde55c30ea This Fixes scroll to top and resigning first responder
Reviewed By: tadeuzagallo

Differential Revision: D2713488

fb-gh-sync-id: 99b2646f7bf8a3ee889bbb856c298beed6817321
2015-12-04 07:56:29 -08:00
James Ide dff8f53664 Support plugins that conform to ES6 modules
Summary:
ES6 modules export an object with a property called `default`. See Babel itself for how this is handled: b5b7e346a0
Closes https://github.com/facebook/react-native/pull/4513

Reviewed By: svcscm

Differential Revision: D2715512

Pulled By: mkonicek

fb-gh-sync-id: 40e5ea35adcdb66806a4895578d637cd72538619
2015-12-04 07:45:29 -08:00
Matt Revell c1849e7f4b Fix an issue with unsafe picker access to setNativeProps.
Summary:
Fixing an issue where PickerIOS and DatePicker are being accessed unsafely, As a side effect we are also using ref callbacks as oppose to strings.

Fixed after spotting an issue in our app where the picker is closed and the callback attempts to update native props for an item that no longer exists.
Closes https://github.com/facebook/react-native/pull/3920

Reviewed By: svcscm

Differential Revision: D2663634

Pulled By: nicklockwood

fb-gh-sync-id: 813b32a038f59864401d5d3985c7ea32f5e13301
2015-12-04 07:41:30 -08:00
Dave Miller 4661e59d1a For clippedSubViews, pass down the opportunity for children views to update their clipping if they intersect at all
Reviewed By: astreet

Differential Revision: D2717903

fb-gh-sync-id: 8852a6d3ac3a329c4cad663e7f9f7093f9b6ae16
2015-12-04 04:16:28 -08:00
Dan Witte 70f0dfc0e6 revert D2707930
Reviewed By: fkgozali

Differential Revision: D2720828

fb-gh-sync-id: 53113fb33150b42a7b597a7dfd04bb9885def029
2015-12-03 18:29:28 -08:00
moschan d1029d1b9d fixed mardown formatting of ListView
Summary:
about renderRow and renderSeparator.
insert a new line before description.
Closes https://github.com/facebook/react-native/pull/4532

Reviewed By: svcscm

Differential Revision: D2718764

Pulled By: androidtrunkagent

fb-gh-sync-id: eeefd16617fcb5e5ca21f6fd0cf29d63cb3b1f1c
2015-12-03 11:56:29 -08:00
Nick Lockwood 9a47ca1cc9 Added addChildren() function as a more-optimal replacement for manageChildren for common use cases.
Reviewed By: jspahrsummers

Differential Revision: D2707930

fb-gh-sync-id: c44219bf9af943cad5b57f370656c1bcac732cd9
2015-12-03 11:34:27 -08:00
Andy Street ecdc3429cd Fork v4 support library NestedScrollView to fix fling bug
Reviewed By: oli, lexs

Differential Revision: D2707733

fb-gh-sync-id: c9b375a6aa1010d60d21ca7500e862a6ff91a49b
2015-12-03 11:15:51 -08:00