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

22626 Коммитов

Автор SHA1 Сообщение Дата
Rick Hanlon d2a6d88790 React Native sync for revisions 3169430...459c34f
Summary:
This sync includes the following changes:
- **[459c34fde](https://github.com/facebook/react/commit/459c34fde )**: Add flag concurrent root ([#21552](https://github.com/facebook/react/pull/21552)) //<Samuel Susla>//

Changelog:
[General][Changed] - React Native sync for revisions 3169430...459c34f

jest_e2e[run_all_tests]

Reviewed By: mdvacca

Differential Revision: D28641463

fbshipit-source-id: 0930a8f82e49b222582995e4c8b2c8a41564bf53
2021-05-24 17:58:40 -07:00
Rick Hanlon 1c5d0dc605 React Native sync for revisions b8fda6c...ebcec3c
Summary:
This sync includes the following changes:
- **[316943091](https://github.com/facebook/react/commit/316943091 )**: Make StrictMode double rendering flag static for FB/www ([#21517](https://github.com/facebook/react/pull/21517)) //<Brian Vaughn>//
- **[e0f89aa05](https://github.com/facebook/react/commit/e0f89aa05 )**: Clean up Scheduler forks ([#20915](https://github.com/facebook/react/pull/20915)) //<Ricky>//
- **[5890e0e69](https://github.com/facebook/react/commit/5890e0e69 )**: Remove data-reactroot from server rendering and hydration heuristic ([#20996](https://github.com/facebook/react/pull/20996)) //<Sebastian Markbåge>//
- **[46491dce9](https://github.com/facebook/react/commit/46491dce9 )**: [Bugfix] Prevent already-committed setState callback from firing again during a rebase ([#21498](https://github.com/facebook/react/pull/21498)) //<Andrew Clark>//
- **[b770f7500](https://github.com/facebook/react/commit/b770f7500 )**: lint-build: Infer format from artifact filename ([#21489](https://github.com/facebook/react/pull/21489)) //<Andrew Clark>//
- **[2bf4805e4](https://github.com/facebook/react/commit/2bf4805e4 )**: Update entry point exports ([#21488](https://github.com/facebook/react/pull/21488)) //<Brian Vaughn>//

Changelog:
[General][Changed] - React Native sync for revisions b8fda6c...ebcec3c

jest_e2e[run_all_tests]

Reviewed By: JoshuaGross

Differential Revision: D28572047

fbshipit-source-id: eb09c0358edb7fbf241333ea9c08724748906fea
2021-05-24 17:58:40 -07:00
Kudo Chien 341f061ce3 Upgrade jsc-android to 250230.2.1 (#31304)
Summary:
Upgrade jsc-android to latest stable version. Hopefully this should finally fix https://github.com/facebook/react-native/issues/25494.
Before Hermes totally replaced JSC, it should be worth to have this and make JSC stable

## Changelog

[Android] [Changed] - Upgrade jsc-android to 250230.2.1

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

Test Plan: Launch app with new jsc-android and see everything works fine.

Reviewed By: TheSavior

Differential Revision: D28630503

Pulled By: yungsters

fbshipit-source-id: 84510f91c81d4aaefe265d5492677ad6ff10e0fe
2021-05-24 15:06:07 -07:00
Andrei Shikov fed6ad5bad Pass correct action name in the props callback
Summary:
JS side expects the property name to be "actionName", and this change updates it to that.

Changelog:
[iOS][Fixed] - Use actionName in accessibility event callback

Reviewed By: JoshuaGross

Differential Revision: D28645999

fbshipit-source-id: 0e7a6c3e6c1b6c998f4b53fd89c744c84083dfb1
2021-05-24 14:25:55 -07:00
Joshua Gross 900fed576b Events: Remove default `getCoalescingKey` impls
Summary:
Event.java's default implementation of `getCoalescingKey` returns 0. Most overrides of getCoalescingKey just return 0. Delete them.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28650792

fbshipit-source-id: 374591fb4ba2305df934de412790b3397ca2fa1c
2021-05-24 13:41:19 -07:00
Andrei Shikov faaeb778df Parse accessibilityAction props into object
Summary:
Android was using rawProps received from JS, so no updates needed.
Updated iOS callsite to use the name of the action.

Changelog:
[General][Fixed] - Parse accessibilityAction props into object instead of string

Reviewed By: mdvacca

Differential Revision: D28614407

fbshipit-source-id: 209134f8fac65ca8516039e10ea502e57d52a7a7
2021-05-24 10:27:27 -07:00
CodemodService FBSourceClangFormatLinterBot dd9655503b Daily `arc lint --take CLANGFORMAT`
Reviewed By: zertosh

Differential Revision: D28634989

fbshipit-source-id: 9e6397bfc0c4059877643bea7dcda6c42a4f4133
2021-05-24 04:11:25 -07:00
Andrew Coates 7aeac4236f Move isColorMeaningful to platform specific code (#31557)
Summary:
`isColorMeaningful` is the only place in xplat code that currently uses `colorComponentsFromColor`, which assumes that a color is an RGBA value.  When implementing `PlatformColor` for windows, where colors might be complex patterns or effects, I'd like to keep the details of `SharedColor` isolated within `SharedColor`.  This change moves `isColorMeaningful` into `color.cpp`, where each platform can provide an implementation that takes into account its platform specific color capabilities.

See https://github.com/microsoft/react-native-windows/pull/7801 for an example of window's SharedColor which can be either an RGBA value, or a name of a native color/brush.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Changed] - Move isColorMeaningful to platform specific code

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

Test Plan: This shouldn't change any of the code, its just moving the existing function - normal CI/automation should be plenty of validation.

Reviewed By: JoshuaGross, sammy-SC

Differential Revision: D28557698

Pulled By: mdvacca

fbshipit-source-id: 2a94850fe9c5037598107e1307f4153cee6491fb
2021-05-22 23:24:14 -07:00
Samuel Susla ffa533a19d Add option to use unbatched queues only
Summary:
Changelog: [internal]

My suggestion is to simplify event dispatching to only two options, synchronous and asynchronous.

Why?
- Fabric has only been using one queue, `AsynchronousBatched`.
- Batching happens even on `AsynchronousUnbatched`. It just batches events until JS thread starts processing them instead of waiting for the main run loop.
- It will make it easier to reason about the code in the future once we start utilising different priorities for Concurrent Mode.

Reviewed By: JoshuaGross

Differential Revision: D28603472

fbshipit-source-id: 14e3a9c15a012c550dc16a044c31d722051a2bdc
2021-05-22 12:19:05 -07:00
Samuel Susla 4bec099f7e Add option to disable sending scroll events to Paper
Summary:
Changelog: [internal]

Originally added in D17814260 (ffc7ec992c) to make parallax effect work in Dating.

This diff hides it behind a flag so we can properly evaluate what's the cost of sending scroll events to Paper.

Reviewed By: JoshuaGross

Differential Revision: D28608283

fbshipit-source-id: fa4d8944ad6b5e767363e231942f13fec9d18cb5
2021-05-22 12:19:05 -07:00
Joshua Gross 0510821170 Replace EventDispatcherImpl with LockFreeEventDispatcherImpl
Summary:
EventDispatcherImpl uses synchronized blocks all over to make it thread-safe. I'm concerned about the perf implications of this and creating contention between JS and UI threads.

This is locked behind a feature flag.

Enabled only for Fabric in StaticViewConfig mode, and a feature flag, for now.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28591331

fbshipit-source-id: ea8f93a2e1343ce37fa78690dcb62fe03594120f
2021-05-21 17:22:41 -07:00
Ramanpreet Nara a2ab3fccd0 Migrate RCTNativeAnimatedTurboModule to initialize
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28595948

fbshipit-source-id: a12207f8e0c11e1e105225404450ff335242aba7
2021-05-21 14:49:51 -07:00
Ramanpreet Nara 8aa85241a4 Migrate RCTDevSettings to initialize
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28595955

fbshipit-source-id: e61c2d321826eafb60fdac820b76d0f7d100796a
2021-05-21 14:49:51 -07:00
Ramanpreet Nara ed86891d01 Migrate NativeModules to initialize
Summary:
This migrates all ObjC NativeModule setBridge: calls to the bridge compatible initialize: call. I filtered out ViewManagers.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28595520

fbshipit-source-id: b0e5dd681fb3563894f1aa3da1728f0c694f04bb
2021-05-21 14:49:51 -07:00
Sladyn Nunes 35dd86180b Fix/30842 - Add accessibilityState prop in slider (#31145)
Summary:
Accessibility service does not announce "selected" on accessibilityState = {selected: true} of the Button Component.
Issue link - https://github.com/facebook/react-native/issues/30956

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Added] - Add accessibilityState prop to Slider component

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

Test Plan:
Verified accessibility states are read by voiceover and talkback. Some state values aren't handled by iOS and have been identified.

Added snapshot tests to test accessibilityState.disabled = disabled values

`js1 test Slider-test`

Reviewed By: yungsters

Differential Revision: D28337723

Pulled By: lunaleaps

fbshipit-source-id: 72a54d8d9dcf1fafb9785c81da99f32a21f3df00
2021-05-21 13:35:56 -07:00
Joshua Selbo 0aa1aa6cc2 Convert remaining targets to wrapper
Summary: Changelog: [Internal]

Differential Revision: D28479823

fbshipit-source-id: 997c6ac137d85d22ee5052d69dae006a1a0a7aac
2021-05-21 12:47:26 -07:00
Joshua Gross cd4bebb6c6 Make sure that touch events have a SurfaceId only in Fabric
Summary:
Could fix some infrequent crashes in non-Fabric.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D28605773

fbshipit-source-id: 57555e013657e61cfb02b25d9fd14c9c15774e0e
2021-05-21 11:32:02 -07:00
Samuel Susla 118489f6e5 Make LeakChecker available on Android
Summary:
Changelog: [internal]

Extend LeakChecker so it is available on Android (or any other platform as it is completely in C++ now).

Reviewed By: JoshuaGross

Differential Revision: D28600243

fbshipit-source-id: c77a003e3ffc6171e61c998508c9f34f10bb65ca
2021-05-21 10:39:43 -07:00
Andres Suarez ffab8e3f46 Apply clang-format
Reviewed By: igorsugak

Differential Revision: D28477074

fbshipit-source-id: f15dfc45b9fb30c661ebe2899cd882676d0fdf2a
2021-05-20 21:24:25 -07:00
Ramanpreet Nara a657c2655f Call RCTInitializing initialize on TurboModules
Summary:
After D28435078, TurboModules can conform to the RCTInitializing protocol, and implement the `-(void)initialize` method. This diff makes the TurboModule system execute the module's initialize method after the infra is done setting it up.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28435429

fbshipit-source-id: fe945d616b97ed89f48b914b064e518b122a7b7b
2021-05-20 19:19:57 -07:00
Ramanpreet Nara 269fefb065 Call RCTInitializing initialize on NativeModules
Summary:
After D28435078, NativeModules can conform to the RCTInitializing protocol, and implement the `-(void)initialize` method. This diff makes the NativeModule system execute the module's initialize method after the infra is done setting it up.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28435430

fbshipit-source-id: 1ce00c3fb3c63b024d7e24895ff96c541a6fa654
2021-05-20 19:19:57 -07:00
Ramanpreet Nara 9b45df1fce Introduce RCTInitializing
Summary:
## Motivation
NativeModules need a way to execute custom initialization code. The current way to achieve this is by overriding the setBridge: method. This doesn't work in bridgeless mode, because in bridgeless mode, the TurboModule system doesn't (and shouldn't) invoke the setBridge: method.

## Changes
This diff introduces a new protocol RCTInitializing that NativeModules can conform to. Once they conform to this protocol, they can implement the `- (void)initialize;` method. Both the NativeModule and TurboModule infra will execute this method towards the end of NativeModule setup.

## Questions
Why don't we just override the NativeModule init method?
1. **Backwards compatibility:** The legacy NativeModule infra requires that [modules that override their init method](https://www.internalfb.com/code/fbsource/[8098212b4e3733f0b469f11f3e61c5249a47f9f5]/xplat/js/react-native-github/React/Base/RCTModuleData.mm?lines=82-83) [must be initialized on the main thread](https://www.internalfb.com/code/fbsource/[8098212b4e3733f0b469f11f3e61c5249a47f9f5]/xplat/js/react-native-github/React/Base/RCTModuleData.mm?lines=85). We ported this over [to the TurboModule system](https://www.internalfb.com/code/fbsource/[d58a07e9ae90951d382224c28cb78c32c7cda80d]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm?lines=684%2C686). *We cannot require all NativeModules that need custom initialization to be initialized on the main thread.*
2. **More flexibility:** A custom `- (void)initialize` hook can be invoked by the NativeModule infra after the NativeModule is prepared (i.e: the bridge, module registry, view registry, etc. is attached). The same isn't true of an overriden init method, which has to be invoked when the object is created. This means that a custom `- (void)initialize` hook can use the bridge/method queue, etc., but an overriden init method cannot.

What about Android?
- After this diff, NativeModules can implement the `initialize` method to initialize themselves, and the `invalidate` method to invalidate themselves. This unifies initialization/invalidation across both iOS and Android, because on Android, TurboModules can also implement the same methods:

https://www.internalfb.com/code/fbsource/[d58a07e9ae90951d382224c28cb78c32c7cda80d]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/TurboModule.java?lines=11-17

Changelog: [iOS][Added] - Introduce RCTInitializing to allow NativeModules to initialize themselves

Reviewed By: fkgozali

Differential Revision: D28435078

fbshipit-source-id: 1a4a95e30f0a8b32b0844e9b9beee274afcbb577
2021-05-20 19:19:57 -07:00
Tim Yung 883e0d5752 RN: Suppress Warning-Like Errors
Summary:
Changes `ExceptionsManager` in React Native so that errors with a `type` property equal to `'warn'` are not reported.

This change is banking on the fact that `type` is a non-standard and uncommon property on `Error` instances. If this ends up being problematic, we can instead change this to use a `unstable_type` or `unstable_level` property instead.

Changelog:
[General][Changed] - ExceptionsManager will no longer report exceptions with `type === 'warn'`.

Reviewed By: motiz88

Differential Revision: D28421692

fbshipit-source-id: 3ca19e29f32c8c5cad6dac637dcb930944fb24ed
2021-05-20 19:08:25 -07:00
Thibault Malbranche 59abb5f378 fix(hermes): fixed hermes build on iOS (#31559)
Summary:
While testing 0.65, we noticed issues with hermes on iOS in the template projects
These changes create a subspec to the react-core pod so that it can access hermes header correctly.

## Changelog

Not applicable

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

Test Plan: I've ran e2e manual test. Tested RNTester manually also. Then tested a project inited with hermes and the default template

Reviewed By: mhorowitz

Differential Revision: D28564642

Pulled By: Huxpro

fbshipit-source-id: cfcb3363254f62a0e514ec99159b32f841ee4463
2021-05-20 15:23:07 -07:00
Joshua Gross b161241db2 Proposed fix for ScrollView race condition between C++ state update and onScroll
Summary:
FlatList relies heavily on onScroll events + the measure API. In Fabric, usage of `measure` relies on C++ having an accurate view of the current scroll position of the ScrollView.

We already have a mechanism for updating the scroll position in C++ using UpdateState. But, it is only used currently at the /beginning/ and /end/ of scrolling, and UpdateState is not called /during/ scrolling at all.

This means that we will see a series of events like this while scrolling:

```
Scrolling begins
UPDATE C++ STATE: scrollLeft = 0, scrollTop = 0
JS event: onScroll x=0, y=0
JS event: onScroll x=0, y=100
JS event: onScroll x=0, y=200
...
JS event: onScroll x=0, y=1000
UPDATE C++ STATE: scrollLeft = 0, scrollTop = 1000
```

Notably, not many C++ state updates are queued; and the last one is queued AFTER the JS event is sent. The last JS event and UpdateState will race, which means that sometimes the C++ update will /lose/ and C++ will have an inaccurate view of the world when FlatList receives the onScroll event and calls `measure`.

My proposed solution, gated behind a feature flag, is to delay /some/ onScroll events until the C++ UpdateState has made its way back to Java, and send UpdateStates more frequently. The balance here is that UpdateState is a relatively expensive operation, so we probably still want to call it /less/ than we call onScroll. This means that `measure` will still return some incorrect results but will return correct results more frequently. Win?

Changelog: [Internal[

Reviewed By: mdvacca

Differential Revision: D28558380

fbshipit-source-id: 11c7cd714fae67ee5a94c4413be988481413ec03
2021-05-20 12:53:39 -07:00
Erich Graham fa4045e4dd Add ios_assume_nonnull flag to react native codegen library (#31543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/31543

Changelog:
[iOS][Added] - Description

When compiling iOS apps with flag `-Wnullability-completeness` (like Lightspeed app and soon Instagram), Objective-C headers are required to either have full *explicit* nullability annotations on all members of its public API, or none at all; partially annotated headers will fail to build that module.

RN native modules are currently generated with *partial* annotations.  This works today because most apps are not compiled with `-Wnullability-completeness` turned on. But when we flip the switch for Instagram, the app doesn't build due to importing these RN partially annotated modules.

JavsScript Flow types are implied nonnull, and the current RN codegen translates Flow's [maybe/optional](https://flow.org/en/docs/types/maybe/) type to Obj-C `_Nullable` annotation, and everything else without an explicit Obj-C annotation. However this creates a mismatch with the Obj-C type system, where the implied default is *unannotated*, which is handled differently from nonnull when built with the nullability compiler flags.

There is a simple Obj-C macro that automatically adds *explicit nonnull* annotations to all members in a header: `NS_ASSUME_NONNULL_BEGIN` / `NS_ASSUME_NONNULL_END`. If we add this to *all* RN-generated headers, however, we run into issues:
1) We may erroneously assume any previously-unannotated header was meant to be nonnull and cause future bugs
2) Another compiler flag (`-Wnullable-to-nonnull-conversion`) statically analyzes Obj-C implementation code to prevent us from ever passing null to one of these headers. Much existing Obj-C code will break here, and it's ambiguous if these are true or false positives because of the first point.

Instead, in this diff we add a new BUCK flag `ios_assume_nonnull` to let module authors opt into automatic nonnull for unannotated members so that Obj-C headers are generated correctly in alignment with Flow's type system. We can migrate all libraries individually as needed and eventually make this the RN native codegen default.

Reviewed By: RSNara

Differential Revision: D28396446

fbshipit-source-id: ad3a3a97ab19183df4ef504b1c3140596c8f69ca
2021-05-20 10:07:37 -07:00
Joshua Gross d670381fac Reduce FabricUIManager soft errors further
Summary:
Reduce soft error volume; see comments.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D28551214

fbshipit-source-id: 7e6aa1ee7cad812650bd6219d0cbe568c3cdd3de
2021-05-20 09:49:11 -07:00
Ramanpreet Nara b2ec89fdfc Fix react-native-oss-ios by bumping Xcode to 12.4.0 (#31554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/31554

## Changes
This diff bumps Xcode to 12.4.0 both internally, and in Circle CI.

- According to [Circle CI docs](https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions), their environments support Xcode 12.4.0.
- According to the [Apple Docs](https://developer.apple.com/support/xcode/), Xcode 12.4.0 matches iOS 14.4.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D28547839

fbshipit-source-id: c9edde6a5825ae597bf56225d1b017c3af0f52ae
2021-05-19 14:18:50 -07:00
Joshua Gross d393cc4814 Ship new differ on iOS
Summary:
While we are still waiting for Android results, we can safely ship this on iOS.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28542478

fbshipit-source-id: 2673cc4bea0edbc7e4211be7bfec9779205d721b
2021-05-19 13:04:43 -07:00
Tim Yung ede74e5936 RN: Cleanup `ExtendedError` Type
Summary:
Cleans up the `ExtendedError` internal type and moves it into a separate module instead of burying it in `parseErrorStack.js`.

Also, this resolves some unnecessary Flow type suppressions.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D28470299

fbshipit-source-id: 04093243f06f67f41567270ef9778f01c7549b05
2021-05-19 12:30:41 -07:00
Tim Yung 0dba0aff18 ExceptionsManager: Minor Code Cleanup
Summary:
Cleans up `reactConsoleErrorHandler` in `ExceptionsManager` using modern language features, and fixes a minor edge case with how warning-like errors are handled.

Changelog:
[General][Fixed] - Avoid downgrading `console.error` when passed warning-like objects.

Reviewed By: GijsWeterings

Differential Revision: D28418488

fbshipit-source-id: 394e8608c2c81c794c9a0fc155142dcfcfe1c661
2021-05-19 12:30:41 -07:00
Connor Tumbleson eeb8e5829e feat: add Android 12 BLUETOOTH_[CONNECT/SCAN] to PermissionsAndroid (#31488)
Summary:
This PR adds BLUETOOTH_CONNECT / BLUETOOTH_SCAN, which showed up in the latest Android 12 Preview build as new `dangerous` permissions requiring approval for them.

https://developer.android.com/reference/android/Manifest.permission.html#BLUETOOTH_CONNECT
https://developer.android.com/reference/android/Manifest.permission.html#BLUETOOTH_SCAN

## Changelog

[Android] [Changed] - Add BLUETOOTH_CONNECT and BLUETOOTH_SCAN to PermissionsAndroid

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

Test Plan:
```
PermissionsAndroid.BLUETOOTH_CONNECT === 'android.permission.BLUETOOTH_CONNECT'
PermissionsAndroid.BLUETOOTH_SCAN === 'android.permission.BLUETOOTH_SCAN'
```

Reviewed By: yungsters

Differential Revision: D28449023

Pulled By: mdvacca

fbshipit-source-id: 000fc31f5db2996d04a2a5ec7db7c71d0425f52a
2021-05-19 12:23:39 -07:00
Neil Dhar 2c5f68df46 Disable WITH_FBREMAP
Summary:
WITH_FBREMAP was an experiment that is no longer needed. Just disabling the flag for now, the code will be deleted in a separate commit.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28467996

fbshipit-source-id: cb7bc00ea0b9d6e82219dda5148ab29978ddc83d
2021-05-19 12:23:39 -07:00
Luna Wei ec2dc9e4f2 Fix TextInput-cursorPlacement test
Summary:
Changelog:
[Internal] -  In internal e2e testing, json.stringify is unstable and will occasionally re-order keys. Fix so it's consistent across tests

Reviewed By: kacieb

Differential Revision: D28397174

fbshipit-source-id: 0f2db697d245654c88c3dff3d083bc82890d4bc1
2021-05-18 18:19:24 -07:00
Shoaib Meenai 6b713f519f Avoid using std::unique_ptr with incomplete type
Summary:
It's not supported, and building with libc++ using its unstable ABI
exposes the issue. Include the header to get the complete type.

Changelog: [Internal]

Reviewed By: lanza, sammy-SC

Differential Revision: D28405500

fbshipit-source-id: 65e039a465d8d736eaecb89e82895889fd2379ca
2021-05-18 15:27:09 -07:00
Subramanya Chakravarthy ea609defe8 Disable TouchableOpacity when accessibility disabled is set (#31108)
Summary:
When using a screen reader the TouchableOpacity component disables click functionality.
Fixes Issue https://github.com/facebook/react-native/issues/30951

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Changed] - Message

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

Test Plan: Added Exmple to Accessibility

Reviewed By: yungsters

Differential Revision: D28334356

Pulled By: kacieb

fbshipit-source-id: 3a3e8efaf57272d2091392f6d7d3e0ba0f2a9adc
2021-05-18 13:35:21 -07:00
Thibault Malbranche cdd0256187 fix(cli): bump cli version to fix test e2e script (#31548)
Summary:
Bump the cli version as it caused an issue when running the e2e tests for the 0.65 release
It will fix an incorrect template path being generated and fail the test

## Changelog

Bumped react native cli ? Already in the changelog

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

Test Plan: This is just a yarn.lock update targeting the cli

Reviewed By: fkgozali

Differential Revision: D28513554

Pulled By: Huxpro

fbshipit-source-id: 2957cb9e0d994894c3ef10260ee6167f857bdeef
2021-05-18 13:13:04 -07:00
Samuel Susla e173bbe3bb Fix on demand mounting in RTL
Summary:
Changelog: [internal]

When calculating on demand views, RTL layout needs to be considered.

Reviewed By: JoshuaGross

Differential Revision: D28510293

fbshipit-source-id: 5e7b08fcc5c55fa1a978024a9bfedda705ce1702
2021-05-18 10:02:19 -07:00
Andrei Shikov 6844b8e0d4 Use Maven Central for fbjni artifact
Summary:
FBJNI version have been updated recently and the new version is available on Maven Central, so we can remove this exception.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28355443

fbshipit-source-id: 1b3d88b668fed12deb786d36672f07dc98709aa0
2021-05-17 16:45:36 -07:00
Ramanpreet Nara 24a7f4bf98 Move RCTDevLoadingView init off main thread
Summary:
When we initialize RCTDevLoadingView, we dispatch_sync to the main thread. There isn't anything in the NativeModule that requires us to initialize it on the main thread. So, this diff toggles requiresMainQueueSetup to NO. This should mitigate this prefetch-related deadlock: T90970812. Please read the task comments for the rationale.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28490715

fbshipit-source-id: 7efceb392ec9e0cabe7f7cd8867cf4b07f8fff19
2021-05-17 16:03:32 -07:00
Tim Yung ebc89bfb78 RN: Cleanup `ReactFiberErrorDialog`
Summary:
Minor cleanup of `ReactFiberErrorDialog` with no behavior changes.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D28423265

fbshipit-source-id: 796777ca2c26d6d7cfae956299786151c74e937f
2021-05-17 01:04:32 -07:00
David Vacca 0b371304aa Create ReactFeatureFlag to initialize MapBufferSo file during Fabric initialization
Summary:
This diff creates a ReactFeatureFlag to initialize MapBufferSo file during Fabric initialization.

This is necessary to be able to compare properly Mapbuffer vs ReadableNativeMap (because ReadableNativeMap c++ files is already included in the bridge so file)

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D28436044

fbshipit-source-id: 338e1bb72b5313dc29a309e1b0e979e7c8bd1c18
2021-05-14 12:55:24 -07:00
Ramanpreet Nara 73fbe80fc4 Delete RCTJSInvokerModule protocol
Summary:
This protocol is no longer necessary, because we introduced the bridgeless-compatible abstraction: RCTCallJSModuleMethod.

Changelog: [iOS][Removed] - Delete RCTCallJSModuleMethod protocol

Reviewed By: fkgozali

Differential Revision: D28395446

fbshipit-source-id: 0ad606ce7935b24bfbd6e0c2f35fbde480a8a6ff
2021-05-14 09:22:58 -07:00
Ramanpreet Nara 6c5ac8036e Bridgeless Mode: Migrate modules away from invokeJS
Summary:
This diff removes all synthesize invokeJS = _invokeJS calls, and instead funnels them through synthesize callableJSModules = _callableJSModules. Now, all these NativeModules shouldn't have different branching in bridgeless mode vs bridge mode.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28395445

fbshipit-source-id: 41a58d54c60be55e6bf5031e5417728f5eb6285c
2021-05-14 09:22:58 -07:00
Ramanpreet Nara 22ba277496 Attach RCTCallableJSModules to TurboModules
Summary:
This diff has the bridge attach RCTCallableJSModules to our TurboModules.

Changelog: [Internal]

Differential Revision: D28395450

fbshipit-source-id: 6861e56f7fa0c009cded41f80b569de57a383e83
2021-05-14 09:22:58 -07:00
Ramanpreet Nara 478365079b Attach RCTCallableJSModules to NativeModules
Summary:
This diff has the bridge attach RCTCallableJSModules to our NativeModules.

Changelog: [Internal]

Differential Revision: D28395447

fbshipit-source-id: 01ca62442013826d28ba0f710e28a5963f5efb65
2021-05-14 09:22:58 -07:00
Ramanpreet Nara ece373d244 Introduce RCTCallableJSModules
Summary:
This is a Bridgeless-compatible API to allow our NativeModules to call JSModule methods.

Changelog: [iOS][Added] - Introduce RCTCallableJSModules API for NativeModules

Differential Revision: D28395448

fbshipit-source-id: b7929ba8b4cc4410361961b45efa23c76baacd24
2021-05-14 09:22:58 -07:00
Rubén Norte c6d77a8570 Make some modules flow strict
Summary:
TSIA

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28412774

fbshipit-source-id: 899a78e573bb49633690275052d5e7cb069327fb
2021-05-14 04:23:21 -07:00
Tim Yung 7c6993d9f9 RNTester: Add Animated Loop Example
Summary:
Creates a new `Animated.loop` example in RNTester that uses the native driver.

This example shows the precise problem fixed by facebook/react-native#29585 (D28383538 (129180c77b)).

Changelog:
[Internal]

Reviewed By: kacieb

Differential Revision: D28406914

fbshipit-source-id: 63ea7799d4b8bef8b0c1caaa3daf514ca04b7ab1
2021-05-13 16:31:10 -07:00
Samuel Susla ca499a6197 Group public and private methods in RuntimeScheduler
Summary:
Changelog: [internal]

Only moves methods around so public and private methods are grouped together.

Reviewed By: JoshuaGross

Differential Revision: D28381588

fbshipit-source-id: dae7f493b99845f66070689270bc7aef958fbecd
2021-05-13 08:03:29 -07:00