Commit Graph

3870 Commits

Author SHA1 Message Date
Tadeu Zagallo 16d9f045d1 Fix RCTNativeTraceEndSection calls
Summary: public

For "some" reason, exception is never `NULL`, it's `null` (the JavaScript value),
so the calls will never finish.

Reviewed By: javache

Differential Revision: D2625896

fb-gh-sync-id: fc8176a6ac485bfecc9903db05bf69b39ac2d9b4
2015-11-06 08:28:28 -08:00
Andrei Coman de586bfa18 Fix text input spans
Differential Revision: D2626072

fb-gh-sync-id: 35087d65b8f4a52e44fedc229058c3f88827e539
2015-11-06 08:23:29 -08:00
Alex Kotliarskyi 7b2cd03d6a [docs] Remove old image! examples from docs 2015-11-06 07:37:38 -08:00
Nick Lockwood 7779e06a7f Added rich text input support
Summary: public

It is now possible to display and edit rich text inside a multiline `<textInput>` by nesting a `<Text>` node inside it.

Note that this doesn't yet provide everything needed to build a full rich text editor (as there is no facility to capture or control the selected text range, or insert/remove text) but it does make it possible to apply token-based styling to text as the user types.

See the 'Attributed text' example in the UIExplorer > TextInput demo for details.

Reviewed By: javache

Differential Revision: D2622493

fb-gh-sync-id: b6bc9a46005322c806934541966460edccb59e70
2015-11-06 07:26:27 -08:00
Tadeu Zagallo 8dac41b7f0 Rename variable to unbreak the build
Reviewed By: javache

Differential Revision: D2625963

fb-gh-sync-id: 136013d7fa3b8eea322eea4ec45901376c30881d
2015-11-06 07:23:25 -08:00
Tadeu Zagallo de1c0169fc Clean up unnecessary profile events
Summary: public

There were some old markers that are now automatically inject and now are no longer necessary (+ one that was missing an end call :( ))

Reviewed By: javache

Differential Revision: D2625901

fb-gh-sync-id: 4c4c9d6b4e8e2b4bdb9c64fde01000b0ca2e9f47
2015-11-06 06:55:30 -08:00
Pieter De Baets c1ae4780ce Fix crash in RCTLog
Reviewed By: tadeuzagallo

Differential Revision: D2625795

fb-gh-sync-id: 6983a2dc9259fa1777c05011c2752e9520aa26cd
2015-11-06 06:36:29 -08:00
Alex Krolick 84d1c17dae document that CameraRoll is not implemented on Android
Summary: The CameraRoll API shows up "unsuffixed" in the API list in the docs, so it is confusing to find that it is unimplemented on Android.
Closes https://github.com/facebook/react-native/pull/3901

Reviewed By: svcscm

Differential Revision: D2625837

Pulled By: mkonicek

fb-gh-sync-id: 4e5c00d260a30840a12fd9be0409c354d2052642
2015-11-06 06:31:31 -08:00
Nick Lockwood faa584c3bd Added headerdoc for RCTBridgeDelegate
Reviewed By: javache

Differential Revision: D2622807

fb-gh-sync-id: 68d1e8cfd3beceafd07f041fa2976ac2552600f7
2015-11-06 05:28:33 -08:00
Martin Konicek 98afd7584b Merge pull request #3924 from calflegal/master
Fix broken link in testing documentation
2015-11-06 14:20:16 +01:00
Pieter De Baets 9d76acc3d6 Fix android log level offset
Reviewed By: andreicoman11

Differential Revision: D2625742

fb-gh-sync-id: a373e85b7dd2e0fcb904b61a7728b16f4836c742
2015-11-06 05:02:45 -08:00
Nick Lockwood e98d3cdab8 Added single border examples
Reviewed By: sahrens

Differential Revision: D2622604

fb-gh-sync-id: 28205e27a323e41c6e7f11b7d4a41add4e57be71
2015-11-06 04:51:28 -08:00
Alexander Blom a797be6ffd Support 'color' attribute in ProgressBarAndroid
Differential Revision: D2625690

fb-gh-sync-id: 34ef656be7ce3304add3fae3e697c6b39b866af1
2015-11-06 02:34:32 -08:00
Krzysztof Magiera 6a656a1491 Speedup gradle builds by setting explicit deps on prepareBoost task.
Differential Revision: D2625574

