Commit Graph

7998 Commits

Author SHA1 Message Date
Aaron Chiu 8708c8bb82 make ViewManager extend BaseJavaModule
Reviewed By: achen1

Differential Revision: D3950323

fbshipit-source-id: 91fda89a9a457e0e5b6952b744eeba5e31c46a9a
2016-10-06 15:58:38 -07:00
Neil Sarkar 9311c4e6f5 Documentation: Update RunningOnDeviceAndroid.md
Summary:
Documentation change: add link to install lsusb on macs since it is not available by default.
Closes https://github.com/facebook/react-native/pull/10263

Differential Revision: D3982006

Pulled By: JoelMarcey

fbshipit-source-id: 66b191446e1b7a969ad2682efb573865e31ed91f
2016-10-06 11:14:18 -07:00
Charles Dick 217a4449d4 remove dependency between aggrow and stackRegistry
Reviewed By: bnham

Differential Revision: D3876267

fbshipit-source-id: 2ad7e70445f3f4641cde554e94de000403368233
2016-10-06 07:58:36 -07:00
Mike Lambert 1502e66c31 Allow code to check android permissions when run from a Service as well as Activity
Summary:
This allows the React JS code that's running from a Service (ie GcmListenerService) to check permissions (ie check for VIBRATE permissions before delivering notifications)

**Test plan (required)**

I've run this code from a GcmListenerService subclass, and it works correctly.
Closes https://github.com/facebook/react-native/pull/10229

Differential Revision: D3980853

fbshipit-source-id: 026b1f0c953d7093b5af2bec0b4a93ebd228f62e
2016-10-06 04:28:35 -07:00
dlowder-salesforce ccea759b71 Apple TV support 3: Run Travis CI for tvOS in separate script
Summary:
* Motivation

Fix a possible issue with Travis CI by running tvOS tests in a separate script.
Closes https://github.com/facebook/react-native/pull/10268

Differential Revision: D3980775

Pulled By: matryoshcow

fbshipit-source-id: 66dc52f4c0e5c492eb51d53fba209fc25361ce3e
2016-10-06 03:28:33 -07:00
Jani Eväkallio 467b637656 Add a debugger favicon
Summary:
I frequently spend multiple seconds scanning my open Chrome tabs for the React Native debugger tab. It would be a lot quicker to find the correct tab if the debugger UI tab had a favicon.

This commit adds favicon (blue react logo in a white circle). It's a super minor change, but would help a lot with day-to-day DX.

I chose this icon to differentiate sufficiently from other tabs developer might have open: React docs (blue logo in black square) and React Native docs (white logo in black square). If the idea of having a favicon is agreeable but you want a different asset, I'm more than happy to change it to something else.

