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

19427 Коммитов

Автор SHA1 Сообщение Дата
Eli White 3212f7dfe8 Release Pressable!
Summary:
*Pressable* is a component which is intended to replace the Touchable* components such as *TouchableWithoutFeedback* and *TouchableOpacity*. The motivation is to make it easier to create custom visual touch feedback so that React Native apps are not easily identified by the “signature opacity fade” touch feedback.

We see this component as eventually deprecating all of the existing Touchable components.

Changelog:
[Added][General] New <Pressable> Component to make it easier to create touchable elements

Reviewed By: yungsters

Differential Revision: D19674480

fbshipit-source-id: 765d657f023caea459f02da25376e4d5a2efff8b
2020-02-20 19:27:20 -08:00
Joshua Gross 6239ace5a3 For T62192299, log on AppRegistry.runApplication
Summary:
Fabric debugging.

I also have an agenda of removing all instances of `ReactConstants.TAG`, because it's overly broad and not helpful during debugging.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D20016401

fbshipit-source-id: 91e5cd7e8eb662b1a4a887c1e4e66a31ec741b46
2020-02-20 17:51:26 -08:00
Joshua Gross bf869d9917 `ReactInstanceManager.attachRootViewToInstance` should show up in production logs for T62192299 analysis
Summary:
Temporary debug logs.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D20016162