fb-gh-sync-id: db0887e184a6d098699c9f84a2c3cb0d3b7e7b0f
2015-11-06 00:22:28 -08:00
Felix Oghină 1019cc3aef Merge pull request #3545 from frantic/asset-docs
Document new asset system
2015-11-05 17:15:49 -08:00
Alex Kotliarskyi e73b08fc06 Document new asset system 2015-11-05 16:10:05 -08:00
Andy Street df36e388f1 Accept double args in ScrollView.scrollTo
Differential Revision: D2623473

fb-gh-sync-id: 8d4156e67f42d050f0f940d69ca534180d5a0b23
2015-11-05 15:27:27 -08:00
Felix Oghină 201318f949 [docs] remove note about upgrade not being available in stable 2015-11-05 15:20:25 -08:00
Felix Oghină 63a82c40ac Revert "[releng] build 0.14-stable on travis"
This reverts commit a632c5723c.
2015-11-05 15:07:47 -08:00
Felix Oghină a632c5723c [releng] build 0.14-stable on travis 2015-11-05 15:06:52 -08:00
Felix Oghină 767243bd54 [travis] build stable branches 2015-11-05 14:27:12 -08:00
Alex Kotliarskyi 10b599c343 Load assets from same folder as JS bundle
Summary: Fixes #3679, see https://github.com/facebook/react-native/issues/3679

The idea is to always load images from the same folder that we loaded JS bundle.

This doesn't change the current behavior, since `imageNamed:` inferred the
absolute path to the image from app's bundle, but now we make it explicit.

The benefit for OTA updates implementations is that they can simply ask RN
to load js from some `~/Documents/<build-id>/main.jsbundle` folder and RN will
look for images in `~/Documents/<build-id>/assets/`.

Note that for Android we will have to come out with a different plan, since
in prod we load images from built-in resources.

public

Reviewed By: vjeux

Differential Revision: D2616995

fb-gh-sync-id: 2906c62380280ecb987525edf9a0e3e727a1008b
2015-11-05 12:53:26 -08:00
Pieter De Baets 0c83407dd2 Simplify logging exceptions from JS to native
Reviewed By: vjeux

Differential Revision: D2615559

fb-gh-sync-id: ee931b3691251c8b6276699c6f927e47d8e8fd97
2015-11-05 12:51:47 -08:00
Pieter De Baets d9b4c57e12 Remove log level 'log' from JS
Summary: Log level 'log' from JS should be equivalent to 'info'. Also added knowledge of 'trace' log level in RCTLog.

public

Reviewed By: vjeux

Differential Revision: D2615500

fb-gh-sync-id: 7a02f49bf7953c1a075741c21e984470c44b5551
2015-11-05 12:51:41 -08:00
Pieter De Baets 824858c6b2 Add convenience function for formatting NSError for reporting
Reviewed By: nicklockwood

Differential Revision: D2620933

fb-gh-sync-id: c5c40b78b19f12c9a3b1564b1e21f1acb12309ab
2015-11-05 12:51:34 -08:00
Pieter De Baets 31b5b0ac01 Create RCTFatal for reporting fatal React events
Summary: public

Add RCTFatal for reporting fatal runtime conditions. This centralizes failure handling to one function and allows you to customize how they should be handled. RCTFatal will be logged to the console and as a redbox and will also be triggered by fatal exceptions coming from RCTExceptionsManager.

Note that there is no RCTLogFatal, since just logging the fatal condition does not allow us to handle it consistently.

Reviewed By: nicklockwood

Differential Revision: D2615490

fb-gh-sync-id: 7d8e134419e10a8fb549297054ad955db3f6bee0
2015-11-05 12:51:27 -08:00
rocman d8dd330d41 fix the memory leaks caused by RCTTabBar
Summary: The memory leaks root from the TabBarController not removing itself
when its holder view deallocs. So to fix the issue, it’s just to remove
it from its parentViewController when the holding RCTTabBar
deallocs. This should be safe, since the RCTTabBar seems the owner
of the TabBarController.
Closes https://github.com/facebook/react-native/pull/3915

Reviewed By: svcscm

Differential Revision: D2620905