Original asset before base-64 encoding:
![favicon-32x32](https://cloud.githubusercontent.com/assets/1203949/19117546/44b36fd2-8b11-11e6-8a94-c8956fe7533c.png)

In the wild:
<img width="335" alt="screen shot 2016-10-05 at 15 40 58" src="https://cloud.githubusercontent.com/assets/1203949/19117811/43cad316-8b12-11e6-8406-4c9b74efdaf2.png">
Closes https://github.com/facebook/react-native/pull/10252

Differential Revision: D3974983

Pulled By: hramos

fbshipit-source-id: 6b07d446dd972c4c171062134b45bc3850886349
2016-10-05 10:43:43 -07:00
Ovidiu Viorel Iepure 645540809f Revert "Add multipart response download task"
Summary:
Checking whether reverting commit 69ec19c61e fixes travis builds.

Travis run: https://travis-ci.org/facebook/react-native/builds/165087391
Closes https://github.com/facebook/react-native/pull/10250

Differential Revision: D3974738

Pulled By: bestander

fbshipit-source-id: a84759b51c2ca11e953b420515dacd597181ec65
2016-10-05 09:58:37 -07:00
David Aurelio 0b2d5317c4 Add `js_file_prod` rule
Reviewed By: matryoshcow

Differential Revision: D3913439

fbshipit-source-id: fe3a30fddb4d8fcabfc88caf9b1b032189812b89
2016-10-05 09:28:50 -07:00
David Aurelio aef3d8128f Add `js_file` rule
Reviewed By: matryoshcow

Differential Revision: D3900455

fbshipit-source-id: 61384ade035db978ef3ca258e4c0109bcb450692
2016-10-05 09:28:50 -07:00
Douglas Lowder 8622998335 Apple TV support 2: Xcode projects and CI (scripts/objc-test.sh)
Summary:
* Motivation *

Second PR for Apple TV support.

* Test plan *

Apple TV tests have been added to scripts/objc-test.sh
Closes https://github.com/facebook/react-native/pull/10227

Differential Revision: D3974064

Pulled By: javache

fbshipit-source-id: 36dffb4517efa489e40fa713a30655d1d76ef646
2016-10-05 07:28:44 -07:00
Nader Dabit 91d266ba87 Update ScrollView.js
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

For more info, see
Closes https://github.com/facebook/react-native/pull/10157

Differential Revision: D3974091

Pulled By: javache

fbshipit-source-id: c756fb82422253bb9098c37fbcb5637e58e53340
2016-10-05 05:05:07 -07:00
Michał Łazowik f77185f27e Fix rest operator syntax errors
Summary:
These are caused by new [syntax checking](1285131e3e/CHANGELOG.md (v6113-2016-10-01)) introduced by babylon.

"The single rest at the end only applies to binding `let { x, ...y } = obj;` and assignment `({ x, ...y } = obj).`"

I'd say this really should be cherry picked into the stable branch.

**Test plan**
1. install babylon@6.11.3
2. see that things break
3. apply patch
4. things work
5. make sure all instances were fixed (I used `\.\.\..*,.*\n.*=` in IntelliJ regex format—find all ... followed by newline followed by =)

Issue #10199
Closes https://github.com/facebook/react-native/pull/10200

Differential Revision: D3974066

Pulled By: javache

fbshipit-source-id: 3f3c1e9df01a3b3bdd61dd3863416c638d3ed98d
2016-10-05 04:43:45 -07:00
sunnylqm 1941450649 no "window" in react native
Summary:
There is no "window" in react native. And by the way fix the indent.
Closes https://github.com/facebook/react-native/pull/10182

Differential Revision: D3974090

Pulled By: javache

fbshipit-source-id: e0e47e15364abff5bcb136d988e234fc8e1f0a8b
2016-10-05 04:43:45 -07:00
leeight 9a7e4b4902 Dump invalid json when call Value::fromJSON failed
Summary:
See #9117
Closes https://github.com/facebook/react-native/pull/10231

Differential Revision: D3974063

Pulled By: javache

fbshipit-source-id: 63d3ae02ae731cd5a63fcb3a645c612c57cbb8b4
2016-10-05 04:43:45 -07:00
pedramsaleh fb355f663d Update TouchableHighlight.js
Summary:
Update to docs to indicate that TouchableHighlight must have exactly one child (i.e. not zero or more than one). Previously it was only indicated that it cannot have more than one.
Closes https://github.com/facebook/react-native/pull/10244

Differential Revision: D3970841

fbshipit-source-id: f1c4c223cfaf150fec9bbae1041567d0c81eb63b
2016-10-04 15:43:36 -07:00
Alex Kotliarskyi 69ec19c61e Add multipart response download task
Reviewed By: mmmulani

Differential Revision: D3940132

fbshipit-source-id: 7a6543223cea2523bedc585f890c9f64df0509ff
2016-10-04 15:13:35 -07:00
Felix Oghina f7cbd56d8e pass EventDispatcher to UIImplementation constructor
Summary: This way `UIImplementation` can hold on to it and use it outside of calls from the `UIManagerModule`.

Reviewed By: lexs

Differential Revision: D3899774

fbshipit-source-id: 01e4956c4540bcdf30774a3f40a625e934714ee9
2016-10-04 12:29:13 -07:00
Chace Liang 5eb28dc4f0 RC, fix cant refresh in campaign list view
Reviewed By: hedgerwang

Differential Revision: D3966351

fbshipit-source-id: 20b1621dd26c57f6367f9d2eab0be3661dee1843
2016-10-04 11:43:34 -07:00
Konstantin Raev 20ef20591f fixed mockito version
Summary:
Gradle unit tests started failing, this PR fixes mockito to be one specific version instead of loose 1.+

**Explain the **motivation** for making this change. What existing problem does the pull request solve?**

Circle CI started failing without any specific reason https://circleci.com/gh/facebook/react-native/tree/master, looks like a dependency error.

Alas it is, I can reproduce the error on master with clean caches.

**Test plan (required)**

After the fix:

```
bestander-pro:react-native bestander$ ./gradlew :ReactAndroid:testDebugUnitTest
Incremental java compilation is an incubating feature.
:ReactAndroid:preBuild UP-TO-DATE
:ReactAndroid:preDebugBuild UP-TO-DATE
:ReactAndroid:checkDebugManifest
:ReactAndroid:preDebugAndroidTestBuild UP-TO-DATE
:ReactAndroid:preDebugUnitTestBuild UP-TO-DATE
:ReactAndroid:preReleaseBuild UP-TO-DATE
:ReactAndroid:preReleaseUnitTestBuild UP-TO-DATE
:ReactAndroid:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:ReactAndroid:prepareComAndro
Closes https://github.com/facebook/react-native/pull/10239

Differential Revision: D3968396

Pulled By: matryoshcow

fbshipit-source-id: 63374261303fb98dc252898dfd5d3b3346597e4f
2016-10-04 10:43:35 -07:00
Jonathan Kim 2bca6acdaf Maintain whitespace in propType documentation
Summary:
When looking at PropType information for certain props the formatting puts everything on one line which makes it quite hard to read. This PR ensures that the whitespace extracted from react-docgen is preserved.

For example the documentation for [Transforms](http://facebook.github.io/react-native/releases/0.34/docs/transforms.html#transform) goes from:

<img width="717" alt="screenshot 2016-10-01 17 32 23" src="https://cloud.githubusercontent.com/assets/691952/19015498/74aaa5c8-87fd-11e6-922d-3eef38cc6452.png">

to:

<img width="707" alt="screenshot 2016-10-01 17 32 30" src="https://cloud.githubusercontent.com/assets/691952/19015500/784521a4-87fd-11e6-9c23-717d1ee31921.png">

**Test plan:**

Check PropType documentation is being rendered correctly on other components.

**N.B.** more style tweaks could be made here to make things more readable (e.g. reducing line height, monospace font) but I'll refrain from making them here in case there are explicit designs for the docs.
Closes https://github.com/facebook/react-native/pull/10197

Differential Revision: D3967759

Pulled By: hramos

fbshipit-source-id: bf3d3b2032dc6e9f5f1acf3907ecb7f57a2c57be
2016-10-04 07:58:33 -07:00
Charles Dick 286b56fbd0 Add configuration tab to aggrow
Reviewed By: bnham

Differential Revision: D3759273

fbshipit-source-id: fd09465e19fbd1b377bf8b384f9b0b241bf43288
2016-10-04 03:29:55 -07:00
Felix Oghină 9ac9ec90c3 Update docs on using onActivityResult (again)
Summary:
Update the long image picker example
Closes https://github.com/facebook/react-native/pull/10234

Differential Revision: D3967223

fbshipit-source-id: c99a98c1d83de9804406362fcddb7db0b83b08fa
2016-10-04 03:13:33 -07:00
David Aurelio bbade77fb4 Implement proper command handling for new worker tool
Reviewed By: matryoshcow

Differential Revision: D3906818

fbshipit-source-id: a192723a16094d3901de40a9914428fd6ff119a2
2016-10-04 02:59:34 -07:00
Alex Kotliarskyi b8804fdbc3 Send progress events via multipart response
Summary:
Context: I'm trying to add support for sending packager progress events to the client that is downloading the bundle over HTTP multipart response.

The idea is for the client to send `Accept: multipart/mixed` header, and if present the server will stream progress events to the client. This will ensure the change is backwards-compatible - the clients who don't know about progress events won't receive them.

In the future we can use this approach to download RAM bundle modules in one request.

Reviewed By: davidaurelio

Differential Revision: D3926984

fbshipit-source-id: 39a6e38e40a79f7a2f2cf40765a0655fb13b7918
2016-10-03 18:13:36 -07:00
Alex Kotliarskyi 8fbf0dad1f Move progress bar from Bundler to Server
Summary:
Context: I'm trying to add support for sending packager progress events to the client that is downloading the bundle over HTTP multipart response.

In order to do that I need the server to know about these events. Currently the bundler doesn't expose any hooks for monitoring the progress, so this diff introduces `onProgress` option for that.

Reviewed By: davidaurelio

Differential Revision: D3926806

fbshipit-source-id: b7d9c649df4f94ddf5082791209844610650325e
2016-10-03 18:13:36 -07:00
Alex Kotliarskyi e2b25c8c9d Add multipart response stream reader
Summary:
Packager can take a long time to load and the progress is usually displayed in another window (Terminal). I'm adding support for showing a UI inside React Native app for packager's progress when loading a bundle.

This is how it will work:

1. React Native sends request to packager with `Accept: multipart/mixed` header.
2. Packager will detect that header to detect that client supports progress events and will reply with `Content-Type: multipart/mixed`.
3. While building the bundle it will emit chunks with small metadata (like `{progress: 0.3}`). In the end it will send the last chunk with the content of the bundle.
4. RN runtime will be receiving the events, for each progress event it will update the UI. The last chunk will be the actual bundle which will end the download process.

This workflow is totally backwards-compatible -- normally RN doesn't set the `Accept` header.

Reviewed By: mmmulani

Differential Revision: D3845684

fbshipit-source-id: 5b3d2c5a4c6f4718d7e5de060d98f17491e82aba
2016-10-03 18:13:36 -07:00
Nicolas Cuillery 179a651240 Use HTML for links including closing bracket
Summary:
The markdown parser (Marked) used by the docs doesn't handle links ending with a closing bracket. The result is a broken link in the [Integration With Existing Apps](http://facebook.github.io/react-native/docs/integration-with-existing-apps.html#our-sample-app) guide.

Using HTML makes the parser ignoring these links.

Note: this is a well-known issue of Marked: https://github.com/chjj/marked/issues/690
Note bis: The fix #9429 didn't solve the problem.
Closes https://github.com/facebook/react-native/pull/10225

Differential Revision: D3964341

fbshipit-source-id: 61564d1cbb632fa1f0c71e7c6cbdc0b9a200caa4
2016-10-03 16:13:33 -07:00
Ovidiu Viorel Iepure 6130650d93 Replacing node-haste with jest-haste-map
Summary: Modified `node-haste` implementation to use the much faster `jest-haste-map` under the hood. The underlying `fastfs` now gets passed the entire file list from the `jest-haste-map` rather than crawl the filesystem.

Reviewed By: cpojer

Differential Revision: D3724387

fbshipit-source-id: 447d58ea0edf283662ec23d1e2deee992cf8d240
2016-10-03 05:28:56 -07:00
Pieter De Baets d7d89172c2 Expose ModuleRegistry on ExecutorDelegate
Differential Revision: D3944588

fbshipit-source-id: f8450a6735e1f6283c3bfe9d2ce883327172621c
2016-10-03 05:13:38 -07:00
Felix Oghina 6d175f2c25 Android: enable foreground ripple
Reviewed By: astreet

Differential Revision: D3932066

fbshipit-source-id: ee2f019cb9ba41e32cbbd8c1cd07c9ed5263fddc
2016-10-03 04:28:46 -07:00
Felix Oghina 8915507244 show touchable feedback for short touches
Summary: Currently, for short touches (under 130ms by default), we don't trigger the highlight effect. This diff makes it so that if we're not highlighted when we invoke onPress, we highlight.

Reviewed By: astreet

Differential Revision: D3932019

fbshipit-source-id: c0ff7d4c646890507ce510f51c279c88aeba66ae
2016-10-03 04:28:46 -07:00
Pieter De Baets a1402511f5 Update .eslintrc
Reviewed By: davidaurelio

Differential Revision: D3960563

fbshipit-source-id: 1c7b238e6fa1040b0d29bafd6f878c1319b040da
2016-10-03 03:14:46 -07:00
Tim Yung 0e2591e90b RN: Fix `flow-bin` Dependency
Reviewed By: jeffmo

Differential Revision: D3957804

fbshipit-source-id: a05026d36e5d3eff45dbc982250d3ff887cbb581
2016-10-02 20:58:42 -07:00
Tim Yung feced42fea RN: Upgrade ESLint Packages
Reviewed By: vjeux

Differential Revision: D3946990

fbshipit-source-id: f1be05ee7efed63e54c133d790b193b61e40ea36
2016-10-01 17:58:31 -07:00
Andy a2aab625f3 Fix webview crash when trying to display local html files
Summary:
When using webview on android and trying to link to an html file located on device (using `file://`), the application would crash with an error specifying that nothing handles the fired intent. This is due to [`33a1f28`](33a1f28654) which attempts to intercept all non `http(s)` links.

This is a simple fix so hopefully it can make it into the next stable release.
Closes https://github.com/facebook/react-native/pull/9668

Differential Revision: D3956485

fbshipit-source-id: 5a752abc21802a44e3a26e88669ccb6852076992
2016-10-01 11:43:37 -07:00
Jeff Morrison 1a9853da37 fbobjc
Reviewed By: gabelevi

Differential Revision: D3949455

fbshipit-source-id: 1cbce4a85fe5b8798496752863bbca64b078aa9c
2016-10-01 11:16:21 -07:00
Pieter De Baets 86c195b3d8 Upgrade OSS folly dependency
Reviewed By: bestander

Differential Revision: D3952605

fbshipit-source-id: 70146987c07b3c9917d19d7fbf844242343f9777
2016-09-30 15:28:38 -07:00
Hoa Dinh 5a24ea0b42 Create headers symlinks for FBReactKit
Reviewed By: javache, skotchvail

Differential Revision: D3946452

fbshipit-source-id: c6354f529bec2f9635a0ecf5f65e21dc4e17b1e4
2016-09-30 14:28:41 -07:00
Tim Creasy 707aba822e Added RCTLog.h import for clarity
Summary:
Explicitly show import statements in example implementation file.  Xcode build fails unless RCTLog is imported.  Adding this clarifies this, as it is not stated anywhere else.
Closes https://github.com/facebook/react-native/pull/10117

Differential Revision: D3952631

Pulled By: javache

fbshipit-source-id: f268ff53ee2cf69aabd83c3305c5c25add338d83
2016-09-30 12:58:37 -07:00
Alexander Pantyuhov c4ac8b329c StatusBar: barStyle support for Android (API 23+)
Summary:
Android (starting from API 23) supports "light status bar", thus it is possible to extend StatusBar and make `barStyle` property work not only for iOS, but also for Android.

This PR introduces one more `barStyle` option `dark-content` in addition to two existing ones (`default` and `light-content`).
Why there are 3 options instead of 2?

Two simple reasons:
1) to make all existing applications fully compatible with these changes;
2) the default status bar on Android is dark with white text and icons, while on iOS it is light with black text and icons on it. Thus the `default` option means something like "I don't really care, just apply the default color for this platform", while two other options (`light-content` and `dark-content`) allow to accurately specify the required result.
Closes https://github.com/facebook/react-native/pull/10185

