Commit Graph

11861 Commits

Author SHA1 Message Date
Jiajie Zhu b7216f3e18 fix flow warning and typo
Differential Revision: D5796855

fbshipit-source-id: 455c2539b111e8e7aca44d762cefabf764171beb
2017-09-08 14:46:14 -07:00
Hongtan Du c893989d21 Add check for valid rootTag in ReactRootView
Reviewed By: AaaChiuuu

Differential Revision: D5796097

fbshipit-source-id: 1aed793dd77864f1b2cb20e64049483a084f0bc0
2017-09-08 14:17:38 -07:00
Mandeep Baines b89d6c8e04 consistent use of URL for resolving asset source
Reviewed By: frantic

Differential Revision: D5759789

fbshipit-source-id: daf33b6b66c4bff7f43213ee49286eafb6775f00
2017-09-08 10:47:22 -07:00
Trevor Brindle cb8a116d05 Use xcpretty for iOS build output if installed
Summary:
iOS/xcodebuild logging output sucks. It's completely unreadable because of how xcodebuild takes arguments. Fortunately a ruby gem has existed to fix this for years: xcpretty. You simply pipe xcodebuilds output to xcpretty and it cleans it up, showing relevant info in a more readable format.

This PR implements xcpretty output. It checks to see if xcpretty is in PATH, then uses it by default if it is, and can be disabled using a --verbose cli flag.

- Create a project from master
- run `react-native run-ios`
- Confirm output looks like this:

```tabrindle-mbp:shop-rn tabrindle$ make
Scanning 662 folders for symlinks in /Users/tabrindle/Developer/react-native/node_modules (5ms)
Found Xcode project Shop.xcodeproj
We couldn't boot your defined simulator due to an already booted simulator. We are limited to one simulator launched at a time.
Launching iPhone 6 (iOS 10.3)...
Building using "xcodebuild -project Shop.xcodeproj -configuration Debug -scheme Shop -destination id=0CD9ABF3-A8E4-43D6-A52B-F437FF0F45A0 -derivedDataPath build"
▸ Building React/yoga [Debug]
▸ Check Dependencies
▸ Building React/double-conversion [Debug]
▸ Check Dependencies
▸ Running script 'Install Third Party'
▸ Building React/third-party [Debug]
▸ Check Dependencies
▸ Building React/jschelpers [Debug]
▸ Check Dependencies
▸ Building React/cxxreact [Debug]
▸ Check Dependencies
▸ Building React/React [Debug]
▸ Check Dependencies
▸ Running script 'Start Packager'
▸ Running script 'Include RCTJSCProfiler'
▸ Building RCTSettings/RCTSettings [Debug]
▸ Check Dependencies
▸ Building BVLinearGradient/BVLinearGradient [Debug]
▸ Check Dependencies
▸ Building RCTActionSheet/RCTActionSheet [Debug]
▸ Check Dependencies
▸ Building RCTLinking/RCTLinking [Debug]
▸ Check Dependencies
▸ Building RCTWebSocket/fishhook [Debug]
▸ Check Dependencies
▸ Building RCTWebSocket/RCTWebSocket [Debug]
▸ Check Dependencies
▸ Building RCTText/RCTText [Debug]
▸ Check Dependencies
▸ Building RCTNetwork/RCTNetwork [Debug]
▸ Check Dependencies
▸ Building RCTAnimation/RCTAnimation [Debug]
▸ Check Dependencies
▸ Building RCTGeolocation/RCTGeolocation [Debug]
▸ Check Dependencies
▸ Building ReactNativeNavigation/ReactNativeNavigation [Debug]
▸ Check Dependencies
▸ Building RNI18n/RNI18n [Debug]
▸ Check Dependencies
▸ Building RCTImage/RCTImage [Debug]
▸ Check Dependencies
▸ Building RNVectorIcons/RNVectorIcons [Debug]
▸ Check Dependencies
▸ Building RCTVibration/RCTVibration [Debug]
▸ Check Dependencies
▸ Building Shop/Shop [Debug]
▸ Check Dependencies
▸ Running script 'Bundle React Native code and images'
▸ Building Shop/ShopTests [Debug]
▸ Check Dependencies
▸ Build Succeeded
Installing build/Build/Products/Debug-iphonesimulator/Shop.app
Launching com.marketamerica.MAMobile
com.marketamerica.MAMobile: 43497```
- run `react-native run-ios --verbose`
- confirm output looks as normal