Pulled By: nicklockwood

fb-gh-sync-id: ce22eb3ebf82562827f6b1bae22aea5ac7d3b51a
2015-11-05 09:39:30 -08:00
Mark Miyashita f8df38424e Use mainBundle in RCTConvert to resolve asset paths
Summary: See #3888 for why this is necessary. Essentially, `[NSBundle mainBundle]` loads the file path for the target app which is the only way to reference images.

cc javache nicklockwood
Closes https://github.com/facebook/react-native/pull/3889

Reviewed By: svcscm

Differential Revision: D2615580

Pulled By: nicklockwood

fb-gh-sync-id: d06ce0987dde666b06bb5a7edf609ed45f325d2c
2015-11-05 09:30:36 -08:00
Nick Lockwood 8db1e1262e Attempt to fix RCTImageLoader crash
Reviewed By: jspahrsummers

Differential Revision: D2620944

fb-gh-sync-id: 39896c8aa6f162df5769afdd0f947acf4bb5cb76
2015-11-05 09:09:29 -08:00
Patrick O'Meara b3cfc598ce allowFontScaling false changing lineHeight
Summary: * allowFontScaling false was still changing lineHeight as if it were true

fixes #2783
Closes https://github.com/facebook/react-native/pull/3840

Reviewed By: svcscm

Differential Revision: D2615710

Pulled By: nicklockwood

fb-gh-sync-id: 7e4205c58967640762deb5837ecaa2dde236782c
2015-11-05 09:02:22 -08:00
Pawel Sienkowski 4e1f2f4e0f Fixed: Move out setupDevtools call from renderApplication function
Reviewed By: sahrens

Differential Revision: D2620876

fb-gh-sync-id: 8971a1c523c06966dd11280e19272429aa3f9c8d
2015-11-05 08:50:29 -08:00
Calvin Flegal 15adead428 Fix broken link in testing documentation 2015-11-05 11:37:33 -05:00
Frédéric Sagnes f5670f8ab5 Set ASCII as the default bundle encoding
Reviewed By: davidaurelio

Differential Revision: D2596387

fb-gh-sync-id: deadb8e9a44bbe7b12ce9e6bb5e3c96d4f646074
2015-11-05 07:31:55 -08:00
Mike Armstrong 7431f4e182 Fix missing private on member variable
Differential Revision: D2620844

fb-gh-sync-id: b9901f46d6fe6a772a48dd091c273c581a383dda
2015-11-05 07:03:36 -08:00
Andrei Coman e3b6104810 Fix ViewPager warning
Differential Revision: D2620741

fb-gh-sync-id: 9f35e94efb25c689661bf2775a7d0624b3c586f4
2015-11-05 05:06:33 -08:00
Nick Lockwood 11df4cb08c Fixed display of alerts on top of modal window
Reviewed By: javache

Differential Revision: D2616170

fb-gh-sync-id: f72f728008099fff6fc966d7a2ce4c0d27a4fefd
2015-11-05 03:54:31 -08:00
Brent Vatne 0da2004e88 Expose additional private modules
Summary: - TextInputState as TextInput.State
- Touchable
- flattenStyle as StyleSheet.flatten
- ReactNativeART as ART

Original discussion in #1821
Closes https://github.com/facebook/react-native/pull/3308

Reviewed By: sebmarkbage

Differential Revision: D2527152

Pulled By: javache

fb-gh-sync-id: 19d4ef9d4c0e6587b9f0793e1ca624aebb034f3b
2015-11-05 03:35:18 -08:00
Dave Sibiski 7af752403e Implements `blurOnSubmit`
Summary: The default value (to retain current behavior) is set to `true`. Setting the value to `false` will prevent the textField from blurring but still fire the `onSubmitEditing` callback. However, the `onEndEditing` callback will not be fired.

Addresses issue: https://github.com/facebook/react-native/issues/2129
Closes https://github.com/facebook/react-native/pull/2149

Reviewed By: svcscm

Differential Revision: D2619822

Pulled By: nicklockwood

fb-gh-sync-id: 9a61152892f4afb5c6c53e7b38dffae13bc7e13f
2015-11-04 21:05:42 -08:00
Mike Armstrong 66f7feda4d Remove NativeRunnables from local references table.
Differential Revision: D2620026