Differential Revision: D3952346

fbshipit-source-id: 999a67614abff52321fbeb06298ebf1946c3f1d1
2016-09-30 12:58:37 -07:00
Pieter De Baets 5b52dab781 Remove follySupport.h
Reviewed By: lexs

Differential Revision: D3944918

fbshipit-source-id: 702907a12e3916f9d6edde7362416188df909d70
2016-09-30 12:28:41 -07:00
Pieter De Baets 6ee319d8eb Only configure nativeInjectHMRUpdate in DEBUG builds
Reviewed By: martinbigio

Differential Revision: D3944601

fbshipit-source-id: 8b98b7ae9a10c1e95d0ae80f6bbd90675d7c3ef5
2016-09-30 12:28:41 -07:00
Michał Gregorczyk 67f9d92478 Do not use bare file descriptors
Reviewed By: nadavrot

Differential Revision: D3945330

fbshipit-source-id: f3a28e2632c7f17a0b6394f3dd3de183bc9e97af
2016-09-30 12:13:51 -07:00
AgtLucas dbc853246d Remove missing link from Modal doc
Summary:
Is okay to remove this link? It seems that we don't have the Navigator Comparison anymore.
Closes https://github.com/facebook/react-native/pull/10186

Differential Revision: D3951863

Pulled By: mmmulani