Nothing else should be affected. This is simply a developer experience change. If xcpretty is not already installed, nothing will change at all. Many of us using fastlane have been spoiled by this for years.
Closes https://github.com/facebook/react-native/pull/15607

Differential Revision: D5740684

Pulled By: shergin

fbshipit-source-id: 09ef21414b8b65be92595b19502b843fa943403d
2017-09-08 10:00:51 -07:00
Vardan Torosyan dcac87330c Adding Soundcloud Pulse play store link to showcase
Summary:
Soundcloud Pulse for Android is now built in React Native.

This PR adds a link to the Play Store.

Company CLA is signed.
Closes https://github.com/facebook/react-native/pull/15867

Differential Revision: D5794317

Pulled By: hramos

fbshipit-source-id: d2d161d80c10706ec99a9a835a09fbf864ece2a5
2017-09-08 09:49:12 -07:00
Jean Lauliac 1de6ec46f8 RN local-cli: fix the reporter creation code
Reviewed By: mjesun

Differential Revision: D5766153

fbshipit-source-id: 4416e331a7170e49236bcd09555040fd7b5b61b5
2017-09-08 08:02:56 -07:00
Rafael Oleza 5e4f286f48 Use the new Delta HMR implementation from the internal React Native CLI
Reviewed By: jeanlauliac

Differential Revision: D5765025

fbshipit-source-id: fbf516c26382773c623bd3e0c2ba8b668bfd8b31
2017-09-08 06:30:03 -07:00
Rafael Oleza 8e0b970ff7 Bump metro-bundler to 0.16.0
Reviewed By: davidaurelio

Differential Revision: D5793558

fbshipit-source-id: c5d7f3029b889987613034150ba13a72b4850421
2017-09-08 06:30:03 -07:00
Héctor Ramos 30087f9726 Comment out Flow tests
Summary:
Commenting these out until we can stop breaking the OSS builds.
Closes https://github.com/facebook/react-native/pull/15859

Differential Revision: D5789816

Pulled By: hramos

fbshipit-source-id: f3b2ecd0cbcb4dbe5e35697a925b2a8bd8397afe
2017-09-07 23:15:52 -07:00
Jonathan Lee 182874d972 Reverting changes to MessageQueue
Reviewed By: zjj010104

Differential Revision: D5785916

fbshipit-source-id: ed30e3d2763d16c5a1f550f05d2b9f0997b83fbe
2017-09-07 14:30:59 -07:00
Spencer Ahrens f37fc6705a Add snapshot tests for sticky headers
Reviewed By: TheSavior

Differential Revision: D5751337

fbshipit-source-id: d281c1a81c7ec7135686b705c376c90d44218fdc
2017-09-07 13:05:35 -07:00
ubatin 1e8f3b1102 Update SignedAPKAndroid.md
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->
Add another keystore's settings path.

`+ or android/gradle.properties`
Closes https://github.com/facebook/react-native/pull/15846

Differential Revision: D5785326

Pulled By: hramos

fbshipit-source-id: 5bc2acbd53c7ce7fe4e866b8855c3ca8cd4d60dd
2017-09-07 10:00:22 -07:00
Alex Dvornikov bd723745c1 Allow Cxx references to be used in native module's method signature
Reviewed By: javache

Differential Revision: D5772182

fbshipit-source-id: 21e2f7b8d14ffdcfc0ba969c9a35315863a19b71
2017-09-07 09:17:04 -07:00
Michael Lee 1f2ca244d7 Move to fbsystrace to a new location
Reviewed By: dreiss

Differential Revision: D5760920