fb-gh-sync-id: c105143d3ad932abcaff1407c6434148221753c4
2015-11-04 20:41:28 -08:00
Bhuwan Khattar a4cc0c3ffd No `NSError *` over the bridge
Summary: I was getting the following error when running `testAsyncStorageTest`
```
uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSError)'
```

nicklockwood pointed out that it might be because we're attempting to send a `NSError *` over the bridge at some point. So I went looking for cases where that might happen and found this instance.

public

Reviewed By: jingc

Differential Revision: D2619240

fb-gh-sync-id: dc26ec268f976fec44f2804831398d3b01ab6115
2015-11-04 20:07:31 -08:00
Mike Armstrong 575a4a71b9 Force fresco to go to network
Differential Revision: D2619848

fb-gh-sync-id: fe607dd8774c0c5f7122c362d64e4484c0bcce59
2015-11-04 19:44:35 -08:00
Christoph Pojer 7f93548489 Remove dependency on underscore
Reviewed By: davidaurelio

Differential Revision: D2614853

fb-gh-sync-id: 706fb0db6852f599a1b3dd022dbc22aabb76539a
2015-11-04 19:02:47 -08:00
Mike Armstrong 97135ee575 Metrics for grey box time
Differential Revision: D2619368

fb-gh-sync-id: 4c8105ecff3f4bd0df57042b49ae8b8e722d6b3e
2015-11-04 18:49:29 -08:00
Christoph Pojer d3599d0a88 Start pulling DependencyResolver apart
Summary: I'm planning to split up `DependencyResolver` into the react-native specific implementation of it and a new, generic resolver that is going to replace `node-haste` for jest and other places where we might need JS dependency resolution.

The plan is to split the two folders up so that:

* `Resolver` is the folder for all the react-native specific resolver code
* `DependencyResolver` will become a standalone library, eventually moving into a package called `node-haste`.

There is still a lot to be figured out. This is just the first diff of likely many. The current goal is to make `DependencyResolver` standalone to be able to create an instance of a resolver and resolve all dependencies for a file. This is when I can start integrating it more seriously with jest.

This diff simply moves a bunch of things around and turns `HasteModuleResolver` into an ES2015 class ( :) ).

bypass-lint
public

Reviewed By: davidaurelio

Differential Revision: D2614151

fb-gh-sync-id: ff4e434c4747d2fb032d34dc19fb85e0b0c553ac
2015-11-04 16:59:30 -08:00
Christoph Pojer 7041a22bd0 Update jest to 0.7.1
Reviewed By: frantic

Differential Revision: D2614935

fb-gh-sync-id: 64cc4fb439f0c53f0eb0588c22e0291813a7e334
2015-11-04 14:42:13 -08:00
Peter Lai 59ed90dd5f Fix build break: add java file changes to fbobjc
Reviewed By: jingc

Differential Revision: D2617489

fb-gh-sync-id: 3fa37dc52c526c79e3510754606e542b171b3a18
2015-11-04 14:16:26 -08:00
James Ide 471449b368 Merge pull request #3872 from mccambridge/master
Added media queries for Showcase page in docs
2015-11-04 12:27:02 -08:00
Pieter De Baets 05996963c9 Cleanup RedBox display of native errors
Reviewed By: nicklockwood

Differential Revision: D2615507

fb-gh-sync-id: 94f8013b418a3b95508cc55b9302fde4325bfcbf
2015-11-04 12:12:33 -08:00
James Ide 7fec60e6c4 Merge pull request #3891 from mgmcdermott/patch-1
Added Harmonizome
2015-11-04 11:57:48 -08:00
Spencer Ahrens a4f7aa4853 make onEndReached a little more robust
Summary: public

Now if you scroll up out of the end threshold and then back down into it,
onEndReached will get triggered again.  This closes https://github.com/facebook/react-native/issues/1967

This also resets onEndReached when the data source changes.  This would fix
issues where the data source changes and onEndReached should fire again since
the new data may have more pages, whereas the old data had reached the end and
stopped.

Reviewed By: jingc

Differential Revision: D2610799

fb-gh-sync-id: f6cef513a42d4765514bf4bc55d9e31a760117f1
2015-11-04 11:32:28 -08:00