fbshipit-source-id: 170f4cc9288f84d88c3b607e3a1a85619d9776c8
2016-09-30 11:43:44 -07:00
Pieter De Baets 4b70c66a27 Use glob in cxxreact BUCK rule
Reviewed By: lexs

Differential Revision: D3944546

fbshipit-source-id: 73cb3eeff3b3f5f543e69893f5071c4bd3e78be4
2016-09-30 09:28:47 -07:00
David Aurelio 31a78f3644 Rename Activity events for more clarity
Summary: Changed “Finding dependencies” and “Building Module Graph” to “Transforming modules” and “Initializing Packager” for more clarity

Reviewed By: matryoshcow

Differential Revision: D3950811

fbshipit-source-id: 7a2e655ef7e1655244ce427e7adc8c1e5afa7329
2016-09-30 08:58:36 -07:00
Ovidiu Viorel Iepure 2817b397de Add file transform event to Activity
Summary: Add a telemetric event to the transformer.

Reviewed By: davidaurelio

Differential Revision: D3950902

fbshipit-source-id: c46e95ee93925fb0f9d1784aebdc3206baf74dc6
2016-09-30 08:43:34 -07:00
David Aurelio 90db4f3c6d Add more information to activity events
Reviewed By: matryoshcow

Differential Revision: D3950787