fbshipit-source-id: 27848a5249bd625c74dc9023c89da6ec5edd9bd5
2020-02-20 17:51:26 -08:00
Saumya Mukul 1e7ed81d16 Prevent modal dismissal with swipe gestures
Summary:
(Fixing the problems in this diff https://our.intern.facebook.com/intern/diff/D19836548/)

iOS 13 introduced interactive dismissal for modals https://medium.com/hacknicity/view-controller-presentation-changes-in-ios-13-ac8c901ebc4e.
This breaks react modals. We're disabling this feature for react modals
Changelog: [iOS][Fixed]  Prevent interactive dismissal for non-fullscreen modals

Reviewed By: shergin

Differential Revision: D19880343

fbshipit-source-id: e2ad82db3dd827812824862f432d549c865216b9
2020-02-20 17:31:38 -08:00
Tommy Nguyen 8ce27df08a iOS: Fix RCTDevLoadingView not showing up with UIScene (#27916)
Summary:
Attaches the loading view to a `UIScene` in apps using the new Scenes API (iOS 13+).

## Changelog

[iOS] [Fixed] - Fix RCTDevLoadingView not showing up with UIScene
Pull Request resolved: https://github.com/facebook/react-native/pull/27916

Test Plan:
Create a new app based on UIScene and integrate React Native.

| Before | After  |
|:------:|:------:|
 | <img width="453" alt="image" src="https://user-images.githubusercontent.com/4123478/73485717-eccfe800-43a3-11ea-96fd-f7077a348345.png"> | <img width="453" alt="image" src="https://user-images.githubusercontent.com/4123478/73485749-f9ecd700-43a3-11ea-8a18-2e2185e62e78.png"> |

Reviewed By: cpojer

Differential Revision: D20008608

Pulled By: hramos

fbshipit-source-id: ce59fd0b000d7dee51985a5533d9b5791687f592
2020-02-20 15:38:16 -08:00
Vojtech Novak 7f2a79f40b allow custom ripple radius on TouchableNativeFeedback (#28009)
Summary:
motivation: there are cases where one'd like to control the radius of the ripple effect that's present on TouchableNativeFeedback  - in my case, I want to make sure that both icons and text have the same ripple appearance, but that's currently not possible as far as I can tell.

Currently (afaik) the only way to set  (upper) ripple limits is by specifying width, height and border radius ( + `overflow: hidden`), and this works well for icons which can usually be bounded by a square, but not for text which can have rectangular shape.

This PR adds `rippleRadius` parameter to `SelectableBackground()`, `SelectableBackgroundBorderless()` and `Ripple()` static functions present on `TouchableNativeFeedback`. It can make the ripple smaller but also larger. The result looks like this:

added to RNTester:

![SVID_20200219_182027_1](https://user-images.githubusercontent.com/1566403/74858131-147ff380-5345-11ea-8a9e-2730b79eec38.gif)

difference from the other ripples:

![SVID_20200209_110918_1](https://user-images.githubusercontent.com/1566403/74109152-4513a080-4b81-11ea-8ec3-bb5862c57244.gif)

I'm ofc open to changing the api if needed, but I'm not sure there's much space for manoeuvring. While I was at it, I did a slight refactor of the class into several smaller, more focused methods.

It's possible that in some cases, this might help to work around this issue https://github.com/facebook/react-native/issues/6480.

## Changelog

[Android] [Added] - allow setting custom ripple radius on TouchableNativeFeedback
Pull Request resolved: https://github.com/facebook/react-native/pull/28009

Test Plan: I tested this locally using RNTester

Reviewed By: TheSavior

Differential Revision: D20004509

Pulled By: mdvacca

fbshipit-source-id: 10de1754d54c17878f36a3859705c1188f15c2a2
2020-02-20 15:29:07 -08:00
Tommy Nguyen de8fcfb4cb Address @octokit/rest deprecation warnings (#28050)
Summary:
Addresses deprecation warnings from `octokit/rest`. This is a follow up to https://github.com/facebook/react-native/issues/28019.

## Changelog

[Internal] [Fixed] - Address deprecation warnings from `octokit/rest`
Pull Request resolved: https://github.com/facebook/react-native/pull/28050

Test Plan: PRs should still get app bundle sizes report, but the warnings in the build logs should be gone.

Reviewed By: cpojer

Differential Revision: D20008805

Pulled By: hramos

fbshipit-source-id: 891d14fd9d55f217194a095d2736494416dacda2
2020-02-20 15:21:21 -08:00
Radek Czemerys 1c5938eae7 chore: tweak missing RCTAnimation warning message (#28139)
Summary:
As we don't link modules manually anymore it's better to point the user in another direction when they face this issue.

## Changelog

[Internal] [Changed] - tweak missing RCTAnimation warning message

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

Reviewed By: cpojer

Differential Revision: D20009264

Pulled By: hramos

fbshipit-source-id: 114cae4fe908186eab3d8d9e79c2016015406821
2020-02-20 14:44:31 -08:00
Sharon Gong aebf54aee4 Add localized accessibility strings to React Core pod (#27995)
Summary:
The accessibility roles and states description strings are not able to be localized on iOS platform. Those strings are exposed to the end users so it should be localized. This PR is to add localized strings as a resource bundle to the React Core Pod so that any React Native app integrating the React Native dependencies using CocoaPods can get the localized accessibility roles and states description.

## Changelog

[iOS] [Added] - Add localized accessibility strings to React Core pod
Pull Request resolved: https://github.com/facebook/react-native/pull/27995

Test Plan: Verified with RNTester app.

Differential Revision: D19975587

Pulled By: PeteTheHeat

fbshipit-source-id: f8eb4e25194f0cd603c98a6221ec87503a2826ed
2020-02-20 14:31:03 -08:00
Radek Pietruszewski 24e0bad8be Make JSCRuntime::createValue 35% faster (#27016)
Summary:
JSC does some sort of thread safety locking on every single JSC API call, which makes them ridiculously expensive for a large number of calls (such as when passing a large array over the RN bridge). It would be great if we could lock and unlock once for an entire sequence of JSC calls… but in the meantime, the less we call JSC the better.

![unknown](https://user-images.githubusercontent.com/183747/67624956-08bd6e00-f838-11e9-8f65-e077693f113d.png)

In my benchmark environment (https://github.com/Nozbe/WatermelonDB/pull/541), the time spent in JSCRuntime::createValue went down from 1.07s to 0.69s by changing JSValueIsXXXX calls to a single JSValueGetType call.

The underlying implementation does the same thing: https://github.com/WebKit/webkit/blob/master/Source/JavaScriptCore/API/JSValueRef.cpp#L58

## Changelog

[General] [Fixed] - Make JSCRuntime::createValue faster
Pull Request resolved: https://github.com/facebook/react-native/pull/27016

Reviewed By: RSNara

Differential Revision: D18769047

Pulled By: mhorowitz

fbshipit-source-id: 9d1ee28840303f7721e065c1b3c347e354cd7fef
2020-02-20 10:33:16 -08:00
Janette Cheng a793ed7598 Unbreak the build
Summary:
build-break
overriding_review_checks_triggers_an_audit_and_retroactive_review

fbshipit-source-id: 316b879368503114ea1af16276643301601bcca8
2020-02-20 08:30:46 -08:00
Rubén Norte ec3327b61a Fix AccessibilityInfo mock to always return a promise in isScreenReaderEnabled
Summary:
`AccessibilityInfo.isScreenReaderEnabled().then()` fails by default in tests because that function is mocked and it doesn't return a promise (the default return value is `undefined`). Returning `Promise.resolve(false)` is a good default in this case so it doesn't break any code relying on it.

Changelog: [General] [Fixed] - Fix `AccessibilityInfo.isScreenReaderEnabled` mock in Jest setup

Reviewed By: lunaleaps, motiz88

Differential Revision: D19972921

fbshipit-source-id: 3c8498d5aeeac54d1f5cf333ae39658e22c180a1
2020-02-20 06:43:09 -08:00
Tom Underhill dbe0d7d4b5 Add NativeColorType opaque type to normalizeColor() ahead of PlatformColor PR. (#28040)
Summary:
The [PlatformColor PR](https://github.com/facebook/react-native/pull/27908) is currently open to implement the [PlatformColor proposal](react-native-community/discussions-and-proposals#126).   When that PR was imported into Facebooks internal builds it was found that the change to the `processColor()` function to return an opaque type or `number` instead of just `number` breaks internal components.

This PR is a simplification of the PlatformColor PR only changing the return type of `processColor()` from `?number` to `?number | NativeColorType` where `NativeColorType` is just an empty but opaque type.   This will allow changes to be made to these internal components but with less risk than the larger PR.

## Changelog

[General] [Changed] - Add NativeColorType opaque type to normalizeColor() ahead of PlatformColor PR
Pull Request resolved: https://github.com/facebook/react-native/pull/28040

Test Plan: Flow checks, Jest test, iOS unit tests, iOS integration tests, and manual testing performed on RNTester for iOS and Android.

Differential Revision: D19860205

Pulled By: TheSavior

fbshipit-source-id: 799662c6621d3974158b375ccccfa136982c43b4
2020-02-19 19:33:27 -08:00
Rick Hanlon 372771dc8c Remove LogBox.ignoreWarnings
Summary:
This method isn't necessary for the migration to LogBox because we have a YellowBoxDeprecated module instructing users to use LogBox.ignoreLogs (so no old code should be calling LogBox.ignoreWarnings).

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D19950302

fbshipit-source-id: 4850884e770f812273978b9a205f5b914e5a9d2f
2020-02-19 18:01:43 -08:00
Rick Hanlon d66169b4fc Deprecate YellowBox and unstable_enableLogBox
Summary:
This diff replaces YellowBox with YellowBoxDeprecated, adding warnings for using the module directly instead of YellowBox. Also adds a no-op message for unstable_enableLogBox.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D19949700

fbshipit-source-id: 269c341a2cedcdb2f7a80947d3239db078238201
2020-02-19 18:01:43 -08:00
Rick Hanlon a83ea6ab8c Switch to LogBox completely
Summary:
This diff replaces YellowBox with LogBox so that it can be deprecated and removed.

After this diff, it will no longer be possible to go back to YellowBox and all paths referencing it will be gone.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D19949695

fbshipit-source-id: 28a55866e514020bdcc6854aae565cffbbe8af58
2020-02-19 18:01:43 -08:00
Eli White da9364fa3e Switch iOS focus/blur calls to use new commands
Summary:
Make iOS use Commands instead of UIManager.{focus,blur}. This makes these apis compatible with Fabric and paper at the same time.

Changelog:
[Internal] Switch iOS focus/blur calls to use new commands

Reviewed By: mdvacca

Differential Revision: D19458995

fbshipit-source-id: 8c4aacd41941f54a887aeec1a17d9ce0b6878ab1
2020-02-19 15:29:00 -08:00
Eli White 147055466a Switch Android focus/blur calls to use new commands
Summary:
This makes Android dispatch focus/blur through the Fabric view manager when running in Fabric.

Changelog:
[Internal] Switch Android focus/blur calls to use new commands

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D19458362

fbshipit-source-id: 23e1d989ec55bc8abff4279e259f4b6c953ac0a3
2020-02-19 15:29:00 -08:00
Eli White 6286270e4c Migrate TextInputState to take a ref instead of a reactTag
Summary:
Changelog:
[General][Breaking] Multiple deprecations and breaking changes to TextInputState. Use native component refs instead of react tags

Reviewed By: JoshuaGross

Differential Revision: D19458214

fbshipit-source-id: f67649657fa44b6c707a0ac91f07d2ceb433bc70
2020-02-19 15:28:59 -08:00
Eli White 862c71908c Partial React Sync from 241c4467...ad84625f8
Summary:
Test sync of https://github.com/facebook/react/pull/18068

- **[ad84625f8](https://github.com/facebook/react/commit/ad84625f8 )**: [Native] Migrate focus/blur to call TextInputState with the host component (#18068) //<Eli White>//
- **[edab5c074](https://github.com/facebook/react/commit/edab5c074 )**: Re-throw errors thrown by the renderer at the root in the complete phase (#18029) //<Andrew Clark>//
- **[a6dfe9aa4](https://github.com/facebook/react/commit/a6dfe9aa4 )**: [Native] Delete NativeComponent and NativeMethodsMixin (#18036) //<Eli White>//

Changelog:
[Changed][General] Partial React Sync from 241c4467...ad84625f8

Reviewed By: mdvacca

Differential Revision: D19459322

fbshipit-source-id: daefcf854e3da1c849f8376671065c53a1319ef9
2020-02-19 15:28:59 -08:00
Eli White 3b813cade1 Enable target as instance experiment
Summary:
This diff is just here to make it easier for me to work on the stack. It needs to be ripped out of the stack before landing

Changelog:
[Breaking][General] The `target` field of events is now a native component, not a react tag

Reviewed By: mdvacca

Differential Revision: D19458361

fbshipit-source-id: 1d03a58553cf96dc72f6d1323dfb37b1a8cdca75
2020-02-19 15:28:58 -08:00
Eloy Durán 4118d79826 Rename autolinking-ios.rb script and bring RNTester and template in line. (#28077)
Summary:
Make the script ready for picking in 0.62.0-rc.3.

* Rename the script to remove ambiguity. “autolinking” is a CLI feature where 3rd-party pods are automatically discovered: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
* Make the Flipper version of the pods configurable, as requested [here](https://github.com/facebook/react-native/pull/28044#discussion_r378662636).
* Make RNTester’s Podfile use the same form as the template–including enabling Flipper by moving the CPP define into the right place in the Xcode project and out of the Podfile.
* Get rid of Podfile.lock thrashing by making the default CDN spec source explicit.

## Changelog

[iOS] [Changed] - Disambiguate autolinking-ios.rb script from CLI’s “autolinking” feature and bring RNTester & template in line.
Pull Request resolved: https://github.com/facebook/react-native/pull/28077

Test Plan: RNTester builds, as does a new application.

Reviewed By: PeteTheHeat

Differential Revision: D19956392

Pulled By: TheSavior

fbshipit-source-id: 6c800ddb646b49fc45c088978e2794cd7b60ea48
2020-02-19 15:19:26 -08:00
Samuel Susla 60c15073bf Fix crash in state reconciliation
Summary:
Changelog: [internal]

Repro steps:

1. Go to fbsource/fbobjc.
2. Run following focus command P124860753.
3. Enable Address Sanitizer in Xcode.
3. Run the app from Xcode.
5. Make sure `react_fabric.enable_marketplace_home_ios` and `react_fabric.enabled_state_reconciliation_ios` Mobile Config flags are set to true.
6. Navigate to Marketplace Home and observe use of freed memory exception. You have to wait until second page of marketplace home feed is loaded.

{F228880980}

# Root cause

`ChangedShadowNodePairs` being a vector of pairs of references.
Those `shared_ptr` do not outlive the the run of `reconcileStateWithTree` (that's what I originally thought when I made them references).

This was introduced in D19814500.

Reviewed By: JoshuaGross

Differential Revision: D19977784

fbshipit-source-id: 8c4a381137baa08a6af9d3c1cb295fe6c2b2bf95
2020-02-19 14:31:22 -08:00
Frieder Bluemle d4d8887b50 Update Gradle Wrapper to 6.2 (#28112)
Summary:
Gradle Wrapper to 6.2

https://docs.gradle.org/6.2/release-notes.html

## Changelog

[Android] [Changed] - Update Gradle Wrapper to 6.2
Pull Request resolved: https://github.com/facebook/react-native/pull/28112

Test Plan: Build project

Differential Revision: D19973068

Pulled By: mdvacca

fbshipit-source-id: ec6b72048f671af7df26570872ce5148c9e42bb3
2020-02-19 09:09:58 -08:00
Samuel Susla 145151ef0f Fix ignored initial value of TextInput
Summary: Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D19922731

fbshipit-source-id: b06f1d98d97a4ea46c60e07a89452ee77acded8d
2020-02-19 07:03:22 -08:00
Jason Safaiyeh 0e4bcaa296 Resolve localization warnings (#28046)
Summary:
Resolve Xcode localization warnings in template

## Changelog

[iOS] [Fixed] - Resolve localization warnings
Pull Request resolved: https://github.com/facebook/react-native/pull/28046

Test Plan: Create a fresh template app, localization warnings should not happen.

Differential Revision: D19873686

Pulled By: hramos

fbshipit-source-id: 5db0e7da1048899c4049fe991bc354a6798dfb06
2020-02-18 21:44:16 -08:00
Venits e99800267b - Remove leftover `Incremental` component (#28107)
Summary:
1/4 of https://github.com/facebook/react-native/issues/28103

## Changelog

[JavaScript][Removed] - Remove leftover `Incremental` component.
Pull Request resolved: https://github.com/facebook/react-native/pull/28107

Test Plan: In RNTester `Incremental` component is no longer used so I modified one of existing examples to use it.

Reviewed By: rickhanlonii

Differential Revision: D19960536

Pulled By: TheSavior

fbshipit-source-id: 791bda7138ac23916957577ed5f5c465c5e96299
2020-02-18 20:44:43 -08:00
Eli White 010c9241cb Partial React Sync from 241c4467..edab5c074
Summary:
- **[edab5c074](https://github.com/facebook/react/commit/edab5c074 )**: Re-throw errors thrown by the renderer at the root in the complete phase (#18029) //<Andrew Clark>//

Changelog:
[General][Changed] Partial React Sync from 241c4467..edab5c074

Reviewed By: mdvacca, gaearon

Differential Revision: D19961765

fbshipit-source-id: d4a84a4076da332db76d66ddd7250eaea375f8ff
2020-02-18 19:03:18 -08:00
Samuel Susla aa0a50c518 Introducing RCTBlockingImageManager, an image manager for tests in Fabric
Summary:
Changelog: [Internal]

This allows to block queue until image is fetched.

In paper, the photo of dog will not appear unless the network request is "fast enough".

{F228670428}

Reviewed By: shergin

Differential Revision: D19907906

fbshipit-source-id: 98d68abf1255388f9b97fb9da367d8f583a4220d
2020-02-18 16:51:00 -08:00
Jason Safaiyeh b53aeab10c Update AppVeyor Node versions (#27980)
Summary:
The current AppVeyor test is failing on node v8. Since v8 is no longer active (https://nodejs.org/en/about/releases/), updated to the current LTS versions.

## Changelog

[Internal] [Changed] - Changed AppVeyor Node test versions to 10 & 12
Pull Request resolved: https://github.com/facebook/react-native/pull/27980

Test Plan: Hopefully makes the tests green �

Differential Revision: D19873610

Pulled By: hramos

fbshipit-source-id: 6f42a6046a1c015d327b15dc9537d0c2bb27e978
2020-02-18 16:46:20 -08:00
Logan Daniels adf87dd7ed Implement requiresMainQueueSetup in RCTDevSettings.mm
Summary: Changelog: [Fixed] Implement requiresMainQueueSetup in RCTDevSettings

Reviewed By: PeteTheHeat, RSNara

Differential Revision: D19944271

fbshipit-source-id: 5163a5de2aab6ec2bb130589191a2b66d1b30c18
2020-02-18 13:59:28 -08:00
Eloy Durán a43fd60e18 Fix backgroundColor typing. (#28105)
Summary:
TextInput’s `InputAccessoryView` was using a [deprecated] prop-type as a Flow type, which TheSavior asked me to fix [here](6ba4b28a22 (r37343692)).

## Changelog

[iOS] [Fixed] - Fixes the `InputAccessoryView.backgroundColor` prop’s typing to use `ColorValue`.
Pull Request resolved: https://github.com/facebook/react-native/pull/28105

Test Plan:
Passes:

```bash
yarn flow-check-ios
```

Differential Revision: D19956401

Pulled By: TheSavior

fbshipit-source-id: 0c16f292b0143e83235a23712a0a7a11b8317f4e
2020-02-18 13:53:45 -08:00
Marc Horowitz 65d3167a80 If JSC fails to load when starting RN, expose that error to the caller
Summary:
See the comments for more info.

Changelog: [Android] [Changed] - Improve exception message when JSC loading fails

Reviewed By: tmikov

Differential Revision: D19917034

fbshipit-source-id: d846f542c31e9c94edcee240c2935d77d48d1f2a
2020-02-18 12:27:51 -08:00
Marc Horowitz ef021eac9c Add es6Proxy to RuntimeConfig
Summary:
Also clean up some unused items

Changelog: [Internal]

Reviewed By: willholen

Differential Revision: D19917035

fbshipit-source-id: dd5a0af135bdbdb7fb1a98475d99db1ec281eeba
2020-02-18 12:27:50 -08:00
Jesse Katsumata ad64979d7a Add links to issue template (#28079)
Summary:
I just stumbled upon [This PR](https://github.com/facebook/react/pull/18039) and thought it would be great for react-native repo to have the same.

This creates a link in issue template that will lead people who found error in the documentation to the appropriate repo, and people who has questions about react-native will be lead to the support page.

<img width="1034" alt="Screen Shot 2020-02-15 at 13 44 02" src="https://user-images.githubusercontent.com/6936373/74582027-ce9bf600-4ff9-11ea-9dc5-21601c4007c4.png">

## Changelog

[Internal] [Changed] - Add links to Issue template
Pull Request resolved: https://github.com/facebook/react-native/pull/28079

Test Plan: This pr does not contain any change in the functionality of react-native.

Differential Revision: D19954747

Pulled By: hramos

fbshipit-source-id: 7cce094e2519c0f508858a034f053d058d801f35
2020-02-18 12:17:54 -08:00
Emily Janzer d4a498aba2 Allow focusing TextInput when already focused
Summary:
Right now, `requestFocus()` is a no-op if the EditText view thinks it's already focused. In certain cases, though, we still want to focus the view even if it's already focused - for example, if TalkBack is enabled and you dismiss the keyboard, you want to be able to tap on the TextInput again to bring back the keyboard, even though the View never thinks it lost focus.

What I'm doing instead is basically disregarding the View's current focus state if we *would* focus the TextInput, which is in 3 circumstances:

- When the view is attached to a window, if autofocus is true
- When the focus is being requested by JS
- When the focus is being requested by an accessibility action from the OS

Changelog: [Android][Fixed] Change how TextInput responds to requestFocus to fix a11y focus issue

Reviewed By: mdvacca

Differential Revision: D19750312

fbshipit-source-id: 30b9fab40af4a083fa98f57aba7e586540238bea
2020-02-18 12:14:17 -08:00
Sidharth Guglani d8ff5a515b fix lint errors
Summary:
Changelog: [Internal][Yoga] Fixed lint errors

```arc lint --apply-patches --take CLANGFORMAT --paths-cmd 'hg files xplat/yoga'
```
Added .clang-tidy file

Reviewed By: zertosh

Differential Revision: D19948702

fbshipit-source-id: f77a16d6f2c532267597a84a9caded0aae68c3aa
2020-02-18 08:12:18 -08:00
Rick Hanlon 96f19a3d89 Replace YellowBox references with LogBox
Summary:
This diff replaces some YellowBox references with LogBox so we can remove it.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D19948126

fbshipit-source-id: b26ad1b78d86a8290f7e08396e4a8314fef7a9f3
2020-02-18 07:51:46 -08:00
Rick Hanlon af710ab177 Switch from YellowBox.ignoreWarnings to LogBox.ignoreLogs
Summary:
Migrates internal calls from ignoreWarnings to ignoreLogs so we can remove YellowBox.

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D19813781

fbshipit-source-id: 16c7b3f2cd38cba1901eccb4d5b9a2396a37ba1b
2020-02-18 06:19:46 -08:00
Rick Hanlon 3c4c2f27aa Migrate console.disableYellowBox to LogBox.ignoreAllLogs()
Summary:
Migrates internal usages of console.disableYellowBox to LogBox.ignoreAllLogs()

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D19813776

fbshipit-source-id: 8c78e64596b4ba2fe94ab838881cbff6cee43e5b
2020-02-18 06:19:45 -08:00
Rick Hanlon 87f1e22434 Deprecate console.disableYellowBox in favor of LogBox.ignoreAllLogs()
Summary:
We're replacing console.disableYellowBox (untyped, global hack, only warnings) with LogBox.ignoreAllLogs() (typed, local method, handles errors and warnings).

Changelog: [General] [Removed] Replace console.disableYellowBox with LogBox.ignoreAllLogs.

Reviewed By: TheSavior

Differential Revision: D19813775

fbshipit-source-id: ffd33ddbca0276a27d23b5b6023a15aef761934e
2020-02-18 06:19:45 -08:00
Rick Hanlon 799bf56f6f Export LogBox from React Native
Summary:
We need to export this so that users can call methods like:

```
LogBox.ignoreAllLogs();
LogBox.ignoreLogs([/whatever/]);
```

Changelog: [General] [Added] Export LogBox module

Reviewed By: TheSavior

Differential Revision: D19813773

fbshipit-source-id: 8c301c16247c5b9f4b23e8afaf6a9783b4b4c724
2020-02-18 06:19:45 -08:00
Rick Hanlon cb749f1c52 LogBox - Revert back to RedBox window strategy
Summary: This diff reverts the iOS LogBox module back to the UIWindow strategy used by Redbox.

Reviewed By: sammy-SC

Differential Revision: D19941390

fbshipit-source-id: 4aea09137ea9e8bfc166a733272647a79102bf35
2020-02-18 06:19:44 -08:00
Samuel Susla cebc2c9d3e Do not switch queues if not necessary
Summary:
Changelog: [Internal]

Switching queue here is not necessary if we are already on the main queue.

 This is important for Fabric SSTs, otherwise images are missing.

Reviewed By: shergin

Differential Revision: D19907908

fbshipit-source-id: 52e82484afc8e2f591d0c5cc126952990d992e96
2020-02-18 03:40:51 -08:00
Joshua Gross 5aae380f2d Differentiate between Fabric and non-Fabric UIManager logs
Summary:
Both the UIManagers use ReactConstants.TAG currently, so certain logs are ambiguous. Use FabricUIManager's tag instead for all logs to disambiguate.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D19945587

fbshipit-source-id: 0a9d62b5c0276688b2ad3acf8d893b523c26560a
2020-02-18 00:29:02 -08:00
Rick Hanlon 40646e8418 LogBox - Move images to files
Summary:
Moves the LogBox images from base64 data to files since base64 is not supported everywhere.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D19879323

fbshipit-source-id: 2dc03eebfc712ed863ed76322e133fcad5b00bb4
2020-02-17 08:17:08 -08:00
Spencer Ahrens 71b8ececf9 Add perf markers in XMLHttpRequest
Summary:
ChangeLog: [Both] Adds perf markers for `XMLHttpRequest`s

Makes it easier to see JS-based network operations in performance traces.

Reviewed By: zackargyle

Differential Revision: D19903143

fbshipit-source-id: c5ce60163569e003830d8079cb2b580469d5bd5d
2020-02-17 07:27:37 -08:00
Andrey Lunyov f3d37325cb Update relay ESLint plugin
Summary:
We've updated the version of plugin to 1.7.0 that includes similar fix to D19910353

## Changelog:

Changelog: [Internal]

Reviewed By: kassens

Differential Revision: D19912264

fbshipit-source-id: 973d4211bf56e33da427e01c9c561e15f7406ffb
2020-02-14 16:01:27 -08:00
Emily Janzer 8c493804f3 Fix TextInputTestCase
Summary:
https://github.com/facebook/react-native/pull/22166 removed inline styles from TextInputTestModule but applied the incorrect style to some of the TextInputs - instead of setting the text color, it set the margin. This caused the test to fail because no color was applied.

Changelog: [Android] [Fixed] Fixed style in TextInputTestCase

Reviewed By: zackargyle

Differential Revision: D19912362

fbshipit-source-id: d5068114b726ee7583842e5f6f323862b0c28e44
2020-02-14 15:03:58 -08:00
Eloy Durán a1b14deb3e Add androidx.swiperefreshlayout to template build.gradle (#28071)
Summary:
Same as rickhanlonii’s 2c89e51507, but for the application template.

## Changelog

Changelog: [Android] [Fixed] Template instacrash from missing androidx dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/28071

Test Plan: Apps build with the template from v0.62.0-rc.2 don’t instacrash.

Differential Revision: D19908895

Pulled By: mdvacca

fbshipit-source-id: 63337f4c0c0ffeb3b024682744610c7915e2b742
2020-02-14 12:22:14 -08:00