fbshipit-source-id: 9ff001dbd34660c14d061dec5428e82a815c719a
2017-09-07 09:17:02 -07:00
Ben Nham 6562324e4c fix RN app not connecting to dev server helper
Reviewed By: Hypuk

Differential Revision: D5784299

fbshipit-source-id: 3758db89283830b4c8fd49aadfbeb5fac90ee806
2017-09-07 04:51:48 -07:00
Miguel Jimenez Esun 33bbfb7125 Fix test for RN asset
Reviewed By: cpojer, rafeca

Differential Revision: D5777553

fbshipit-source-id: 3bc8559076435c6254972552095967b88acb0576
2017-09-07 01:55:56 -07:00
Tim Wang 165f876730 Add BlobModule native module mock to jest setup
Summary:
React Native v0.48.0 shipped `WebSocketModule` support with `BlobModule` as dependency. But `BlobModule` is not mocked in jest which will cause render tests failed.

Reference implantation: [BlobModule.java](ed903099b4/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobModule.java)

Related PR: #11417
Related issue: #15810

Passed CI tests.
Need render a component in jest with WebSocketModule as dependency.
Closes https://github.com/facebook/react-native/pull/15843

Differential Revision: D5783263

Pulled By: shergin

fbshipit-source-id: 2386692f4a644796da2fd66b3135da9f5911663e
2017-09-06 23:51:57 -07:00
Neo d3007b0fd2 fix fontWeight regression
Summary:
fix the regression I mentioned in https://github.com/facebook/react-native/pull/15162#issuecomment-319696706

as no one is working on this, I take the step, although I know nothing about Objective C

I find the key point is that the keys in `NSDictionary` are not ordered as presented, it's a hash table, so no grantee on keys order, so I create a new array to do that, then it will check `ultralight` before `light` and `semibold` before `bold`
Closes https://github.com/facebook/react-native/pull/15825

Differential Revision: D5782142

Pulled By: shergin