fbshipit-source-id: b6ac22027380a9f7cc7bcb39ecd33d5c9255301f
2016-09-30 07:43:35 -07:00
Andrei Coman 9b261dbc94 Modal statusbar cleanup
Summary:
The hack for the status bar height is not necessary any longer, so we can remove
all code related to it

Reviewed By: lexs

Differential Revision: D3943770

fbshipit-source-id: 2d70f4ea10dd76ea6e6a73bb6edccae388bde1c0
2016-09-30 03:13:36 -07:00
Dave Pack 12a97e1ecd Fix Modal size on Android tablet
Summary:
On tablets, using Display.getRotation() returned ROTATION_0 or ROTATION_180 when it was in landscape, not portrait as it does on phones. This resulted in the Modal being sized incorrectly on tablets. Using size and comparing width and height is the only way I can think of to figure out the device orientation and give the modal the correct size. With this change, all issues listed in #7708 should be resolved.

**Test plan**
Modal should correctly fill screen on Android phone and tablet in both portrait and landscape.
Closes https://github.com/facebook/react-native/pull/10159

Differential Revision: D3950369

Pulled By: andreicoman11

fbshipit-source-id: 9488c4302a76cc48e4f8a4026eb5770d40b6e3d2
2016-09-30 02:44:09 -07:00