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

15560 Коммитов

Автор SHA1 Сообщение Дата
Woraphot Chokratanasombat 27617be9bb RNTesterSnapshotTests update ios snapshot images due to layout changes (#23152)
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:

Changelog:
----------
Currently ci in master fail for `test_ios`. Due to tests in `RNTesterSnapshotTests`. (Related to https://github.com/facebook/react-native/issues/23108)
Root cause is layout in RNTest was changed and snapshot is not updated to reflect changes. https://user-images.githubusercontent.com/4032276/51730680-06609480-20ab-11e9-88cb-d4113e2819f2.png

Reference: https://circleci.com/gh/facebook/react-native/68285?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

[iOS] [Fixed] - Fix test ios in ci
Pull Request resolved: https://github.com/facebook/react-native/pull/23152

Differential Revision: D13817049

Pulled By: cpojer

fbshipit-source-id: 7df8b6744ae91cf9be0ef9eee476c8f1565ae1f6
2019-01-25 05:25:39 -08:00
Pavlos Vinieratos 61ca119650 Replace deprecated `stringByReplacingPercentEscapesUsingEncoding:` with `stringByAddingPercentEncodingWithAllowedCharacters:` (#19792)
Summary:
Replace some NSString deprecated methods.
motivation for these prs is less warnings reported on xcode everytime we compile a rn app.

N/A

[INTERNAL] [DEPRECATIONS] [NSString] - Replace NSString deprecation methods.
Pull Request resolved: https://github.com/facebook/react-native/pull/19792

Differential Revision: D8515136

Pulled By: cpojer

fbshipit-source-id: 4379ef4e229ef201685b87e54ac859ba3d30a833
2019-01-25 05:25:39 -08:00
Michel dos Santos Kuguio 5be50d4820 - update to gradle 4.10.1 or high (#23103)
Summary:
Add suport to gradle 4.10.1 or high!
The new version of android studio 3.3 recommendete to update gradle project to 4.10.1

> To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you update the Android Gradle plugin to version 3.3.0 and Gradle to version 4.10.1. [Release notes ](https://developer.android.com/studio/releases/gradle-plugin)

>Android plugin 3.2.0 and higher now support building the Android App Bundle—a new upload format that defers APK generation and signing to compatible app stores, such as Google Play. With app bundles, you no longer have to build, sign, and manage multiple APKs, and users get smaller, more optimized downloads. [Learn more](https://developer.android.com/guide/app-bundle/?utm_source=android-studio)

but if the upgrade to the new Android gradle many warnings come up, becouse meny things was obsoleted

> WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.

> WARNING: API 'variant.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.

> WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.

> It will be removed at the end of 2019.
> For more information, [see ](https://d.android.com/r/tools/task-configuration-avoidance.)
> To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.

Changelog:
----------
[Android] [Deprecated] - fix warinings obsolete to update to gradle 4.10.1 or high
Pull Request resolved: https://github.com/facebook/react-native/pull/23103

Differential Revision: D13817123

Pulled By: cpojer

fbshipit-source-id: 9816e20145a5fded2702cf9317cfb6862f3ebd8b
2019-01-25 03:26:32 -08:00
Sergey Zolotarev 1024dc251e Change location of iOS build cache directory to ~/Library/Caches/ (#22688)
Summary:
Instead of using ~/.rncache use the special Caches directory designed for caching files. This fixes #21780.

Changelog:
----------

[iOS] [Changed] - Moved iOS build cache directory from ~/.rncache to ~/Library/Caches/com.facebook.ReactNativeBuild
Pull Request resolved: https://github.com/facebook/react-native/pull/22688

Differential Revision: D13817171

Pulled By: cpojer

fbshipit-source-id: af03dda66f9d49f4fe88bd050b359ccb7abb889a
2019-01-25 03:26:32 -08:00
zhongwuzw 103880b3c6 Add image bytes property of UIImage (#22731)
Summary:
* Added a `reactDecodedImageBytes` property of `UIImage`, to give the chances if user wants to do custom memory calculation.
* Fixes wrong calculation of GIF decoded image bytes.

Changelog:
----------

[iOS] [Fixed] - Fixes image decoded bytes calculation
Pull Request resolved: https://github.com/facebook/react-native/pull/22731

Differential Revision: D13817094

Pulled By: cpojer

fbshipit-source-id: ddc793d4734cba4e36f53b634bd3655883922c19
2019-01-25 03:26:32 -08:00
Kacper Wiszczuk 5218932b13 fix: change template to work with jest (#23150)
Summary:
This change is required to make `yarn test` work in newly initialized project.
`Jest@23` doesn't play well with new babel, so we need to install `babel-core@^7.0.0-bridge.0` and change `.babelrc` to `babel.config.js` to make it work. This is a temporary change till `jest` releases stable `24` version.
Pull Request resolved: https://github.com/facebook/react-native/pull/23150

Differential Revision: D13811428

Pulled By: hramos

fbshipit-source-id: 8db6b9177cd31d4a1213fb44964b05f26982bdf2
2019-01-24 17:33:50 -08:00
Jyrno Ader 7795a672d3 Android: Add error description to Image onError callback (#22737)
Summary:
fixes #19073

Changelog:
----------

[Android] [Fixed] - Add error description to Image onError callback
Pull Request resolved: https://github.com/facebook/react-native/pull/22737

Differential Revision: D13676224

Pulled By: hramos

fbshipit-source-id: 0dea7e97ae6517b8980ad02827f19d22cd3ef933
2019-01-24 16:04:29 -08:00
Peter Argany 527fc9d192 Globally disable LayoutAnimation during Snapshot Tests
Summary: LayoutAnimation is one source of flakiness in SSTs. Disable it globally in the SST apps.

Reviewed By: ejanzer

Differential Revision: D13791987

fbshipit-source-id: 0ebfd79fb31d235680c0d84f4b06d5a98c35260a
2019-01-24 15:24:59 -08:00
Steven Goff 67e7f16944 Feature/action sheet destructive button indexes (#18254)
Summary:
This is a recreation of #13924, rebased on top of master, as the former PR wasn't re-reviewed and automatically closed by the bot.

iOS [Action Sheets docs](https://developer.apple.com/ios/human-interface-guidelines/ui-views/action-sheets/) say

> Make destructive choices prominent. Use red for buttons that perform destructive or dangerous actions, and display these buttons at the top of an action sheet.

Currently ActionSheetIOS's showActionSheetWithOptions only supports a single destructive button via the prop `destructiveButtonIndex`.

This PR maintains backwards compatibility with `destructiveButtonIndex` while simultaneously supporting `destructiveButtonIndexes` allowing developers to pass an array of destructive indexes

```js
ActionSheetIOS.showActionSheetWithOptions({
  options: ['one', 'two', 'three'],
  destructiveButtonIndexes: [0, 1],
}, () => {});
```
<img width="282" alt="actionsheet" src="https://cloud.githubusercontent.com/assets/3091143/25963211/1c211a16-3646-11e7-9b7c-c9a2dbea7832.png">

Some additional tests, all working as expected (item only red if it is a matching index).

```js
    ActionSheetIOS.showActionSheetWithOptions({
      options: ['one', 'two', 'three'],
      destructiveButtonIndexes: [0, 19],
    }, () => {});
```

```js
    ActionSheetIOS.showActionSheetWithOptions({
      options: ['one', 'two', 'three'],
      destructiveButtonIndexes: [],
    }, () => {});
```

```js
    ActionSheetIOS.showActionSheetWithOptions({
      options: ['one', 'two', 'three'],
      destructiveButtonIndexes: undefined,
    }, () => {});
```

```js
    ActionSheetIOS.showActionSheetWithOptions({
      options: ['one', 'two', 'three'],
    }, () => {});
```

```js
    ActionSheetIOS.showActionSheetWithOptions({
      options: ['one', 'two', 'three'],
      destructiveButtonIndexes: [0, 5, 0, 0],
    }, () => {});
```

```js
    ActionSheetIOS.showActionSheetWithOptions({
      options: ['one', 'two', 'three'],
      destructiveButtonIndexes: [0, 5, 0, 0, 'non numeric', 12.34],
    }, () => {});
```

The following will crash the app but I believe this is expected

```js
    ActionSheetIOS.showActionSheetWithOptions({
      options: ['one', 'two', 'three'],
      destructiveButtonIndexes: 'not an array',
    }, () => {});
```

```js
    ActionSheetIOS.showActionSheetWithOptions({
      options: ['one', 'two', 'three'],
      destructiveButtonIndexes: null,
    }, () => {});
```

- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
Pull Request resolved: https://github.com/facebook/react-native/pull/18254

Differential Revision: D13680516

Pulled By: hramos

fbshipit-source-id: ac183cdcf5e1daef8e3c584dcf6a921bbecad475
2019-01-24 12:29:49 -08:00
Oleg Bogdanov 5c0dcddc0f Expose initialAppState constant from Android native AppState module (#19935)
Summary:
This PR addresses TODO left in _AppState.js_

The goal is to align AppState module implementation between iOS and Android. iOS native module exposes _initialAppState_ constant that AppState.js relies on, while Android doesn't expose that constant and js implementation uses a fallback. This PR aims to remove a need for a fallback
Pull Request resolved: https://github.com/facebook/react-native/pull/19935

Reviewed By: hramos

Differential Revision: D13774044

Pulled By: ejanzer

fbshipit-source-id: 05d27e702cb9aeedf14293158bfd50004df4726b
2019-01-24 11:30:49 -08:00
Rafael Melo e4d7fc06cb Fixed string ref which was causing alert on react <Strictmode> (#23146)
Summary:
Changelog:
----------
[General] [Fixed] - After using React's `<StricMode>` it was discovered that a string ref was set, which is bad practice.
Pull Request resolved: https://github.com/facebook/react-native/pull/23146

Differential Revision: D13802397

Pulled By: cpojer

fbshipit-source-id: c2744877b25ad59eb1e4e9ce48a45e762f227b56
2019-01-24 08:28:47 -08:00
David Aurelio f4def0062c Delete functionality for shared childen
Summary:
@public

Removes `YGNodeInsertSharedChild` / `addSharedChildAt`.

This functionality is unused, and can cause memory leaks.

Reviewed By: SidharthGuglani

Differential Revision: D13711105

fbshipit-source-id: 86206c05393b3f1a497e6b046006f94ead88c6ce
2019-01-24 06:31:00 -08:00
gengjiawen 9351dd6c69 migrate ci to official docker (#21477)
Summary:
Simplify current build and offer it to community as official docker.
I have also created an [rfc](https://github.com/react-native-community/discussions-and-proposals/pull/36).
pass all current ci.
none
 [GENERAL] [INTERNAL] [CI] - migrate ci to official docker
Pull Request resolved: https://github.com/facebook/react-native/pull/21477

Differential Revision: D13801696

Pulled By: cpojer

fbshipit-source-id: fa235cf21ab5af2c87eb3c1a14788fab01c71ccf
2019-01-24 06:31:00 -08:00
ewamal 988366a417 update xcode version to 2.0.0 (#23051)
Summary:
Update `xcode` package from 1.0.0 to 2.0.0 due to vulnerability issues affecting `plist`. Please, find below excerpt of the Snyk report.

> LOW SEVERITY
> Regular Expression Denial of Service (ReDoS)
> **Vulnerable module**: plist
> **Introduced through**: react-native@0.57.5
> **Introduced through**: learner-tools-miniapp@0.0.1 › react-native@0.57.5 › xcode@1.0.0 › simple-plist@0.2.1 › plist@2.0.1
>
> **Overview**
> plist is a Mac OS X Plist parser/builder for Node.js and browsers
>
> Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks due to bundling a vulnerable version of the XMLBuilder package. This can cause an impact of about 10 seconds matching time for data 60 characters long.
Pull Request resolved: https://github.com/facebook/react-native/pull/23051

Differential Revision: D13716882

Pulled By: hramos

fbshipit-source-id: 8aa91c8ac85d31b72302b7d24e76bd61623bbbda
2019-01-23 22:03:36 -08:00
Adam Comella 4936d284df Android: Add a maxFontSizeMultiplier prop to <Text> and <TextInput> (#23069)
Summary:
Equivalent of this iOS PR: https://github.com/facebook/react-native/pull/20915

Motivation:
----------

Whenever a user changes the system font size to its maximum allowable setting, React Native apps that allow font scaling can become unusable because the text gets too big. Experimenting with a native app like iMessage on iOS, the font size used for non-body text (e.g. header, navigational elements) is capped while the body text (e.g. text in the message bubbles) is allowed to grow.

This PR introduces a new prop on `<Text>` and `<TextInput>` called `maxFontSizeMultiplier`. This enables devs to set the maximum allowed text scale factor on a Text/TextInput. The default is 0 which means no limit.
Pull Request resolved: https://github.com/facebook/react-native/pull/23069

Differential Revision: D13748513

Pulled By: mdvacca

fbshipit-source-id: 8dd5d6d97bf79387d9a2236fa2e586ccb01afde9
2019-01-23 11:40:00 -08:00
David Vacca 5bc709d517 Temporary render <View> for <AndroidTextInput> component
Summary: Temporary render <View> for <AndroidTextInput> component to unlock testing basic React Screens that uses TextInput

Reviewed By: sahrens

Differential Revision: D13768283

fbshipit-source-id: 9fda8c633f03ec9e88dccef3525726e1a9d60f73
2019-01-23 11:31:56 -08:00
cpojer 9793b05bf3 Friendlier Danger bot (#23124)
Summary:
Danger bot is pretty aggressive. This makes it a bit more friendly and helpful.

See screenshot (this PR previously had an empty summary):

<img width="785" alt="screen shot 2019-01-23 at 14 23 32" src="https://user-images.githubusercontent.com/13352/51613007-84416600-1f1a-11e9-88fc-6788f7854d89.png">

[General] [Changed] Danger bot is now friendlier in the RN repo.
Pull Request resolved: https://github.com/facebook/react-native/pull/23124

Differential Revision: D13782700

Pulled By: cpojer

fbshipit-source-id: 51a86af9449df6fef798415bcb450c79d7cea16b
2019-01-23 07:11:07 -08:00
Khaled Tantawy 9968d0c203 Rename dev settings menu preferences file as it conflicts with fennec's (#23123)
Summary:
On Android, resources with the same name from different libraries conflict, so it's encouraged to have prefixes for resource names.

This is one case where the settings menu preferences file in firefox for android is called `preferences.xml` so it conflicts with the dev support settings menu for react native.

when integrating react-native to the firefox project, react native dev settings menu never shows, and the one from firefox shows up instead.

This a link to a file from a fork project that I'm working on:
https://github.com/ghostery/browser-android/blob/master/mozilla-release/mobile/android/app/src/main/res/xml/preferences.xml

Please, let me know, if anything more needs to be changed

Changelog:
-----------
[Android] [Fixed] Rename dev settings menu preferences file with a RN prefix.
Pull Request resolved: https://github.com/facebook/react-native/pull/23123

Differential Revision: D13781836

Pulled By: cpojer

fbshipit-source-id: f27483d4eca5aa4148759b94b601673985c5aa91
2019-01-23 04:22:25 -08:00
zhongwuzw 803480aef5 Remove AlertExample from RNTester in iOS (#23099)
Summary:
Changelog:
----------

[iOS] [Removed] - Removed AlertExample from RNTester in iOS.
Pull Request resolved: https://github.com/facebook/react-native/pull/23099

Differential Revision: D13781905

Pulled By: cpojer

fbshipit-source-id: 38c4359792c8ad9d8205d87a33c24f834ef51bbf
2019-01-23 04:10:13 -08:00
Varun Gupta ad52f52624 Fix SwipeableActionButton styling. (#23113)
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:

Changelog:
----------

Help reviewers and the release process by writing your own changelog entry. See http://facebook.github.io/react-native/docs/contributing#changelog for an example.

[General] [Fixed] - Same style was applied twice to SwipeableQuickActionButton in a recent commit causing problems with the buttons layout.
Pull Request resolved: https://github.com/facebook/react-native/pull/23113

Differential Revision: D13781896

Pulled By: cpojer

fbshipit-source-id: 659ddaed32b6a1e90080344ea3b0b42088fd9783
2019-01-23 04:10:13 -08:00
zhongwuzw 9672c2e245 Add CF_RETURNS_NOT_RETAINED annotate for Objective-C method which returns Core Foundation object (#23122)
Summary:
Changelog:
----------

[iOS][Fixed] - Add CF_RETURNS_NOT_RETAINED annotate for Objective-C method which returns Core Foundation object
Pull Request resolved: https://github.com/facebook/react-native/pull/23122

Differential Revision: D13781898

Pulled By: cpojer

fbshipit-source-id: 5953fa24a3d06766affdcabdec96bd43c062bf1b
2019-01-23 04:05:56 -08:00
Michael Diarmid 3b0b7ce8c3 Add Network Security Config file (fixes #22375) (#23105)
Summary:
This fixes #22375. Android API level 28 and above now blocks all [clear text requests](https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted) unless a network configuration rule is added to exclude it specifically.

The packager falls into this category and therefore gets blocked; resulting in the app being unable to connect to it.

Domains/IPs for the config have been taken from [here](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java#L20-L22).

This change only adds to DevSupport android resources - so won't affect builds without DevSupport, e.g. release builds.

Changelog:
----------

[ANDROID] [DevSupport] add Network Security Config file to allow access to packager via cleartext requests in Android API 28 and above. (fixes #22375)
Pull Request resolved: https://github.com/facebook/react-native/pull/23105

Differential Revision: D13781516

Pulled By: cpojer

fbshipit-source-id: f7574f3e1b0fe6984efe1d0598ef631385c245bc
2019-01-23 03:07:52 -08:00
zhongwuzw 25f7b0e878 Fix SectionList layout of RNTester on iOS (#23119)
Summary:
Changelog:
----------

[iOS] [Fixed] - Fix SectionList layout of RNTester on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/23119

Differential Revision: D13781561

Pulled By: cpojer

fbshipit-source-id: 9cc89c76a4139fe419c61a55b02a8a2992e76f4e
2019-01-23 03:01:37 -08:00
SHANKS 5ed31ce524 Fix RCTImageLoader multi thread crash (#22746)
Summary:
Fix crash similar to #22410
react-native: 0.51.0
react: 16.0.0

Changelog:
----------

[iOS] [Changed] - Use onw serial queue to execute invalidate and send request action in RCTHTTPRequestHandler.mm.

Message:
--------

```
- (void)invalidate
{
  [_session invalidateAndCancel];
  _session = nil;
}

- (NSURLSessionDataTask *)sendRequest:(NSURLRequest *)request
                         withDelegate:(id<RCTURLRequestDelegate>)delegate
{
  // Lazy setup
  if (!_session && [self isValid]) {
    NSOperationQueue *callbackQueue = [NSOperationQueue new];
    callbackQueue.maxConcurrentOperationCount = 1;
    callbackQueue.underlyingQueue = [[_bridge networking] methodQueue];
    NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
    [configuration setHTTPShouldSetCookies:YES];
    [configuration setHTTPCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
    [configuration setHTTPCookieStorage:[NSHTTPCookieStorage sharedHTTPCookieStorage]];
    _session = [NSURLSession sessionWithConfiguration:configuration
                                             delegate:self
                                        delegateQueue:callbackQueue];

    std::lock_guard<std::mutex> lock(_mutex);
    _delegates = [[NSMapTable alloc] initWithKeyOptions:NSPointerFunctionsStrongMemory
                                           valueOptions:NSPointerFunctionsStrongMemory
                                               capacity:0];
  }

  NSURLSessionDataTask *task = [_session dataTaskWithRequest:request];
  {
    std::lock_guard<std::mutex> lock(_mutex);
    [_delegates setObject:delegate forKey:task];
  }
  [task resume];
  return task;
}

```

now the invalidate function is called by the RCTBridge.invalidate->RCTCxxBridge.invalidate->[moduleData.instance invalidate] , this is on the "com.facebook.react.HTTPRequestHandlerQueue".
the sendRequest:withDelegate function is called by RCTImageLoader and is on the  "com.facebook.react.imageLoaderURLRequestQueue".

when one thread step in invalidate and execute [_session invalidateAndCancel] and the another thread step in sendRequest:withDelegate and execute [_session dataTaskWithRequest:request], the _session is invalidate, so there will be a crash "Task created in a session that has been invalidated"
Pull Request resolved: https://github.com/facebook/react-native/pull/22746

Differential Revision: D13781512

Pulled By: cpojer

fbshipit-source-id: bd5fd1edf593e2bcdcc18596a29e906882bac8a4
2019-01-23 02:50:57 -08:00
VisibleMarkov 5503355a0d ActivityIndicator (#23104)
Summary:
PR Related to: #22990

Changelog:
[Android][Changed] - All the imports connected to requireNativeComponent in ActivityIndicator was moved to  a seperate file.
Pull Request resolved: https://github.com/facebook/react-native/pull/23104

Differential Revision: D13781451

Pulled By: cpojer

fbshipit-source-id: 7204976d59a96abdaa81cdd7fd54fd001f7d1ee9
2019-01-23 02:31:55 -08:00
Dulmandakh 5bbed43854 android support library 28.0.0 (#23109)
Summary:
Bump Android Support Library to 28.0.0. Therefore fix Android CI

Changelog:
----------
[Android] [Changed] - Bump Android Support Library to 28.0.0.
Pull Request resolved: https://github.com/facebook/react-native/pull/23109

Differential Revision: D13779835

Pulled By: mdvacca

fbshipit-source-id: 7645ffe2c04ca81424b2f9cfa43dc4ec30c50e25
2019-01-23 02:22:00 -08:00
jesse 67ad72fa3c Add types to RCTSnapshotNativeComponent (#23111)
Summary:
Changelog:
----------
[iOS][Changed] - added types to RCTSnapshotNativeComponent.js, as mentioned in #22990
Pull Request resolved: https://github.com/facebook/react-native/pull/23111

Differential Revision: D13781429

Pulled By: cpojer

fbshipit-source-id: 7efffe150fd29cbfbb3a6b8f13e38295f83acb3c
2019-01-23 02:18:10 -08:00
Rafael Lincoln 70227fec66 RCTTabBar (#23118)
Summary:
His PR is related to #22990

Changelog:
----------

[IOS][Changed] - move the call to requireNativeComponent from TabBarIOS.ios.js to RCTTabBarNativeComponent.js
Pull Request resolved: https://github.com/facebook/react-native/pull/23118

Differential Revision: D13781428

Pulled By: cpojer

fbshipit-source-id: 3034c7db127a992c5757d70e22d98ee9acf4847b
2019-01-23 02:03:22 -08:00
Joshua Gross 62395d09eb Fabric: Add Fabric-compatible Slider component to iOS (ObjC code)
Summary: Objective-C side of the Fabric-compatible slider component for iOS.

Reviewed By: mdvacca

Differential Revision: D13745263

fbshipit-source-id: 647631d6fc86f81a5d4f735c507636ed9c468093
2019-01-22 17:03:08 -08:00
Joshua Gross c40a782b3a Fabric: Add Fabric-compatible Slider component to iOS
Summary: Fabric-compatible Slider component, minus image support (coming soon!)

Reviewed By: shergin

Differential Revision: D13644717

fbshipit-source-id: ce3f0c1ee530be4807b875cb2080c59693b7337a
2019-01-22 17:03:08 -08:00
Héctor Ramos dda193ae77 Streamline templates (#23107)
Summary:
Clarify the purpose of each issue template. Stop accepting discussions here, as there's a separate repository for that purpose.

Changelog:
----------

[General] [Changed] - Streamline issue templates on GitHub.
Pull Request resolved: https://github.com/facebook/react-native/pull/23107

Differential Revision: D13777281

Pulled By: hramos

fbshipit-source-id: a5b3e790a974a6898d611f0b60f8626e315e7585
2019-01-22 16:54:16 -08:00
David Vacca b718d33721 Eager load Fabric classes
Summary: Eager load classes used by Fabric. This is a temporary change that will be reverted in the near future

Reviewed By: shergin

Differential Revision: D13747454

fbshipit-source-id: 8ceb21f51982bcfcaa005dcc2ad9b457f7211795
2019-01-22 11:39:00 -08:00
David Vacca fe6f6cd46f Upgrade Android support library to version 28 in RN
Summary: This diff upgrades the Android Support Library to use version 28.0.0

Reviewed By: cpojer

Differential Revision: D13737512

fbshipit-source-id: 7b3d9c384df0b25e5ce48e769e1ff0ac9be9f104
2019-01-22 10:44:53 -08:00
David Vacca a746f3b6c4 Fix Android OSS CI
Summary: Replace a library to fix Android OSS CI

Reviewed By: fkgozali

Differential Revision: D13763871

fbshipit-source-id: 44e2b32883a03583a6dddcb656a848aa8b1f0bb8
2019-01-22 09:47:12 -08:00
Hagen Hübel 5ebe84c704 Removed method call to RCTRootView::setReactPreferredFocusedView as ... (#21596)
Summary:
…it doesn't exist (#21593)

Fixes #21593

RCTTVView.m contains a method called `setHasTVPreferredFocus`, where the following function call breaks the build:

      [(RCTRootView *)rootview setReactPreferredFocusedView:self];

`setReactPreferredFocusedView` was formerly part of **RCTRootViewInternal.h** but was removed sometime.
Pull Request resolved: https://github.com/facebook/react-native/pull/21596

Differential Revision: D13761925

Pulled By: cpojer

fbshipit-source-id: be536786d7a8209f3a97b039e17d68d0aa653a0d
2019-01-22 07:33:44 -08:00
Christoph Nakazawa f66e8ebf51 Fixes #issue18098 SectionList scrollToLocation (#21577)
Summary:
Fixes #18098
Pull Request resolved: https://github.com/facebook/react-native/pull/21577

Differential Revision: D13761884

Pulled By: cpojer

fbshipit-source-id: a096d69c589815d00754427fb575de0d8d0b595f
2019-01-22 07:27:10 -08:00
James Reggio 01f1780314 Expose static methods to manipulate the StatusBar stack imperatively (#21206)
Summary:
This PR exposes three static methods (`pushStackEntry`, `popStackEntry`, and `replaceStackEntry`) on StatusBar that enable imperative manipulation of the StatusBar style within the stack established by mounted StatusBar components.

Motivation:
----------

The StatusBar **component** provides a sensible API for manipulating that StatusBar style: every time a StatusBar component is mounted, its props are pushed onto a stack, and the props from the most recently mounted component are applied.

However, there are some scenarios where you may need to manipulate the StatusBar style from imperative code — particularly when invoking imperative third-party APIs that cause UI to appear. (For example, a user feedback utility or bug reporter that launches a full-screen modal.)

In modern iOS development, `UIViewControllerBasedStatusBarAppearance` is typically set to `YES`, which allows the third-party UIViewController to specify its preferred status bar style. However, as has been discussed at length in #11710, React Native has disabled this setting, which means that either the app's code or the third-party's React Native wrapper needs to manually manipulate React Native's StatusBar API to achieve the desired outcome.

The existing imperative StatusBar APIs are not a good fit for these needs because they simply overwrite the existing StatusBar styles, and provide no means of reverting StatusBar style changes when the third-party UI is dismissed.

To improve upon this situation, this PR makes it possible to call `StatusBar.pushStackEntry` before launching the third-party UI, wait for the UI to dismiss, and then call `StatusBar.popStackEntry` (supplying the token returned from the push call).

I've featured the new stack-based imperative methods in the documentation, but stopped short of explicitly deprecating the older imperative methods — though I can think of no reason not to deprecate them. Feedback is welcome on this point.

Release Notes:
--------------

[GENERAL] [ENHANCEMENT] [StatusBar] - Add static methods to manipulate StatusBar stack imperatively

Pull Request resolved: https://github.com/facebook/react-native/pull/21206

Differential Revision: D9945247

Pulled By: cpojer

fbshipit-source-id: ec118268cff5b47e87be81d0b9e1728ecc3a9b02
2019-01-22 07:12:04 -08:00
Mido 638d672abc Added groupCollapsed polyfill (#21457)
Summary:
`groupCollapsed` is used to group logs but collapsed which is very useful when the console has many logs (e.g. when using `redux-logger`).

For developers who prefer to debug iOS apps using Safari JSC, the `groupCollapsed` was not polyfilled.

Fixes #21446
Pull Request resolved: https://github.com/facebook/react-native/pull/21457

Differential Revision: D13761796

Pulled By: cpojer

fbshipit-source-id: e7c4f1ff4728c6a7f6ffd6cc629f7fbc1aa67e87
2019-01-22 07:05:22 -08:00
xianglinhe 47e77682d4 Update EventEmitter.js (#23047)
Summary:
added protection for emit() because subscription.listener may have been removed during event loop

Changelog:
----------

[GENERAL][FIX] Avoid crash when subscription listener may have been removed during event loop
Pull Request resolved: https://github.com/facebook/react-native/pull/23047

Differential Revision: D13761725

Pulled By: cpojer

fbshipit-source-id: 0753b780067bd712cd43caf63020c3f0d6ea9f52
2019-01-22 06:08:46 -08:00
VisibleMarkov ec488dcf63 AndroidViewPagers.js (#22995)
Summary:
[Android][Changed] - All the imports connected to `requireNativeComponent` in `ViewPager` was moved to  a separate file.
Issue in focus: #22990
Pull Request resolved: https://github.com/facebook/react-native/pull/22995

Differential Revision: D13760459

Pulled By: cpojer

fbshipit-source-id: fca1633ce933ea4909ef81d7bbe8123d654e24fb
2019-01-22 05:55:50 -08:00
RCiesielczuk f2ab0ebdbb RCTProgressView (#23077)
Summary:
Created a standalone JS file for the `RCTProgressView` native component.

This PR is part of #22990.

Changelog:
----------

[iOS] [Changed] - Created a standalone JS file for the `RCTProgressView` native component
Pull Request resolved: https://github.com/facebook/react-native/pull/23077

Differential Revision: D13760036

Pulled By: cpojer

fbshipit-source-id: 0f449528b28fde089d9c6b0eb9b752dee3a85af6
2019-01-22 05:49:36 -08:00
OdaDaisuke 7e82e45e94 RCTSlider (#23048)
Summary:
Changelog:

[iOS] [Changed] - Deal with #22990. Move `requireNativeComponent` to a separate file.
Pull Request resolved: https://github.com/facebook/react-native/pull/23048

Differential Revision: D13760373

Pulled By: cpojer

fbshipit-source-id: ff8cc9d468dc3bac55fc3d4156ad695dcdd10ab8
2019-01-22 05:44:54 -08:00
Rafael Lincoln bf27799ba8 ProgressBarAndroid (#23068)
Summary:
his PR is related to #22990

Changelog:
----------

[Android][Changed] - move the call to requireNativeComponent from ProgressBarAndroid.android.js to ProgressBarAndroidNativeComponent.js
Pull Request resolved: https://github.com/facebook/react-native/pull/23068

Differential Revision: D13760445

Pulled By: cpojer

fbshipit-source-id: b74ff42c6f207803de70be549a13487d59125a66
2019-01-22 02:48:35 -08:00
Chi-AnTai 6c18069a28 RCTPicker (#22996)
Summary:
[iOS] [Changed] - As #22990 said, move requireNativeComponent to a separate file.
I am not familiar with flow, I try to follow the https://pastebin.com/RFpdT76V example but I am not sure I have done it right.
Pull Request resolved: https://github.com/facebook/react-native/pull/22996

Differential Revision: D13697082

Pulled By: cpojer

fbshipit-source-id: c0c87a8e1a7f0553da994aba230f69b496140200
2019-01-22 02:12:42 -08:00
Mike Grabowski 1af390be19 Update references to the CLI (#23052)
Summary:
This updates React Native to use latest CLI. We also create Metro configuration, because CLI looks for React Native in "node_modules" by default. Since we are running React Native from source, it will fail to find required files.

To avoid hacky logic to detect if we are running from source backed into the CLI, I decided to leverage the Metro configuration instead.
Pull Request resolved: https://github.com/facebook/react-native/pull/23052

Reviewed By: rickhanlonii

Differential Revision: D13719938

Pulled By: cpojer

fbshipit-source-id: 1f40a40b3cdbb07ccd42daf75feb457556d3e40f
2019-01-21 09:13:08 -08:00
Christoph Nakazawa a3620799ec Fix OSS CI
Summary: This diff fixes Android OSS CI

Reviewed By: rickhanlonii

Differential Revision: D13747492

fbshipit-source-id: 6f90df6d3a096e3bf8a710382e192c3f54f00268
2019-01-21 08:28:47 -08:00
gengjiawen 1dfde49d08 fix windows build (#23082)
Summary:
Fix internal android ci.
Pull Request resolved: https://github.com/facebook/react-native/pull/23082

Differential Revision: D13750504

Pulled By: cpojer

fbshipit-source-id: 3a6c7703b8f2f6e25adee66650faea62385d0e12
2019-01-21 05:16:48 -08:00
seansy e011c4c0e2 Fixes 'Invalid render range' crash (#22847)
Summary:
When a list is updated to have fewer items and the user immediately
scrolls, the `ViewabilityHelper` `computeViewableItems` can be invoked
from the scroll and cause a crash.

This side effect *should* be relatively minor; the ViewabilityHelper shouldn't
cause a crash, as it generally would be used for analytics to see what users are viewing. I suggest changing this to a warning instead of a crash.  Other react-native developers seem to [also be getting this occasionally](https://github.com/facebook/react-native/issues/20289).

Changelog:
----------

[General] [Fixed] - `Invalid render range` crash changed to warning when viewability helper detects an anomaly in list data.
Pull Request resolved: https://github.com/facebook/react-native/pull/22847

Differential Revision: D13750031

Pulled By: cpojer

fbshipit-source-id: 053d2baad208d1efe5b18b07ab10226032e665b8
2019-01-21 01:58:54 -08:00
gengjiawen 9f64ba5b06 improve current bug report process (#23078)
Summary:
Changelog:
----------

[INTERNAL] [CI] - improve current bug report process
Pull Request resolved: https://github.com/facebook/react-native/pull/23078

Differential Revision: D13750022

Pulled By: cpojer

fbshipit-source-id: 915b1b00d7952ec0dd2d44e057b28cce0eefe930
2019-01-21 01:45:52 -08:00
zhongwuzw d55558e138 Fix isBatchActive of RCTCxxBridge (#22785)
Summary:
Seems we lost handler of `isBatchActive` from [RCTBatchedBridge a86171a](a86171a482/React/Base/RCTBatchedBridge.m) to [RCTCxxBridge 5bc7e39](b774820dc2 (diff-a2a67635fffd7b690d14dc17ae563a71)).

Changelog:
----------

[iOS] [fixed] - Fix isBatchActive of RCTCxxBridge
Pull Request resolved: https://github.com/facebook/react-native/pull/22785

Reviewed By: mhorowitz

Differential Revision: D13731897

Pulled By: cpojer

fbshipit-source-id: 8d6b85bcea8fe8997a93b4e1ac8b8007422ca20e
2019-01-21 00:28:48 -08:00