fbshipit-source-id: 5346b0cb263e535c0b445e7a2912c452573248a5
2017-09-06 23:51:57 -07:00
Valentin Shergin 7b962397b6 Fixed clowntoun related to `-[RCTShadowView canHaveSubviews]`
Summary:
Shame on me.
Naming can be hard. We have to use positive logic to avoid this kind of bugs. :(

In the bright future we also have to rename `isYogaLeafNode` to something with positive logic, like `canHaveYogaChildNodes`.
But before we can do this, we have to have solid plan how to unify it with Android.

Reviewed By: mmmulani

Differential Revision: D5780917

fbshipit-source-id: 1ddaaea06f5618b91528cc87f1433a55b5fae4ac
2017-09-06 23:51:57 -07:00
Valentin Shergin d2f3a7282b Bikeshedding in ReactTextInputShadowNode, part 2
Reviewed By: AaaChiuuu

Differential Revision: D5712962

fbshipit-source-id: b0cb5dbbd93b661252e5ddcf6c0a34e59cb7f2c6
2017-09-06 17:23:41 -07:00
Valentin Shergin 5f1f0b14f0 Bikeshedding in ReactTextInputShadowNode
Reviewed By: AaaChiuuu

Differential Revision: D5712963

fbshipit-source-id: 87c8394d82e0c206f908fb07eb8b7464b0ecabaf
2017-09-06 17:23:41 -07:00
Valentin Shergin 35cac3bf1b Introducing `ReactShadowNode.isYogaLeafNode()`
Summary:
We have to have a way to explicitly enforce the fact that some nodes cannot have Yoga child nodes.
Previously we relied on `isMeasureDefined()`, which is actually special case (so it does not cover all possible cases).

Reviewed By: AaaChiuuu

Differential Revision: D5647855

fbshipit-source-id: 59591be61ef62c61eb98748d44bb28b878f713fc
2017-09-06 17:23:41 -07:00
Valentin Shergin c3038d7210 Warn about slow main thread React methods
Summary:
This is revert of revert of https://github.com/facebook/react-native/pull/15542
WITHOUT default RCT_MAIN_THREAD_WATCH_DOG_THRESHOLD value. So, it makes it completly opt-in feature.

When code blocks the UI thread for too long, it's a bad sign because this can prevent the app from remaining responsive. This change helps detect such responsiveness issues by warning when a React method executes on the UI thread longer than some threshold.

Reviewed By: mmmulani

Differential Revision: D5772433

fbshipit-source-id: 24fe4fc0deffe9c091a4bfc4cbd76cb4f34c4091
2017-09-06 16:38:37 -07:00
Jiajie Zhu 34e9468b8f color filters - use TouchableBounce and make it configurable
Differential Revision: D5773726

fbshipit-source-id: fc01860bc5958d1368d3f39e2833382a212d60d2
2017-09-06 16:38:37 -07:00
Marshall Roch 91b6b4efb9 @allow-large-files Flow v0.54.0
Reviewed By: leebyron

Differential Revision: D5773490

fbshipit-source-id: 2c54bb6326f23edbe9a969f3010f79da8189923e
2017-09-06 03:33:43 -07:00
Martin Yrjölä 25639176ff Asset basenames in Jest snapshots
Summary:
This change only affects tests run with Jest. `require('/images/image1.png')` will be replaced with

```
Object {
  "testUri": "relative/path/to/images/image1.png",
}
```

in the Jest snapshot instead of always being 1 returned by RelativeImageStub. This change makes it possible to test conditional asset loading in components.

The problem with this change is that it will probably break a lot of existing snapshots, but that should be easily fixed when a project updates to a new version of React Native by running `jest -u` to update all snapshots.

A component can have conditional asset loading based on its props, this logic would be nice to test with Jest snapshots. This problem has been discussed in https://github.com/facebook/jest/issues/2838.

* **Who does this affect**: Everyone using `Image` in Jest snapshots
* **How to migrate**: Running `jest -u` will update the snapshots, the snapshots should be reviewed that they are correct.
* **Why make this breaking change**: It enables testing of conditional asset loading.
* **Severity (number of people affected x effort)**: Low.
Closes https://github.com/facebook/react-native/pull/13319

Reviewed By: rafeca

Differential Revision: D5708180

Pulled By: mjesun

fbshipit-source-id: 16ac42004d597db08545a21d4fffe95c5ee7e21f
2017-09-06 03:33:43 -07:00
Vince Oppedisano ad733ad430 Extend FlatList to support multiple viewability configs
Summary: FlatList only supports one viewability configuration and callback. This change extends FlatList and VirtualizedList to support multiple viewability configurations and corresponding callbacks.

Reviewed By: sahrens

Differential Revision: D5720860

fbshipit-source-id: 9d24946362fa9001d44d4980c85f7d2627e45a33
2017-09-05 18:51:25 -07:00
Janic Duplessis 64be88398d Fix content offset validation
Summary:
Content offset was broken because on initial render contentSize is {0,0} so any positive offset is lost. Also inset top/bottom and left/right were inversed �, this led to bad initial scrolling offset when using contentInset. This fixes it by making sure contentSize is actually measured (not {0,0}. I guess it's possible that the content is ACTUALLY {0,0} but in that case I don't think it really matters).

**Test plan**
Tested that a scrollview has proper scroll position when specifying contentOffset. Also tested that it works well with contentInset.
```js
<ScrollView contentOffset={{y: 100}}>
  <View style={{height: 1000}} />
</ScrollView>
```
Closes https://github.com/facebook/react-native/pull/15670

Differential Revision: D5771221

Pulled By: shergin

fbshipit-source-id: 455ed8fd5a4ad1ec61780b573d1a8ef1d77dd124
2017-09-05 16:35:03 -07:00
Michael Lee ed31f7a97d Reformat BUCK files
Reviewed By: zertosh

Differential Revision: D5756296

fbshipit-source-id: 69af6e9211648a81ba864be8d37165023cb5f9c2
2017-09-05 15:02:19 -07:00
Andrew Chen (Eng) 1ccc03c217 Fix Circle CI build missing appcompat dep
Differential Revision: D5769914

fbshipit-source-id: 51652e276165b4f61ae473bc25a19499da5bd1b4
2017-09-05 15:02:19 -07:00
Marc Horowitz d48f08cad6 Thread the JSI runtime descriptor up into the RCTDevMenu title
Reviewed By: javache

Differential Revision: D5643014

fbshipit-source-id: 977be5729c57c0d01ff67b268031ad6fdbf88a07
2017-09-05 15:02:19 -07:00
Radek Czemerys 7d4a5b67d4 Add missing licence to findSymlinksPaths
Summary:
Missing licence added. Fixes #15759.
Closes https://github.com/facebook/react-native/pull/15795

Differential Revision: D5768995

Pulled By: hramos

fbshipit-source-id: 2ecad87670f25362344a8da9478a79e731fd0ac2
2017-09-05 13:17:26 -07:00
bozdoz d0489720f9 Added styles.viewPager to complete example code
Summary:
Otherwise, you're met with a bewildering blank page. :D

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

(Write your motivation here.)

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes https://github.com/facebook/react-native/pull/15754

Differential Revision: D5768992

Pulled By: hramos

fbshipit-source-id: 39a9f7c208d635e089751015dcf2536144ec0176
2017-09-05 13:17:25 -07:00
Patrick ccf49655d9 Fix typo
Summary:
Fixed a typo in `ToastAndroid.js`'s comment.

No test plan. Just fix a typo.
Closes https://github.com/facebook/react-native/pull/15802

Differential Revision: D5767578

Pulled By: hramos

fbshipit-source-id: 4ccc708800f7d4259d266fba195981a85e6647a1
2017-09-05 12:48:16 -07:00
Tikhon Botchkarev 61800414cb Reference PermissionsAndroid in Geolocation doc
Summary:
Current Geolocation API docs do not mention using PermissionAndroid when working with API 23+. This updates the docs to reflect that requirement.

This a documentation change, so no testing is required.
Closes https://github.com/facebook/react-native/pull/14133

Differential Revision: D5767852

Pulled By: hramos

fbshipit-source-id: 25af70db864a50cdc5e3765eccdeecd49c084d9a
2017-09-05 11:53:14 -07:00
Héctor Ramos 4e2c084fd8 Comment out failing buck install command
Summary:
Workaround for #15726.
Closes https://github.com/facebook/react-native/pull/15817

Differential Revision: D5767831

Pulled By: hramos

fbshipit-source-id: f0324ed4052007648ac23f9015069a97f005d19b
2017-09-05 11:31:25 -07:00
GingerBear 75850b9014 Update Android Guide for Integration With Existing Apps
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

I was trying to follow the instruction on http://facebook.github.io/react-native/docs/integration-with-existing-apps.html to integrate react native into existing android app, but failed. After hours of google/stackoverflow, I finally get it running. I am submitting this pr the list the diffs in the guide so that other developer won't fell into the same issues.

- create an example android project
- follow the guide in the pr to integrate react-native into the example android project
- make sure it runs without error
Closes https://github.com/facebook/react-native/pull/15813

Differential Revision: D5767573

Pulled By: hramos

fbshipit-source-id: 805165a64b6db2aa2de936ad8f6a8a3d2fedd7c4
2017-09-05 11:01:40 -07:00
Andrew Chen (Eng) 5a3828d299 Dirty the shadow node when ReactLithoView requests layout
Reviewed By: shergin

Differential Revision: D5756680

fbshipit-source-id: 409095a2ee61db7ee7a85e12ab64c7806da3b3d9
2017-09-05 11:01:39 -07:00
Hitabis GmbH 2757260624 README: Remove broken link to section
Summary:
Section `#opening-issues` was removed in commit d1c9746902
Closes https://github.com/facebook/react-native/pull/15739

Differential Revision: D5767518

Pulled By: hramos

fbshipit-source-id: 9485470aae88e9aeff4e20f3c8d454244ccd8f50
2017-09-05 10:53:17 -07:00
James Ide 7d04fbaba2 Change intValue -> integerValue in RCTMultipartStreamReader
Summary:
We assign the value to an NSInteger so we should convert the NSString to an NSInteger instead of an int.

Build the app in Xcode and run it.
Closes https://github.com/facebook/react-native/pull/15806

Differential Revision: D5767118

Pulled By: shergin

fbshipit-source-id: b310511f13f5f4026d595a219d69811801d313c2
2017-09-05 10:02:44 -07:00
Michał Gregorczyk efd728ab7e ReactInstanceManager tests with non-JSC JavaScriptExecutor
Reviewed By: johnislarry

Differential Revision: D5764234

fbshipit-source-id: ea088b025def7ed4f39e6b75b8111ac13da9b331
2017-09-05 09:45:02 -07:00
Miguel Jimenez Esun baa873e506 Update Jest to v21
Reviewed By: cpojer

Differential Revision: D5765333

fbshipit-source-id: 94ea448c4380fdc68f42f84eb3963322ea18ec70
2017-09-05 05:18:30 -07:00
Miguel Jimenez Esun ef3fe66489 Remove nested "it"s
Reviewed By: jeanlauliac

Differential Revision: D5765323

fbshipit-source-id: 506865ef41ce272898cca9af28c0106ee3a0f57d
2017-09-05 05:18:30 -07:00
Rafael Oleza 307e40b8e5 Upgrade metro-bunder to v0.15.0
Summary: Some breaking changes require a new release.

Reviewed By: cpojer

Differential Revision: D5766207

fbshipit-source-id: d0ebc5cb46fbd2ad167c0a3369d0f354346f61b9
2017-09-05 05:18:30 -07:00
Pieter De Baets 8497ec297c Shortcut JSBigFileString in when no offset is used
Reviewed By: mhorowitz

Differential Revision: D5227225

fbshipit-source-id: a50688c8b873bf08ea10fafaa143df130f59dfaa
2017-09-05 03:15:43 -07:00
Rafael Oleza eb6ba0b041 Enable delta bundler on metro-bundler behind a cli argument
Reviewed By: mjesun

Differential Revision: D5761110

fbshipit-source-id: 83127f63679caffbc4f335f52f6f5eda398e8c05
2017-09-04 13:45:25 -07:00
Jean Lauliac 83bb8022e1 metro-bunder: v0.14.0
Summary: Some breaking changes require a new release.

Reviewed By: cpojer

Differential Revision: D5763898

fbshipit-source-id: 0580c9b1256c2c019adc5fb2f771c54d7e7a0bf1
2017-09-04 04:38:45 -07:00
Gabriel Bull 432fc2ab5b Fixed issue with path with spaces
Summary:
shergin This is a fix I [previously submitted](95d5d112ac (diff-883359f85083d00b7266ec2acebcca9fL3494)) but was somehow overwritten?
Closes https://github.com/facebook/react-native/pull/15760

Differential Revision: D5763636

Pulled By: shergin

fbshipit-source-id: 6b06fa7cddf068d376cb925bf7c8650a8a9700fb
2017-09-03 23:30:22 -07:00
Gilad Novik 8a85546ef9 Fix unrecognized selector error
Summary:
Fixes "[NSTaggedPointerString unsignedIntValue]: unrecognized selector" error
Closes https://github.com/facebook/react-native/pull/15755

Differential Revision: D5763628

Pulled By: shergin

fbshipit-source-id: 6e1d1b1ae6bc63e07112b9dddcdf8e6f812a7f51
2017-09-03 23:30:22 -07:00
Janic Duplessis e964a7f4ef Fix scroll events getting skipped on Android
Summary:
This code related to velocity would cause some scroll events to be skipped and caused some jitter for sticky headers. Not sure if there is a better fix but removing this does fix missing events and the velocity calculation still seems to be working.

**Test plan**
Tested that sticky headers now work properly on Android, tested that velocity calculation still seem to work.
Closes https://github.com/facebook/react-native/pull/15761

Differential Revision: D5760820

Pulled By: sahrens

fbshipit-source-id: 562b5f606bdc5452ca3d85efb5e0e3e7db224891
2017-09-01 18:06:24 -07:00