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

6976 Коммитов

Автор SHA1 Сообщение Дата
Joshua Gross bd2d0b28bd Patch loophole that caused some Animated instructions to be executed out of order
Summary:
This patches a loophole in the logic that caused some operations to execute immediately and some to be deferred, even within the same render loop. This caused the non-queued operations to be executed out of order. Instead, if an operation is created and a queued exists, we just push the operation to the end of the queue so ordering is preserved.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D36379125

fbshipit-source-id: d9f63f4d47d8453d51add61763b7b9c74ffe9d88
2022-05-13 13:32:02 -07:00
Tommy Nguyen 494b73cb33 fix: remove unactionable warning when on 'Paper' (#33830)
Summary:
We are currently seeing warning `Native Component 'X' that calls codegenNativeComponent was not code generated at build time. Please check its definition.` even though we have not opted into Fabric. This warning is not actionable and is just noisy.

See also discussion: https://github.com/reactwg/react-native-releases/discussions/21#discussioncomment-2657180

## Changelog

[General] [Fixed] - Remove unactionable warning about `codegenNativeComponent` when on 'Paper'

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

Test Plan: n/a

Reviewed By: dmitryrykun

Differential Revision: D36377844

Pulled By: cortinico

fbshipit-source-id: 23c9f9dbf0ce1cea60c5dc8caa02d0dc53bd635d
2022-05-13 11:23:21 -07:00
Pieter De Baets 75fb346e74 Revert D36298399: Check queue size before starting Animated batch
Differential Revision:
D36298399 (55ee8ce0c4)

Original commit changeset: b43c07994ba2

Original Phabricator Diff: D36298399 (55ee8ce0c4)

fbshipit-source-id: 20989b3e22beb6f991aad44b89d96c2946d3e39b
2022-05-13 09:19:24 -07:00
Marshall Roch 309d705e6a Deploy 0.178.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D36356453

fbshipit-source-id: e56e4694d4e0811f760a3994a889b48f2ba8cffb
2022-05-12 20:06:24 -07:00
Pieter De Baets 55ee8ce0c4 Check queue size before starting Animated batch
Summary:
Small win: if the queue is empty we shouldn't start/stop the batch.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D36298399

fbshipit-source-id: b43c07994ba28b4c890fe52af4e81c265a3b8ac7
2022-05-12 05:49:01 -07:00
Deepak Jacob 2c5a966054 Remove babel plugins from jest preprocessor which are part of preset
Summary:
Changelog:
[Internal][Changed] - Remove babel plugins from jest preprocessor which are part of preset metro-react-native-babel-preset

Transformer metro-react-native-babel-transformer has preset metro-react-native-babel-preset which has necessary plugins to transpile the source. So we don’t need to pass it again in the preprocessor.

As part of the change, updated one test to use strict mode since metro-react-native-babel-preset has strictMode is set to false.

Reviewed By: motiz88

Differential Revision: D34868961

fbshipit-source-id: 71678f1ee6f1b5ebf9a0c6fd2d6444a61d7583ac
2022-05-12 03:48:24 -07:00
Genki Kondo 73ad6514cc Fix bounds calculation with initialScrollIndex
Summary:
Sometimes this._scrollMetrics.offset is 0 even after initial scroll is triggered, because the offset is updated only upon _onScroll, which may not have been called in time for the next computation of the render limits. Thus, there is a window of time where computeWindowedRenderLimits calculates undesired render limits as it uses the offset. This results in 2 extra rerenders of the VirtualizedList if an initial scroll offset is applied, as the render limits shifts from the expected bounds (calculated using initialScrollIndex), to the 0 offset bounds (calculated using computeWindowedRenderLimits due to offset = 0), back to the expected bounds (onScroll triggers recalculation of render limits via _updateCellsToRender).

This issue was introduced in https://www.internalfb.com/diff/D35503114 (c5c17985da)

We cannot rely on this._hasDoneInitialScroll to indicate that scrolling *actually* finished (specifically, that _onScroll was called). Instead, we want to recalculate the windowed render limits if any of the following hold:
- initialScrollIndex is undefined or is 0
- initialScrollIndex > 0 AND scrolling is complete
- initialScrollIndex > 0 AND the end of the list is visible (this handles the case where the list is shorter than the visible area) <- this is the case that https://www.internalfb.com/diff/D35503114 (c5c17985da) attempted to address

Changelog:
[Internal][Fixed] - Fix issue where VirtualizedList rerenders multiple times and flickers when initialScrollIndex is set

Reviewed By: JoshuaGross

Differential Revision: D36328891

fbshipit-source-id: aba26aa06b24f6976657dd1e9f95bb666f60d9a6
2022-05-12 00:47:11 -07:00
Christian Ruink f2e23215ca Adding missing prop for RN Android TextInput behavior
Summary:
An issue that popped up working on:
D36140890
There is already behavior implemented to set the TextInput caret/cursor color independently from the selection box color in Android.
However this handy prop, was not documented or added as one of the available props for the TextInput component.

Associated behavior can be found here:
https://www.internalfb.com/code/fbsource/[f116d651b2e8]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java?lines=512

## **Changelog**
[Android] - Add android-only prop documentation at the TextInput js level.

Reviewed By: genkikondo

Differential Revision: D36208656

fbshipit-source-id: a54a2646351d897e0d598d5e1979f2a0c443e9d6
2022-05-10 16:48:20 -07:00
Genki Kondo 92cf74cd50 Fix render limit calculations by setting default zoomScale to 1
Summary:
During debugging of undesired behavior using VirtualizedList with initialScrollIndex, it was found that zoomScale was sometimes undefined, which resulted in elementsThatOverlapOffsets returning not being able to find the frame at the given offsets.

This does not cause any unexpected behavior when scrolling from the top, as the first item index in VirtualizedList is always calculated to be 0; however, when we set initialScrollIndex, the frame calculations are incorrect, resulting in wasteful re-renders of the VirtualizedList as it renders every frame (row) from the top.

Changelog:
[Internal][Fixed] - Default zoomScale to 1 for computeWindowedRenderLimits and elementsThatOverlapOffsets in order to fix render limit calculation.

Differential Revision: D36294426

fbshipit-source-id: 1e1abec1c95f58a1913bafa2c9680e51e2dc26fa
2022-05-10 16:21:59 -07:00
Genki Kondo 7c581f3d30 Move ScrollView's contentOffset to common props
Summary:
ScrollView's contentOffset prop was assumed to be iOS only, but in reality it is supported on Android as well: https://fburl.com/code/nuxpjpth

Changelog:
[General] - Move ScrollView's contentOffset to common props

Reviewed By: yungsters

Differential Revision: D36219604

fbshipit-source-id: f41679fd2ce7971a30129e0d91ae9f32b9cf756e
2022-05-09 13:05:16 -07:00
Sam Zhou 23a160ebf6 Lock down constrain writes in some directories
Summary: Changelog: [internal]

Reviewed By: gkz

Differential Revision: D36214426

fbshipit-source-id: 8498ef0f646d8a38e5d523f4fd2deacf1b649fd2
2022-05-06 15:53:13 -07:00
Evan Yeung 73a43901b4 Deploy 0.177.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D36141544

fbshipit-source-id: 7e322faa6f902547bb68997d02a50352c525d543
2022-05-06 10:51:36 -07:00
islandryu 13a72e0ccc Fix items disappear when zooming VirtualizedList (#33765)
Summary:
fix https://github.com/facebook/react-native/issues/33705
Fixed the disappearance of items when scrolling after zooming VirtualizedList.
example https://github.com/islandryu/zoomVirtualizedList

Before modification

https://user-images.githubusercontent.com/65934663/166849127-9fc3ba84-5172-4ae1-bd44-dd6312f283ec.mov

After modification

https://user-images.githubusercontent.com/65934663/166868632-2f78e118-f705-442d-b94e-ff165bed26c7.mov

## 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] [Fixed] - Fixed the disappearance of items when scrolling after zooming VirtualizedList.

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

Test Plan:
Make the VirtualizedList zoomable with a prop such as maximumZoomScale.
Apply the patch and make sure that items in the VirtualizedList do not disappear when you scroll after zooming the VirtualizedList.

Or apply the patch from this repository and check it.
https://github.com/islandryu/zoomVirtualizedList

Reviewed By: javache

Differential Revision: D36169686

Pulled By: yungsters

fbshipit-source-id: 0f86255c2864be13f6d2dc5a58af1d11c9eedac3
2022-05-06 09:30:15 -07:00
Rick Hanlon 93b50be8c2 Replace use-subscripton with use-sync-external-store (#33770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33770

React has replaced use-subscription with the React 18 compatible use-sync-external-store.

Changelog:
[General][Changed] - Replace use-subscripton with use-sync-external-store

Reviewed By: ryancat

Differential Revision: D35592432

fbshipit-source-id: cc2016f66940e53f3614e110bafb02240bae1ae4
2022-05-05 19:58:19 -07:00
Tim Yung 870755fa7e RN: Delete `EventEmitter#removeSubscription`
Summary:
Deletes `EventEmitter#removeSubscription`, which has been deprecated since D27704279 (cb6cbd12f8).

Relatedly, the `removeListener` family of methods (which were deprecated ad the same time) were recently removed by D35549719 (2596b2f695).

Changelog:
[General][Removed] - Removed `EventEmitter.prototype.removeSubscription` method.

Reviewed By: christophpurrer

Differential Revision: D36171048

fbshipit-source-id: 2409d235d43049cddfe0a54bcc60e1f47d4185c5
2022-05-05 12:55:00 -07:00
Moti Zilberman 018d5cf985 Remove nonstandard Promise.prototype.done implementation
Summary:
Changelog:
[General][Breaking] - Remove nonstandard Promise.prototype.done

`Promise.prototype.done` has been deprecated since D34222667 (35800962c1). Here we remove it from React Native's default Promise polyfill. Users should switch to using standard Promise features like `.then()`, or install their own custom polyfills for advanced use cases.

Reviewed By: kodafb

Differential Revision: D36001688

fbshipit-source-id: 37f452000c16279280ef6a50b2ce616776377c4e
2022-05-05 03:55:10 -07:00
George Zahariev 20d9d3aa6a Fixes to non-product code (e.g React Native)
Summary:
We are working on making the empty object literal `{}` have the type `{}` - i.e. exact empty object - rather than being unsealed.

Some manual fixes, in particular to React Native code, which is used and can be synced to other repos (e.g. WWW).

With these changes, error diff in Xplat is down to ~1990 errors

Note that after I roll out `exact_empty_objects`, I'll codemod all the `{...null}` (the only way to get an exact empty object currently) back to `{}`

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D36142838

fbshipit-source-id: 054caf370db230f42a4c5f5706c88979ef246537
2022-05-04 16:13:07 -07:00
Matin Zadeh Dolatabad 2596b2f695 fix: remove deprecated removeListener methods (#33580)
Summary:
Remove old deprecated modules that cause annoying warnings. This can be a breaking change for some third-party modules.

## Changelog

[General] [Removed] - Remove deprecated removeListener methods

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

Test Plan: See `flow-check` and `build-arvr-js-flow` succeed in Sandcastle.

Reviewed By: cortinico

Differential Revision: D35549719

Pulled By: yungsters

fbshipit-source-id: 0495e36de19db434362d5de56463d9c1ad6edd73
2022-05-04 11:32:51 -07:00
George Zahariev e7d9e4dbb5 Collapse object initialization in Xplat
Summary:
Collapse multiline object initialization into one single object literal (as much as possible).

Run codemod (requires temporary xplat task runner config changes), then manual fixes.

```
./scripts/typedjs/flow/runner codemod lti/collapseObjectInitialization ~/fbsource/xplat/js/
```

- Announcement: [post](https://fb.workplace.com/groups/flowlang/posts/903386663600331)
- Support group: [Flow Support](https://fb.workplace.com/groups/flow)

drop-conflicts

Format:
```
arc f
```
Sort imports
```
hg l -n | xargs js1 lint --fix --rule 'fb-tools/sort-requires'
```

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D36112168

fbshipit-source-id: 23db87c3bd8ffe693019ffeb5ac8300ec46c8532
2022-05-03 21:55:01 -07:00
George Zahariev 0337a2981d Add annotations to empty objects that look like indexers in Xplat
Summary:
We are working on making the empty object literal `{}` have the type `{}` - i.e. exact empty object - rather than being unsealed.
Making this change exposes a variety of errors. We can prevent these errors by annotating what we want the type of the empty object to be.

Reduces Xplat error diff to 2.3k

- Announcement: [post](https://fb.workplace.com/groups/flowlang/posts/903386663600331)
- Support group: [Flow Support](https://fb.workplace.com/groups/flow)

drop-conflicts

Format:
```
arc f
```
Sort imports
```
hg l -n | xargs js1 lint --fix --rule 'fb-tools/sort-requires'
```

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D36086696

fbshipit-source-id: 90447279f2e6e38f44189b74ec0297719f7adf58
2022-05-03 19:59:28 -07:00
Kevin Gozali ab43358da7 iOS: Introduced ReactNativeRuntimeDiagnostics for various runtime validation mechanism
Summary:
With the new architecture, this diagnostic utility will be helpful to ensure stronger validation of various corner cases at runtime, like handling an early JavaScript exception when loading React Native.

If `global.RN$DiagnosticFlags` is set to a string of comma-separated flags, the util functions will be able to perform additional diagnostics. For now, the accepted flags are:
- `early_js_errors`
- `all`

This is still experimental and may change frequently.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D36088407

fbshipit-source-id: 9059d2d081b0f41d049310fb09650416b333ff57
2022-05-03 18:11:35 -07:00
Sam Zhou c8550bb5fa Add annotations to unannotated variable declarations [manually-modified]
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D36085338

fbshipit-source-id: 34d421ad3fd4595c13e7a45256666112f8607fbe
2022-05-03 13:50:45 -07:00
Moti Zilberman 598c2e02fd Use Flow type inference for interpolation outputRange
Summary:
Changelog:
[Internal]

Cleans up unnecessary type casts / suppressions throughout the codebase following D35869725.

Reviewed By: javache

Differential Revision: D35870027

fbshipit-source-id: eefcb544b19ba93587011cdfd4046d18dddb246e
2022-05-03 12:04:02 -07:00
Moti Zilberman 7b86fa2b79 Distinguish between string/number-valued interpolation nodes at the type level
Summary:
Changelog:
[General][Fixed] - Improved Flow type inference in Animated `.interpolate()`

Improves the ergonomics of `.interpolate()` by allowing Flow to infer the correct type for `outputRange`. This is achieved by adding a new type parameter `OutputT` to `interpolate()` (and `Animated.Interpolation` and `InterpolationConfigType`), which Flow infers as either `number` or `string` based on usage.

Admittedly, at the call site, this is not that much safer compared to something like `outputRange: $ReadOnlyArray<number | string>`, but it does document the intent of the API a bit better and provide some downstream type safety. For example, we can now express `Animated.Number` (D35869375) more precisely by excluding string-valued interpolation nodes.

Reviewed By: javache

Differential Revision: D35869725

fbshipit-source-id: e03ec22e9b3368ee196b392af011062ac99d8bb9
2022-05-03 12:04:02 -07:00
Moti Zilberman 9eb7629ac6 Add Animated.Numeric Flow type
Summary:
Changelog: [General][Added] - Add `Animated.Numeric` Flow type

Adds a Flow type to represent the various Animated node types that evaluate to numeric values and can be `interpolate()`d.

I'm including `AnimatedInterpolation` as "numeric" here even though it can technically evaluate either to a number or to a string, depending on its config. Note that calling `interpolate()` on a string-valued `AnimatedInterpolation` is a runtime error.

In a future diff, I'm planning to add a type argument to `AnimatedInterpolation` (and its config type), at which point we can refine `Animated.Numeric` to correctly include only `AnimatedInterpolation<number>`.

Reviewed By: javache

Differential Revision: D35869375

fbshipit-source-id: 2ff6754f1a5abc68c9da2c6836872c2022b25676
2022-05-03 12:04:02 -07:00
Paige Sun a0a45dcaba Minor comment on how to migrate UIManager.sendAccessibilityEvent
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D36086114

fbshipit-source-id: 70a05adffea0576731ccf62154a00785e8aceecd
2022-05-02 20:31:31 -07:00
George Zahariev d992ae0448 Codemod `Object.assign` with object literal first argument to object spread in Xplat
Summary:
Codemod `Object.assign` with object literal first argument (e.g. `Object.assign({}, foo)`) to object spread.

This adds several suppressions for exposed errors. The codemod produces errors as `Object.assign` is more unsafe than object spread. For example, `Object.assign` doesn't handle indexers, nor does it handle inexact objects properly, and when the (currently unsealed) empty object is supplied as the first argument, it also leads to unsafe behaviour:
https://flow.org/try/#0FAehAIGJwSQOwCYFMAeSBOBnYyDGAbAQ3SXADdjwBbQgBwC5wBvAbUwBd0BLOAcwF1GHbnwC+AbmDAAFAHkARgCskudgDpCmTF15xpTQowCMogDTU6ASkbyA9rfxJCcS+PBhwAfm8ymwcAGG4Eam-gFqETS0oaKu7hAAyrQkhAjgGOi2WOCa6Si0KuxICFIe0PCohKo5AGZF6HlV7DgqRCTklDyVqowGQpw8vOYRahJSCsqqGlo6en3gAEQAFlwL5vLGZuBdKE1xHjtN4Li2AK74abZkGVzI4AAG8vfgUvphOYzLq6EB4BvBP3CEUOqhi+0SyScaQyWUwOThqAKqmKpQg0AAqnBME5HGkalwsOwcuheDIJoVptpdPotvMTNZmDV7Iw4KcqPIMLE3B5vN4gA

The codemod is safe to do, despite some Flow errors, as `Object.assign` and object spread are equivalent at runtime, with the exception that `Object.assign` triggers setters on the target object. However the codemod [does not run](938dbdd6c3/lib/rules/prefer-object-spread.js (L283-L285)) if the first argument (object literal) has getters/setters, so we are fine.

```
ag -l 'Object.assign\(' | xargs ag -l 'flow' | xargs js1 lint --rule '{"prefer-object-spread":2}' --fix
```
Some manual fixes
```
arc f
```

Reviewed By: SamChou19815

Differential Revision: D36023786

fbshipit-source-id: b682562e670410acf4175ba59ab285c7bdcfe052
2022-04-28 19:40:55 -07:00
Sam Zhou 0c4c6ca319 Add annotations to unannotated variable declarations [manually-modified]
Reviewed By: panagosg7

Differential Revision: D35948108

fbshipit-source-id: 7d286c9dd66dbd25281e2d831691f8bb34504b5d
2022-04-27 19:15:55 -07:00
Rick Hanlon 1a3eaa5dbf React Native sync for revisions 60e63b9...bd4784c
Summary:
This sync includes the following changes:
- **[bd4784c8f](https://github.com/facebook/react/commit/bd4784c8f )**: Revert #24236 (Don't recreate the same fallback on the client if hydrating suspends) ([#24434](https://github.com/facebook/react/pull/24434)) //<dan>//
- **[6d3b6d0f4](https://github.com/facebook/react/commit/6d3b6d0f4 )**: forwardRef et al shouldn't affect if props reused ([#24421](https://github.com/facebook/react/pull/24421)) //<Andrew Clark>//
- **[bd0813766](https://github.com/facebook/react/commit/bd0813766 )**: Fix: useDeferredValue should reuse previous value ([#24413](https://github.com/facebook/react/pull/24413)) //<Andrew Clark>//
- **[9ae80d6a2](https://github.com/facebook/react/commit/9ae80d6a2 )**: Suppress hydration warnings when a preceding sibling suspends ([#24404](https://github.com/facebook/react/pull/24404)) //<Josh Story>//
- **[0dc4e6663](https://github.com/facebook/react/commit/0dc4e6663 )**: Land enableClientRenderFallbackOnHydrationMismatch ([#24410](https://github.com/facebook/react/pull/24410)) //<Andrew Clark>//
- **[354772952](https://github.com/facebook/react/commit/354772952 )**: Land enableSelectiveHydration flag ([#24406](https://github.com/facebook/react/pull/24406)) //<Andrew Clark>//
- **[392808a1f](https://github.com/facebook/react/commit/392808a1f )**: Land enableClientRenderFallbackOnTextMismatch flag ([#24405](https://github.com/facebook/react/pull/24405)) //<Andrew Clark>//
- **[1e748b452](https://github.com/facebook/react/commit/1e748b452 )**: Land enableLazyElements flag ([#24407](https://github.com/facebook/react/pull/24407)) //<Andrew Clark>//
- **[4175f0593](https://github.com/facebook/react/commit/4175f0593 )**: Temporarily feature flag numeric fallback for symbols ([#24401](https://github.com/facebook/react/pull/24401)) //<Ricky>//
- **[a6d53f346](https://github.com/facebook/react/commit/a6d53f346 )**: Revert "Clean up Selective Hydration / Event Replay flag ([#24156](https://github.com/facebook/react/pull/24156))" ([#24402](https://github.com/facebook/react/pull/24402)) //<Ricky>//
- **[ab9cdd34f](https://github.com/facebook/react/commit/ab9cdd34f )**: Bugfix: In legacy mode, call suspended tree's unmount effects when it is deleted ([#24400](https://github.com/facebook/react/pull/24400)) //<Andrew Clark>//
- **[168da8d55](https://github.com/facebook/react/commit/168da8d55 )**: Fix typo that happened during rebasing //<Andrew Clark>//
- **[8bc527a4c](https://github.com/facebook/react/commit/8bc527a4c )**: Bugfix: Fix race condition between interleaved and non-interleaved updates ([#24353](https://github.com/facebook/react/pull/24353)) //<Andrew Clark>//
- **[f7cf077cc](https://github.com/facebook/react/commit/f7cf077cc )**: [Transition Tracing] Add Offscreen Queue ([#24341](https://github.com/facebook/react/pull/24341)) //<Luna Ruan>//
- **[4fc394bbe](https://github.com/facebook/react/commit/4fc394bbe )**: Fix suspense fallback throttling ([#24253](https://github.com/facebook/react/pull/24253)) //<sunderls>//
- **[80170a068](https://github.com/facebook/react/commit/80170a068 )**: Match bundle.name and match upper case entry points ([#24346](https://github.com/facebook/react/pull/24346)) //<Sebastian Markbåge>//
- **[fea6f8da6](https://github.com/facebook/react/commit/fea6f8da6 )**: [Transition Tracing] Add transition to OffscreenState and pendingSuspenseBoundaries to RootState ([#24340](https://github.com/facebook/react/pull/24340)) //<Luna Ruan>//
- **[8e2f9b086](https://github.com/facebook/react/commit/8e2f9b086 )**: move passive flag ([#24339](https://github.com/facebook/react/pull/24339)) //<Luna Ruan>//
- **[55a21ef7e](https://github.com/facebook/react/commit/55a21ef7e )**: fix pushTransition for transition tracing ([#24338](https://github.com/facebook/react/pull/24338)) //<Luna Ruan>//
- **[069d23bb7](https://github.com/facebook/react/commit/069d23bb7 )**:  [eslint-plugin-exhaustive-deps] Fix exhaustive deps check for unstable vars ([#24343](https://github.com/facebook/react/pull/24343)) //<Afzal Sayed>//
- **[4997515b9](https://github.com/facebook/react/commit/4997515b9 )**: Point useSubscription to useSyncExternalStore shim ([#24289](https://github.com/facebook/react/pull/24289)) //<dan>//
- **[01e2bff1d](https://github.com/facebook/react/commit/01e2bff1d )**: Remove unnecessary check ([#24332](https://github.com/facebook/react/pull/24332)) //<zhoulixiang>//
- **[d9a0f9e20](https://github.com/facebook/react/commit/d9a0f9e20 )**: Delete create-subscription folder ([#24288](https://github.com/facebook/react/pull/24288)) //<dan>//
- **[f993ffc51](https://github.com/facebook/react/commit/f993ffc51 )**: Fix infinite update loop that happens when an unmemoized value is passed to useDeferredValue ([#24247](https://github.com/facebook/react/pull/24247)) //<Andrew Clark>//
- **[fa5800226](https://github.com/facebook/react/commit/fa5800226 )**: [Fizz] Pipeable Stream Perf ([#24291](https://github.com/facebook/react/pull/24291)) //<Josh Story>//
- **[0568c0f8c](https://github.com/facebook/react/commit/0568c0f8c )**: Replace zero with NoLanes for consistency in FiberLane ([#24327](https://github.com/facebook/react/pull/24327)) //<Leo>//
- **[e0160d50c](https://github.com/facebook/react/commit/e0160d50c )**: add transition tracing transitions stack ([#24321](https://github.com/facebook/react/pull/24321)) //<Luna Ruan>//
- **[b0f13e5d3](https://github.com/facebook/react/commit/b0f13e5d3 )**: add pendingPassiveTransitions ([#24320](https://github.com/facebook/react/pull/24320)) //<Luna Ruan>//

Changelog:
[General][Changed] - React Native sync for revisions 60e63b9...bd4784c

jest_e2e[run_all_tests]

Reviewed By: kacieb

Differential Revision: D35899012

fbshipit-source-id: 86a885e336fca9f0efa80cd2b8ca040f2cb53853
2022-04-26 13:29:43 -07:00
Pieter De Baets ceb0a54608 Memoize VirtualizedListCellContextProvider
Summary:
When a FlatList is nested inside another FlatList, it may be re-rendered whenever the outer FlatList renders. Apply the same optimization we already had in `VirtualizedListContextProvider` to avoid changing the context object if no values have changed.

Changelog: [General][Changed] - Optimized VirtualizedList context when used with nested lists

Reviewed By: genkikondo

Differential Revision: D35905952

fbshipit-source-id: 695253c85db2043d22e208ad94ecc7daa1455055
2022-04-26 04:04:45 -07:00
Chaoshuai Lu d70d7fd0b3 Adopt UIGraphicsImageRenderer API
Summary:
Apple suggested to this new API on iOS 10+.

> // Any new bitmap drawing code is encouraged to use UIGraphicsImageRenderer in lieu of this API.

WWDC18 Reference: https://developer.apple.com/videos/play/wwdc2018/219/
> Use UIGraphicsImageRenderer to create and draw to an image buffer
Supports Wide Color, unlike UIGraphicsBeginImageContext()
Combine with UIImageView for efficient offscreen rendering

Per https://nshipster.com/image-resizing/#performance-benchmarks, the new API runs even faster than the C version, probably due to more smart context reuses/management.

Changelog:
[iOS][Changed] - Adopt UIGraphicsImageRenderer API

Reviewed By: philIip

Differential Revision: D35699584

fbshipit-source-id: 7a1e2109d5e121fb396c1014f4ed0a892211b0cc
2022-04-22 17:02:51 -07:00
Luna Wei 6958bbb28c Fix up lint errors under react-native-github (#33622)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33622

Changelog: [Internal] Clean up eslint errors

Reviewed By: yungsters

Differential Revision: D35599445

fbshipit-source-id: bbb9061a3cf9df32daacad9a9b44eba94d3ce48c
2022-04-22 16:25:25 -07:00
Antoine Doubovetzky c5c17985da Fix VirtualizedList with initialScrollIndex not rendering all elements when data is updated (#33558)
Summary:
Fixes https://github.com/facebook/react-native/issues/33529 (note that I reproduced the bug on iOS too).

The bug comes from the fact that we were using `this._scrollMetrics.offset` to determine if the initial scroll was done. But sometimes it equals 0 even after the initial scroll is done, for example when the content does not fill the list. So I replaced it with `this._hasDoneInitialScroll`.
I believe that `this._hasDoneInitialScroll` was not used in the first place because it was introduced later (3 years ago vs 5 years ago for the original code).

The replacement correctly fixes the broken test case and the example given in the issue.

Then I had to update two test cases (rename the first and remove the second), that shows explicitly the broken behavior:
we have to simulate the initial scroll for the content to be adjusted, so when the content does not fill the view and the scroll cannot be executed, the content is not adjusted.

## Changelog

[General] [Fix] - Fix VirtualizedList with initialScrollIndex not rendering all elements when data is updated

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

Test Plan:
- I added a broken test case based on the issue
- I tested with the RNTesterApp using the code example given in the issue

Reviewed By: ryancat

Differential Revision: D35503114

Pulled By: yungsters

fbshipit-source-id: 67bb75d7cf1ebac0d59127d0d45afbaa3167dcf3
2022-04-20 10:26:50 -07:00
Moti Zilberman a12959546a Revert D34518929: TalkBack support for ScrollView accessibility announcements (list and grid)
Differential Revision:
D34518929 (dd6325bafe)

Original commit changeset: 410a05263a56

Original Phabricator Diff: D34518929 (dd6325bafe)

fbshipit-source-id: 114d0910970c5f5caefb98c378722faba283f2a1
2022-04-20 06:48:19 -07:00
fabriziobertoglio1987 dd6325bafe TalkBack support for ScrollView accessibility announcements (list and grid) (#33180)
Summary:
This issue fixes [30977][17] . The Pull Request was previously published by [intergalacticspacehighway][13] with [31666][19].
The solution consists of:
1. Adding Javascript logic in the [FlatList][14], SectionList, VirtualizedList components to provide accessibility information (row and column position) for each cell in the method [renderItem][20] as a fourth parameter [accessibilityCollectionItem][21]. The information is saved on the native side in the AccessibilityNodeInfo and announced by TalkBack when changing row, column, or page ([video example][12]). The prop accessibilityCollectionItem is available in the View component which wraps each FlatList cell.
2. Adding Java logic in [ReactScrollView.java][16] and HorizontalScrollView to announce pages with TalkBack when scrolling up/down. The missing AOSP logic in [ScrollView.java][10] (see also the [GridView][11] example) is responsible for announcing Page Scrolling with TalkBack.

Relevant Links:
x [Additional notes on this PR][18]
x [discussion on the additional container View around each FlatList cell][22]
x [commit adding prop getCellsInItemCount to VirtualizedList][23]

## Changelog

[Android] [Added] - Accessibility announcement for list and grid in FlatList

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

Test Plan:
[1]. TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer ([link][1])
[2]. TalkBack announces pages and cells with Vertical Flatlist in the Paper Renderer ([link][2])
[3]. `FlatList numColumns={undefined}` Should not trigger Runtime Error NoSuchKey exception columnCount when enabling TalkBack. ([link][3])
[4]. TalkBack announces pages and cells with Nested Horizontal Flatlist in the rn-tester app ([link][4])

[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050462465
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1032340879
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050618308
[10]:1ac46f932e/core/java/android/widget/AdapterView.java (L1027-L1029) "GridView.java method responsible for calling setFromIndex and setToIndex"
[11]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1042518901 "test case on Android GridView"
[12]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894 "TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer"
[13]:https://github.com/intergalacticspacehighway "github intergalacticspacehighway"
[14]:80acf523a4/Libraries/Lists/FlatList.js (L617-L636) "FlatList accessibilityCollectionItem"
[16]:5706bd7d3e/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java (L183-L184) "logic added to ReactScrollView.java"
[17]: https://github.com/facebook/react-native/issues/30977
[18]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6
[19]: https://github.com/facebook/react-native/pull/31666
[20]: https://reactnative.dev/docs/next/flatlist#required-renderitem "FlatList renderItem documentation"
[21]: 75147359c5 "commit that introduces fourth param accessibilityCollectionItem in callback renderItem"
[22]: https://github.com/facebook/react-native/pull/33180#discussion_r826748664 "discussion on the additional container View around each FlatList cell"
[23]: d50fd1a681 "commit adding prop getCellsInItemCount to VirtualizedList"

Reviewed By: kacieb

Differential Revision: D34518929

Pulled By: blavalla

fbshipit-source-id: 410a05263a56162bf505a4cad957b24005ed65ed
2022-04-19 19:45:10 -07:00
Vincent Riemer 32c704c30f Add gated option to use w3c pointer events for Pressibility's hover callbacks
Summary: Changelog: [Internal] - Add gated option to use w3c pointer events for Pressibility's hover callbacks

Reviewed By: p-sun

Differential Revision: D35596600

fbshipit-source-id: f9e4b71497efd0dbb09dbc1872694fc93a6e1f2e
2022-04-18 15:47:55 -07:00
Vincent Riemer 64034f3976 Put W3C PointerEvents RNTester examples behind a feature flag
Summary: Changelog: [Internal] - Put W3C PointerEvents RNTester examples behind a feature flag

Reviewed By: lunaleaps, p-sun

Differential Revision: D35684411

fbshipit-source-id: c69c12c5ed7ee7acc925d4ca8932e8bd8b6d4eee
2022-04-18 15:47:55 -07:00
Vincent Riemer a40747e2d8 Add experimental disclaimers to pointer event APIs
Summary: Changelog: [Internal] - Add experimental disclaimers to pointer event APIs

Reviewed By: lunaleaps, p-sun

Differential Revision: D35682318

fbshipit-source-id: e85a37a2eb9568df636352e170bd42a3bb30a2f6
2022-04-18 15:47:55 -07:00
Richard Howell 7d4f6840f6 add casts for implicit int to float
Summary: Apply //fbobjc/Tools/cAST:implicit_conversion to existing warnings

Reviewed By: adamjernst

Differential Revision: D35692786

fbshipit-source-id: 13fb4f8a6b6e701c324b00c682943a4b3d80de72
2022-04-18 11:51:50 -07:00
Rick Hanlon 1369eb57ec React Native sync for revisions 8dcedba...60e63b9
Summary:
This sync includes the following changes:
- **[60e63b960](https://github.com/facebook/react/commit/60e63b960 )**: remove console.error in ReactFiberLane ([#24319](https://github.com/facebook/react/pull/24319)) //<Luna Ruan>//
- **[ec52a5698](https://github.com/facebook/react/commit/ec52a5698 )**: Fix: Don't call cWU if already unmounted //<Andrew Clark>//
- **[46db4e996](https://github.com/facebook/react/commit/46db4e996 )**: Combine deletion phase into single recursive function //<Andrew Clark>//
- **[481dece58](https://github.com/facebook/react/commit/481dece58 )**: Use recursion to traverse during mutation phase //<Andrew Clark>//
- **[f9e6aef82](https://github.com/facebook/react/commit/f9e6aef82 )**: Wrap try-catch directly around each user function //<Andrew Clark>//
- **[bcc1b3121](https://github.com/facebook/react/commit/bcc1b3121 )**: Move reportUncaughtErrorInDev to captureCommitPhaseError //<Andrew Clark>//
- **[c99c5f1df](https://github.com/facebook/react/commit/c99c5f1df )**: Move ad hoc flag checks into main switch statement //<Andrew Clark>//
- **[54b5b32d5](https://github.com/facebook/react/commit/54b5b32d5 )**: Move Update flag check into each switch case //<Andrew Clark>//
- **[e66e7a0fb](https://github.com/facebook/react/commit/e66e7a0fb )**: Inline commitWork into commitMutationOnFiber //<Andrew Clark>//
- **[12d7a9ad7](https://github.com/facebook/react/commit/12d7a9ad7 )**: Combine commitWork into single switch statement //<Andrew Clark>//
- **[ea7b2ec28](https://github.com/facebook/react/commit/ea7b2ec28 )**: Remove wrong return pointer warning //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 8dcedba...60e63b9

jest_e2e[run_all_tests]

Reviewed By: kacieb

Differential Revision: D35581192

fbshipit-source-id: d8674d2871612d2f27eaf8d75ff05e54ab91271d
2022-04-14 10:50:23 -07:00
Paige Sun 033ad83b29 Refactor the JS base StaticViewConfig to be easier to understand
Summary:
Changelog: [Internal][SVC][JS] Refactor the JS base SVC StaticViewConfig to be easier to understand

This diff is a refactor that doesn't change any logic.

# Context
NativeViewConfigs are generated from RCTViewManager in iOS and ViewManager in Android.
StaticViewConfigs are partially generated from JS, and partially handwritten in JS.

We've noticed in at least 2 instances that engineers who add new props to NativeViewConfigs sometimes don't put props in the correct place for StaticViewConfigs, and thus they accidentally break the landblocking jest e2e test that validates the StaticViewConfigs matches the NativeViewConfigs.

The human error is mostly because PlatformBaseViewConfig.js was too nested to be easily understood. This diff refactors PlatformBaseViewConfig.js and adds clarifying comments.

Reviewed By: RSNara

Differential Revision: D35623775

fbshipit-source-id: 498a3daa812fa314821a2e7cb7d6f809900dbe3a
2022-04-14 10:34:55 -07:00
Paige Sun 8b7d0f6837 (Easy) Fix SVCs for Android, by removing iOS-only accessibilityLanguage prop
Summary:
Changelog: [Internal][Fixed] Fix StaticViewConfigs for Android, by removing iOS-only accessibilityLanguage prop

The accessibilityLanguage was a prop added to RCTViewManager, that is iOS-only, so it shouldn't exist in the SVCs for Android.

Reviewed By: RSNara

Differential Revision: D35630945

fbshipit-source-id: 7ed7f2619f73bb88babfbb207793d5415addaee6
2022-04-14 10:34:55 -07:00
Paige Sun 8c5fc4f123 Add PointerEvent props to StaticViewConfigs to pass StaticViewConfigs-e2e.js test for FBiOS
Summary: Changelog: [Internal] Add PointerEvents props to StaticViewConfigs ensure SVC == NVC

Reviewed By: RSNara

Differential Revision: D35625443

fbshipit-source-id: 71209a65b1a7ef821f1bb9f4e19de577ede8fef5
2022-04-13 17:53:51 -07:00
Rick Hanlon ecd4c3f513 React Native sync for revisions e8f4a66...8dcedba
Summary:
This sync includes the following changes:
- **[8dcedba15](https://github.com/facebook/react/commit/8dcedba15 )**: Add fallback shim for AbortController ([#24285](https://github.com/facebook/react/pull/24285)) //<Ricky>//
- **[b86baa1cb](https://github.com/facebook/react/commit/b86baa1cb )**: Add back lost cache test ([#24317](https://github.com/facebook/react/pull/24317)) //<Ricky>//
- **[bafe912a5](https://github.com/facebook/react/commit/bafe912a5 )**: update types for InputContinuousLane and DefaultLane ([#24316](https://github.com/facebook/react/pull/24316)) //<Leo>//
- **[4ebaeae40](https://github.com/facebook/react/commit/4ebaeae40 )**: moved mutation code to passive ([#24251](https://github.com/facebook/react/pull/24251)) //<Luna Ruan>//
- **[caa60e8fc](https://github.com/facebook/react/commit/caa60e8fc )**: update types for NonIdleLanes and IdleLane ([#24313](https://github.com/facebook/react/pull/24313)) //<Leo>//
- **[1f7a901d7](https://github.com/facebook/react/commit/1f7a901d7 )**: Fix false positive lint error with large number of branches  ([#24287](https://github.com/facebook/react/pull/24287)) //<Stephen Cyron>//
- **[f56dfe950](https://github.com/facebook/react/commit/f56dfe950 )**: Warn on setState() in useInsertionEffect() ([#24298](https://github.com/facebook/react/pull/24298)) //<dan>//
- **[d68b09def](https://github.com/facebook/react/commit/d68b09def )**: Fix warning about setState in useEffect ([#24295](https://github.com/facebook/react/pull/24295)) //<dan>//
- **[057915477](https://github.com/facebook/react/commit/057915477 )**: Update create-subscription README ([#24294](https://github.com/facebook/react/pull/24294)) //<dan>//

Changelog:
[General][Changed] - React Native sync for revisions e8f4a66...8dcedba

jest_e2e[run_all_tests]

Reviewed By: kacieb

Differential Revision: D35581147

fbshipit-source-id: 33661d77eb000fdedab7e506a458fc739eab0056
2022-04-13 17:08:47 -07:00
Pieter Vanderwerff f8dee0e43e Deploy 0.176.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D35603908

fbshipit-source-id: 970831d9d89754772d3e8a641f44f7a3341ce01e
2022-04-13 15:03:28 -07:00
Rick Hanlon 46ab59c881 React Native sync for revisions 34aa5cf...e8f4a66
Summary:
This sync includes the following changes:
- **[e8f4a6653](https://github.com/facebook/react/commit/e8f4a6653 )**: Fix import in example //<dan>//
- **[bb49abea2](https://github.com/facebook/react/commit/bb49abea2 )**: Update some READMEs ([#24290](https://github.com/facebook/react/pull/24290)) //<dan>//
- **[4bc465a16](https://github.com/facebook/react/commit/4bc465a16 )**: Rename Controls to PipeableStream ([#24286](https://github.com/facebook/react/pull/24286)) //<Sebastian Markbåge>//
- **[ece5295e5](https://github.com/facebook/react/commit/ece5295e5 )**: Remove unnecessary flag check ([#24284](https://github.com/facebook/react/pull/24284)) //<zhoulixiang>//
- **[9ededef94](https://github.com/facebook/react/commit/9ededef94 )**: Don't mute hydration errors forcing client render ([#24276](https://github.com/facebook/react/pull/24276)) //<dan>//
- **[985272e26](https://github.com/facebook/react/commit/985272e26 )**: Fix name mismatch in react-reconciler custom build. ([#24272](https://github.com/facebook/react/pull/24272)) //<Hikari Hayashi>//
- **[b8cfda15e](https://github.com/facebook/react/commit/b8cfda15e )**: changed Transitions type to Array<Transition> ([#24249](https://github.com/facebook/react/pull/24249)) //<Luna Ruan>//
- **[c89a15c71](https://github.com/facebook/react/commit/c89a15c71 )**: [ReactDebugTools] wrap uncaught error from rendering user's component ([#24216](https://github.com/facebook/react/pull/24216)) //<Mengdi "Monday" Chen>//
- **[ebd7ff65b](https://github.com/facebook/react/commit/ebd7ff65b )**: Don't recreate the same fallback on the client if hydrating suspends ([#24236](https://github.com/facebook/react/pull/24236)) //<dan>//
- **[aa05e7315](https://github.com/facebook/react/commit/aa05e7315 )**: Add 4.4.0 release to eslint rules CHANGELOG ([#24234](https://github.com/facebook/react/pull/24234)) //<Brian Vaughn>//
- **[7e3121e1c](https://github.com/facebook/react/commit/7e3121e1c )**: Remove unstable_createMutableSource from experimental build ([#24209](https://github.com/facebook/react/pull/24209)) //<Sebastian Silbermann>//
- **[0415b18a1](https://github.com/facebook/react/commit/0415b18a1 )**: [ReactDebugTools] add custom error type for future new hooks ([#24168](https://github.com/facebook/react/pull/24168)) //<Mengdi "Monday" Chen>//

Changelog:
[General][Changed] - React Native sync for revisions 34aa5cf...e8f4a66

jest_e2e[run_all_tests]

Reviewed By: kacieb

Differential Revision: D35581059

fbshipit-source-id: ee031dfc49b1ef663b601f33f3f3f6c5a804971e
2022-04-12 13:41:59 -07:00
Rick Hanlon 41cbccd98d @nocommit React Native sync for revisions 1159ff6...34aa5cf
Summary:
I'm kicking this off to see what's the extent of failures we're going to get if we try to bump to React 18 inside RN OSS.

This sync includes the following changes:
- **[34aa5cfe0](https://github.com/facebook/react/commit/34aa5cfe0 )**: Update local package.jsons for 18 //<Andrew Clark>//
- **[e7d0053e6](https://github.com/facebook/react/commit/e7d0053e6 )**: [fizz] Fix validateIterable call ([#24166](https://github.com/facebook/react/pull/24166)) //<salazarm>//
- **[6b85823b3](https://github.com/facebook/react/commit/6b85823b3 )**: Clean up Selective Hydration / Event Replay flag ([#24156](https://github.com/facebook/react/pull/24156)) //<salazarm>//

Changelog:
[General][Changed] - React Native sync for revisions 1159ff6...34aa5cf

jest_e2e[run_all_tests]

Reviewed By: cortinico

Differential Revision: D35504622

fbshipit-source-id: ad0f6b42b6e03d78cd5d6ba51ce5a5730d25b167
2022-04-12 08:50:06 -07:00
Vincent Riemer c5cb707ba8 Add basic onPointerEnter/Leave event emitting to iOS
Summary: Changelog: [Internal] Add basic onPointerEnter/Leave event emitting to iOS

Reviewed By: lunaleaps

Differential Revision: D35414116

fbshipit-source-id: dd62cf7736c466e328b9ebbf51bf010610f4bd92
2022-04-11 15:49:30 -07:00
almouro f503b21203 improve interpolation performance with big input range (#33598)
Summary:
This drastically improves `Animated.interpolate` performance when `inputRange` has a considerable amount of elements (~100 in my tests).

For instance in `ActivityIndicator` inside `react-native-paper`, the input has 144 elements https://github.com/callstack/react-native-paper/blob/main/src/components/ActivityIndicator.tsx#L170. `react-native-elements` has 9k stars, so I'm assuming this is widely used.

### Cause

The reason for the performance drop is that if we assume `n` to be the size of the range, calculating `'inputRange must be monotonically non-decreasing ' + arr` essentially calculates `arr.toString()` which has O(n) complexity.
Since it is recalculated in a for loop, we end up with `checkValidInputRange` having a O(n²) complexity. Which means ~10k operations if the array has a size close to 100.

## Changelog

[General] [Fixed] - Fix performance issue on Animated.interpolate with big input range

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

Test Plan:
[Here's a repo](https://github.com/Almouro/AnimatedInterpolationRepro) reproducing the issue.
The branch `fix` includes the fix.
Clicking `Interpolate` runs:

```js
new Animated.Value(0).interpolate({
  inputRange: Array(144)
    .fill()
    .map((_, i) => 1 / (i + 1))
    .reverse(),
  outputRange: Array(144)
    .fill()
    .map((_, i) => 1 / (i + 1))
```

Here's a comparison of JS thread perf before the fix and after the fix:
- on a Samsung J3 2017 (lower end)
- using Flipper and https://github.com/bamlab/react-native-performance)
- ` __DEV__` mode deactivated
- clicking the button and waiting 15s

| Before   |      After      |
|----------|:-------------:|
| ![image](https://user-images.githubusercontent.com/4534323/162413692-307c2be1-5c7f-4e7f-ba69-8ba8d7c52bda.png) |  ![image](https://user-images.githubusercontent.com/4534323/162413842-780f12d2-ce8b-457c-b66c-c6d86f14ed28.png)|

The error still throws if `inputRange` is incorrect:

<img width="517" alt="image" src="https://user-images.githubusercontent.com/4534323/162439219-6ce120ae-98e5-496b-899a-492978689d6d.png">

However if `__DEV__` mode is deactivated, no error is thrown

Reviewed By: yungsters

Differential Revision: D35507441

Pulled By: javache

fbshipit-source-id: 36ac49422f7a42d247130c42d12248b2be1232c6
2022-04-11 10:37:33 -07:00
Danilo Bürger 61b013e7ad Allow modifying iOS image cache limits (#33554)
Summary:
Allow modifying iOS image cache limits. Currently the image cache imposes some strict limits:

[NSCache.totalCostLimit](https://developer.apple.com/documentation/foundation/nscache/1407672-totalcostlimit?language=objc) of 20MB.
Single Image Size Limit of 2MB (bitmap size).

This may not be enough for applications that make heavy use of images. With this commit it is possible to fine tune them to the applications need.

This can be set for example in the App Delegate with:

```objc
RCTSetImageCacheLimits(4*1024*1024, 200*1024*1024);
```
This would increase the single image size limit to 4 MB and the total cost limit to 200 MB.

## Changelog

[iOS] [Added] - Allow modifying iOS image cache limits

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

Test Plan: There is no easy way to test this except adding the above snippet and checking via break points that the new limits are used.

Reviewed By: cipolleschi

Differential Revision: D35485914

Pulled By: cortinico

fbshipit-source-id: 646cf7cab5ea5258d0d0d0bce6383317e27e4445
2022-04-08 09:00:06 -07:00
Vincent Riemer 179c24e255 Emit touch-equivalent W3C pointer events on iOS
Summary: Changelog: [Internal] Emit touch-equivalent W3C pointer events on iOS

Reviewed By: lunaleaps

Differential Revision: D35295104

fbshipit-source-id: 1c1d5a4159bbfed92df151f7e12a4973ec44e970
2022-04-07 14:07:58 -07:00
Keion Anvaripour 17ecd2fb5b Update RCTPushNotificationManager checkPermissions API to support iOS 10+
Summary:
Changelog:
[iOS][Changed] - Update `PushNotificationIOS.checkPermissions` to include iOS 10+ notification settings.

`PushNotificationIOS.checkPermissions` is currently limited to only return:
* alert :boolean
* badge :boolean
* sound :boolean

That's has been a number of new properties since iOS 10 that we should support to improve pushability signal. This diff updates the logic to support 4 new available settings:
* critical :boolean,
* lockScreen :boolean,
* notificationCenter :boolean,
* autorizationStatus: number,

Reviewed By: philIip

Differential Revision: D35386762

fbshipit-source-id: 07c87de024756bc95a2c822ac35437ec76b3c903
2022-04-06 20:15:22 -07:00
matinzd 8dfbed786b fix: remove deprecated event listener method from appearance.js (#32526)
Summary:
Remove unused deprecated event listener method from appearance.js

## Changelog

[General] [Removed] - Remove deprecated removeListener from Appearance that causes deprecation message in log box.

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

Reviewed By: cortinico

Differential Revision: D35287187

Pulled By: yungsters

fbshipit-source-id: cf0af61ed8636855aa625579e27816a6c10b6b81
2022-04-06 12:53:14 -07:00
George Zahariev 08d3af994a Run codemod removing annotations nested inside of destructuring
Summary:
Annotations inside of destructuring (e.g. `const [foo: number] = ...`) are invalid Flow syntax. We currently ignore them, and in the future will error on them (D35304565).

Remove them using the codemod from D35390352

Locally changed WWW_ROOT, FLOW_ROOTS, and excluded paths in scripts/typedjs/flow/runner.config.js (e.g. P492224584) - and then
```
scripts/typedjs/flow/runner codemod removeAnnotationsInDestructuring ~/fbsource/xplat/js
```
formatting files didn't work, so do it manually

Changelog: [Internal]

drop-conflicts

Reviewed By: fred2028

Differential Revision: D35419146

fbshipit-source-id: e4c05506ceec11afcc8e92f13f732510ebabdbc3
2022-04-06 12:42:22 -07:00
Chris Olszewski daa105aba5 Fixup typo in pfh labels
Summary:
Now that the PFH node has been renamed this updates the pfh label.

Produced via `xbgs -l -e '"pfh:ReactNative_CommonInfrastructurePlaceholde"' | xargs sed -i 's/"pfh:ReactNative_CommonInfrastructurePlaceholde"/"pfh:ReactNative_CommonInfrastructurePlaceholder"/'`

Reviewed By: jkeljo

Differential Revision: D35374087

fbshipit-source-id: 61590f69de5a69ec3b8a0478f6dd43409de3c70b
2022-04-05 12:15:05 -07:00
Pieter De Baets 6e5cefe604 Codemod arvr to use onPointer* instead of onEnter/onExit/onMove
Summary: Changelog: [Internal] Improve experimental support for pointer event dispatching support in JS

Reviewed By: mdvacca

Differential Revision: D35216647

fbshipit-source-id: 212f038115e4713097db05847a9638efe0a25bed
2022-04-05 07:11:10 -07:00
matinzd d05a5d1551 feat: add getAll function to formdata (#32444)
Summary:
The getAll() method of the [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) interface returns all the values associated with a given key from within a FormData object.

## Changelog

[General] [Added] - Add getAll function to FormData class for getting all parts containing that key. This is also available in web API.

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

Test Plan: New test added in FormData-test.js

Reviewed By: lunaleaps

Differential Revision: D31798633

Pulled By: cortinico

fbshipit-source-id: ef29bb54e930532a671adbe707be8d1a64ff0d82
2022-03-31 07:59:01 -07:00
Luna Wei c50e6b52fe Emit non-hover pointer events on Android (#33526)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33526

Changelog: [Internal] Experimental pointer event dispatching on Android: touch pointer support only, hover events to come later.

Reviewed By: vincentriemer

Differential Revision: D34132667

fbshipit-source-id: 6506d43b4ad16e11b10c3cd23e0231428209411f
2022-03-30 19:12:42 -07:00
Chris Olszewski ceae48c0f7 Add pfh labels to targets
Summary:
While it would be better to be able to do all of the ownership metadata at the Buck macro level, that proved to be more work than expected.

This diff adds the corresponding pfh label to all targets in `xplat/js/react-native-github` that have a Supermodule label. Once the migration is complete the Supermodules labels will be able to be removed.

Reviewed By: cortinico

Differential Revision: D35221544

fbshipit-source-id: d87d5e266dfb5e6ee087251dc34dff5db299bbaf
2022-03-30 14:37:03 -07:00
Chris Olszewski 75edd288cb Backout feature args
Reviewed By: jkeljo

Differential Revision: D35203884

fbshipit-source-id: 87d50b138aaa3dd16a24b5ff2795910c3644d418
2022-03-30 06:53:44 -07:00
fabriziobertoglio1987 7b5b114d57 Making links independently focusable by Talkback (#33215)
Summary:
This issue fixes [32004][23]. The Pull Request was previously published by [blavalla][10] with [31757][24].
>This is a follow-up on [D23553222 (b352e2da81)][18], which made links functional by using [Talkback's Links menu][1]. We don't often use this as the sole access point for links due to it being more difficult for users to navigate to and easy for users to miss if they don't listen to the full description, including the hint text that announces that links are available.
The Implementation of the functionality consists of:

Retrieving the accessibility links and triggering the TalkBack Focus over the Text
1. nested Text components with accessibilityRole link are saved as [ReactClickableSpan][17] instances in Android native [TextView][20] ([more info][19])
1. If the TextView contains any [ClickableSpans][15] (which are [nested Text][14] components with role link), set a view tag and reset the accessibility delegate.
3. Obtain each link description, start, end, and position relative to the parent Text (id) from the Span as an [AccessibilityLink][16]
4. Use the [AccessibilityLink][16]  to display TalkBack focus over the link with the `getVirtualViewAt` method (more [info][13])

Implementing ExploreByTouchHelper to detect touches over links and to display TalkBack rectangle around them.
1. ReactAccessibilityDelegate inherits from [ExploreByTouchHelper][12]
2. If the [ReactTextView][21] has an accessibility delegate, trigger ExploreByTouchHelper method [dispatchHoverEvent][22]
3.  Implements the methods `getVirtualViewAt` and `onPopulateBoundsForVirtualView`.
     The two methods implements the following functionalities  (more [info][13]):
    * detecting the TalkBack onPress/focus on nested Text with accessibilityRole="link"
    * displaying TalkBack rectangle around nested Text with accessibilityRole="link"

## Changelog

[Android] [Added] - Make links independently focusable by Talkback

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

Test Plan:
[1]. User Interacts with links through TalkBack default accessibility menu ([link][1])
[2]. The nested link becomes the next focusable element after the parent element that contains it. ([link][2])
[3]. Testing accessibility examples in pr branch ([link][3])
[4]. Testing accessibility android examples in pr branch ([link][4])
[7]. TalkBack focus moves through links in the correct order from top to bottom (PR Branch with [link.id][25]) ([link to video test][7]) ([discussion][26])
[8]. TalkBack focus does not move through links in the correct order from top to bottom (PR Branch without [link.id][25]) ([link to video test][8]) ([discussion][26])

Test on main branch
[5]. Testing accessibility examples in main branch ([link][5])
[6]. Testing accessibility android examples in main branch ([link][6])

[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1045593386
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1045593164
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1054900872
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1054918634
[5]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1054888278
[6]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1054891828
[7]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1060073165
[8]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1060098381

[10]: https://github.com/blavalla "blavalla github profile"
[12]: 1ac46f932e/core/java/com/android/internal/widget/ExploreByTouchHelper.java (L48) "com/android/internal/widget/ExploreByTouchHelper.java#L48"
[13]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/9#issuecomment-1046384200 "explanation of getVirtualViewAt and onPopulateBoundsForVirtualView"
[14]: 1ac46f932e/core/java/android/text/Spannable.java (L3) "core/java/android/text/Spannable.java#L3"
[15]: 561266fc18/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java (L70-L71) "react/views/text/ReactTextViewManager.java#L70-L71"
[16]: 561266fc18/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java (L680-L685) "react/uimanager/ReactAccessibilityDelegate.java#L680-L685"
[17]: 561266fc18/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java (L126-L129) "react/views/text/TextLayoutManager.java#L126-L129"
[18]: b352e2da81
[19]: https://github.com/facebook/react-native/issues/30375#issuecomment-781494859 "explanation on how nested Text are converted to Android Spans"
[20]: 1ac46f932e/core/java/android/widget/TextView.java (L214-L220) "core/java/android/widget/TextView.java#L214-L220"
[21]: 485cf6118b/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java (L577) "dispatchHoverEvent in ReactTextView"
[22]: 1ac46f932e/core/java/com/android/internal/widget/ExploreByTouchHelper.java (L120-L138) "dispatchHoverEvent in ExploreByTouchHelper"
[23]: https://github.com/facebook/react-native/issues/32004
[24]: https://github.com/facebook/react-native/pull/31757
[25]: 485cf6118b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java (L648) "setting link.id in the AccessibilityLink constructor"
[26]: 485cf6118b (r820014411) "comment on role of link.id"

Reviewed By: blavalla

Differential Revision: D34687371

Pulled By: philIip

fbshipit-source-id: 8e63c70e9318ad8d27317bd68497705e595dea0f
2022-03-29 13:36:24 -07:00
Paige Sun 6ee70a9cae 5/n Allow CKComponents to embed Fabric surfaces
Summary:
Changelog: [Fabric][iOS] Allow CKComponents to embed Fabric surfaces too.

Previously RCTSurfaceHostingComponent, a CKComponent, could only initialize the legacy RCTSurface. Now it can initialize RCTFabricSurface too, when a RCTSurfacePresenter is passed in.

Reviewed By: RSNara

Differential Revision: D35163595

fbshipit-source-id: e11a9334b0282e0728a38cc1c96de48a694e9e3d
2022-03-29 11:52:49 -07:00
Paige Sun 32fa5d6025 3/n (Easy) Make ComponentKit hosting RN use RCTSurfaceProtocol instead of Paper's RCTSurface
Summary:
Changelog: [iOS][Internal] Refactor: Make ComponentKit hosting ReactNative use RCTSurfaceProtocol instead of Paper's RCTSurface

Replace RCTSurface with id<RCTSurfaceProtocol>, because both RCTFabricSurface and RCTSurface conforms to RCTSurfaceProtocol.

Reviewed By: RSNara

Differential Revision: D35163498

fbshipit-source-id: ba54c9bf5949313cd501bd185975fe96d4770961
2022-03-29 11:52:49 -07:00
Paige Sun 1874c81003 (Easy) 1/n In RCTSurfaceHostingComponent, access ckComponent from main queue to pass assertion
Summary:
Changelog:

Before diff, we always hit assert the `'self.component' must be called on the main thread` assertion whenever we open a surface with a RCTSurfaceHostingComponent (React Native surface inside a CKComponent).

Reviewed By: RSNara

Differential Revision: D35152263

fbshipit-source-id: 1b06ca9d2ae7ca211120b71504e2eeaabaaf3bfd
2022-03-29 11:52:49 -07:00
CodemodService Bot b6e72c5922 Annotate targets with feature xplat/js/react-native-github/Libraries/RCTRequired/BUCK -> xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK
Reviewed By: jkeljo

Differential Revision: D35178374

fbshipit-source-id: be4ad27928a1b9260a9d6321c9705b30aebe04d6
2022-03-28 13:11:16 -07:00
bang9 d2e8e7d58e Fix FormData to properly handle appended arrays. (#32815)
Summary:
The Array appended to FormData must be transmitted in the form of a string.
However, it is treated as a file object and transmitted, because `typeof Array` is `'object'` too

In network
```js
form.append('array_name', ['a', 'b', 'c'])

// Browser
// Content-Disposition: form-data; name='array_name';
// a,b,c

// ReactNative
// Content-Disposition: form-data; name='array_name';
//
```

## Changelog
[General] [Fixed] - The Array appended to FormData is transmitted as a string

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

Test Plan: Added test case

Reviewed By: lunaleaps

Differential Revision: D33369594

Pulled By: charlesbdudley

fbshipit-source-id: 0b5219a2c9f73cf16665dc417cceb4481428ad4e
2022-03-28 11:53:32 -07:00
AntoineDoubovetzky 9aab25ec53 (AppState) fix removeEventListener adding another listener when type is blur or focus (#33491)
Summary:
I noticed the `AppState.removeEventListener` was in fact calling `addListener` instead of `removeListener` when type is blur or focus.

I know this method is deprecated but it can't hurt to fix it.

## Changelog

[General] [Fixed] - AppState.removeEventListener correctly removes listener for blur and focus events

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

Test Plan: I've thought about adding a unit test, but it isn't that easy since AppState is mocked and the method is deprecated so I don't think it is worth investing too much for it.

Reviewed By: cortinico

Differential Revision: D35139808

Pulled By: GijsWeterings

fbshipit-source-id: 9d8ba157db3a62ea53759e1246f483182faf12f1
2022-03-25 05:14:06 -07:00
Rick Hanlon 05b0d29e76 React Native sync for revisions 1780659...1159ff6
Summary:
This sync includes the following changes:
- **[3f8990898](https://github.com/facebook/react/commit/3f8990898 )**: Fix test-build-devtools if build was generated by build-for-devtools ([#24088](https://github.com/facebook/react/pull/24088)) //<Sebastian Silbermann>//
- **[577f2de46](https://github.com/facebook/react/commit/577f2de46 )**: enableCacheElement flag ([#24131](https://github.com/facebook/react/pull/24131)) //<David McCabe>//
- **[2e0d86d22](https://github.com/facebook/react/commit/2e0d86d22 )**: Allow updating dehydrated root at lower priority without forcing client render ([#24082](https://github.com/facebook/react/pull/24082)) //<Andrew Clark>//
- **[dbe9e732a](https://github.com/facebook/react/commit/dbe9e732a )**: Avoid conditions where control flow is sufficient ([#24126](https://github.com/facebook/react/pull/24126)) //<Sebastian Markbåge>//
- **[b075f9742](https://github.com/facebook/react/commit/b075f9742 )**: Fix dispatch config type for skipBubbling ([#24109](https://github.com/facebook/react/pull/24109)) //<Luna>//
- **[ef23a9ee8](https://github.com/facebook/react/commit/ef23a9ee8 )**: Flag for text hydration mismatch ([#24107](https://github.com/facebook/react/pull/24107)) //<salazarm>//
- **[0412f0c1a](https://github.com/facebook/react/commit/0412f0c1a )**: add offscreen state node ([#24026](https://github.com/facebook/react/pull/24026)) //<Luna Ruan>//
- **[43eb28339](https://github.com/facebook/react/commit/43eb28339 )**: Add skipBubbling property to dispatch config ([#23366](https://github.com/facebook/react/pull/23366)) //<Luna>//
- **[832e2987e](https://github.com/facebook/react/commit/832e2987e )**: Revert accdientally merged PR ([#24081](https://github.com/facebook/react/pull/24081)) //<Andrew Clark>//
- **[02b65fd8c](https://github.com/facebook/react/commit/02b65fd8c )**: Allow updates at lower pri without forcing client render //<Andrew Clark>//
- **[83b941a51](https://github.com/facebook/react/commit/83b941a51 )**: Add isRootDehydrated function //<Andrew Clark>//
- **[c8e4789e2](https://github.com/facebook/react/commit/c8e4789e2 )**: Pass children to hydration root constructor //<Andrew Clark>//
- **[581f0c42e](https://github.com/facebook/react/commit/581f0c42e )**: [Flight] add support for Lazy components in Flight server ([#24068](https://github.com/facebook/react/pull/24068)) //<Josh Story>//
- **[72a933d28](https://github.com/facebook/react/commit/72a933d28 )**: Gate legacy hidden ([#24047](https://github.com/facebook/react/pull/24047)) //<Sebastian Markbåge>//
- **[b9de50d2f](https://github.com/facebook/react/commit/b9de50d2f )**: Update test to reset modules instead of using private state ([#24055](https://github.com/facebook/react/pull/24055)) //<Sebastian Markbåge>//
- **[c91892ec3](https://github.com/facebook/react/commit/c91892ec3 )**: [Fizz] Don't flush empty segments ([#24054](https://github.com/facebook/react/pull/24054)) //<Sebastian Markbåge>//
- **[d5f1b067c](https://github.com/facebook/react/commit/d5f1b067c )**: [ServerContext] Flight support for ServerContext ([#23244](https://github.com/facebook/react/pull/23244)) //<salazarm>//
- **[6edd55a3f](https://github.com/facebook/react/commit/6edd55a3f )**: Gate unstable_expectedLoadTime on enableCPUSuspense ([#24038](https://github.com/facebook/react/pull/24038)) //<Sebastian Markbåge>//
- **[57799b912](https://github.com/facebook/react/commit/57799b912 )**: Add more feature flag checks ([#24037](https://github.com/facebook/react/pull/24037)) //<Sebastian Markbåge>//
- **[e09518e5b](https://github.com/facebook/react/commit/e09518e5b )**: [Fizz] write chunks to a buffer with no re-use ([#24034](https://github.com/facebook/react/pull/24034)) //<Josh Story>//
- **[14c2be8da](https://github.com/facebook/react/commit/14c2be8da )**: Rename Node SSR Callbacks to onShellReady/onAllReady and Other Fixes ([#24030](https://github.com/facebook/react/pull/24030)) //<Sebastian Markbåge>//
- **[cb1e7b1c6](https://github.com/facebook/react/commit/cb1e7b1c6 )**: Move onCompleteAll to .allReady Promise ([#24025](https://github.com/facebook/react/pull/24025)) //<Sebastian Markbåge>//
- **[566285761](https://github.com/facebook/react/commit/566285761 )**: [Fizz] Export debug function for FB ([#24024](https://github.com/facebook/react/pull/24024)) //<salazarm>//
- **[05c283c3c](https://github.com/facebook/react/commit/05c283c3c )**: Fabric HostComponent as EventEmitter: support add/removeEventListener (unstable only) ([#23386](https://github.com/facebook/react/pull/23386)) //<Joshua Gross>//
- **[08644348b](https://github.com/facebook/react/commit/08644348b )**: Added unit Tests in the ReactART, increasing the code coverage ([#23195](https://github.com/facebook/react/pull/23195)) //<BIKI DAS>//
- **[feefe437f](https://github.com/facebook/react/commit/feefe437f )**: Refactor Cache Code ([#23393](https://github.com/facebook/react/pull/23393)) //<Luna Ruan>//

Changelog:
[General][Changed] - React Native sync for revisions 1780659...1159ff6

jest_e2e[run_all_tests]

Reviewed By: lunaleaps

Differential Revision: D34928167

fbshipit-source-id: 8c386f2be5871981d217ab9a514892ed88eafcfb
2022-03-24 13:38:00 -07:00
Genki Kondo c231d5e371 VirtualizedList optimization - memoize FlatList._renderer
Summary:
Problem:
All CellRenderers rerender every time the containing VirtualizedList is rerendered. This is due to the following:
- Lambda is created for each CellRenderer's onLayout prop on every VirtualizedList render (fixed in D35061321 (19cf70266e))
- CellRenderer's parentProps prop changes on every VirtualizedList render (fixed in D35062323 (adb2962fee))
- FlatList recreates renderItem/ListItemComponent in FlatList._renderer (addressed in this diff)

Changelog:
[Internal] - VirtualizedList optimization - memoize FlatList._renderer

Reviewed By: ryancat

Differential Revision: D35067472

fbshipit-source-id: 124629d94821f35b8943730839fbe72f547e80fd
2022-03-24 13:14:37 -07:00
Genki Kondo adb2962fee VirtualizedList optimization - refactor CellRenderer props to eliminate parentProps
Summary:
Problem:
All CellRenderers rerender every time the containing VirtualizedList is rerendered. This is due to the following:
- Lambda is created for each CellRenderer's onLayout prop on every VirtualizedList render (fixed in D35061321 (19cf70266e))
- CellRenderer's parentProps prop changes on every VirtualizedList render (addressed in this diff)
- FlatList recreates renderItem/ListItemComponent in FlatList._renderer

Changelog:
[Internal] - VirtualizedList optimization - refactor CellRenderer props to eliminate parentProps

Reviewed By: javache

Differential Revision: D35062323

fbshipit-source-id: 705c2f7c6c482b7813efdfdac7019a94594de590
2022-03-24 10:05:14 -07:00
Genki Kondo 19cf70266e VirtualizedList optimization - avoid lambda creation in CellRenderer onLayout prop
Summary:
Problem:
All CellRenderers rerender every time the containing VirtualizedList is rerendered. This is due to the following:
- Lambda is created for each CellRenderer's onLayout prop on every VirtualizedList render (fixed in this diff)
- CellRenderer's parentProps prop changes on every VirtualizedList render

Changelog:
[Internal] - VirtualizedList optimization - avoid lambda creation in CellRenderer onLayout prop

Reviewed By: javache

Differential Revision: D35061321

fbshipit-source-id: ab16bda8418b692f1edb4bce87e25c34f6252b56
2022-03-24 08:28:01 -07:00
Erich Graham 45e2941367 Remove folly import in GenerateModuleObjCpp
Summary:
Changelog:

[iOS][Changed]
Replaced folly::Optional with std::optional from C++17 in Objc module generator.

Reviewed By: philIip

Differential Revision: D32367103

fbshipit-source-id: f0d254c4add7d6d2e0bdbceb09a852b4a01ea8c7
2022-03-22 17:10:18 -07:00
Vojtech Novak 8a5460ce80 fix attempting to focus disabled textinputs (#30695)
Summary:
when we call `focus()` upon a TextInput ref which has prop `editable=false` it marks the textinput as focused in `TextInputState` even though the focus is rejected by textinput itself because it is not editable.

then, when you change `editable` prop to `true` and call `focus` again, [this condition](e912c462eb/Libraries/Components/TextInput/TextInputState.js (L46)) or rather [this one](1b2b2198e1/Libraries/Components/TextInput/TextInputState.js (L89)) will evaluate to `false` and focus will not happen even though it can and should happen.

see also https://github.com/facebook/react-native/blob/0.64-stable/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js#L3895

## 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] [Fixed] - `focus()` on TextInput to respect its `editable` state

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

Test Plan: Create a `TextInput` with prop `editable=false` and call `ref.current.focus()` upon its ref. TextInput should not be marked as focused in `TextInputState`.

Reviewed By: yungsters

Differential Revision: D34357913

Pulled By: lunaleaps

fbshipit-source-id: 9a2fb819bbb05ef213c9b5d739dec583ae0a3e6f
2022-03-22 11:43:57 -07:00
Pieter Vanderwerff 83ab3615c5 Land suppressions ahead of 0.174.1 release [v2]
Summary: Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D35035872

fbshipit-source-id: 74daf0685e976459119061a3fca467277f0dc4ac
2022-03-22 11:42:16 -07:00
Abishek Sethuraman ecc63daf4b Revert D35016384: Land suppressions ahead of 0.174.1 release
Differential Revision:
D35016384 (2fab97fde5)

Original commit changeset: 78ab1b4822c0

Original Phabricator Diff: D35016384 (2fab97fde5)

fbshipit-source-id: 82d9672798fdb77313a35be40d0c0aebb0cace64
2022-03-21 15:24:39 -07:00
Pieter Vanderwerff 2fab97fde5 Land suppressions ahead of 0.174.1 release
Summary: Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D35016384

fbshipit-source-id: 78ab1b4822c0a3aeab63d615b81b6063a883fe54
2022-03-21 14:24:38 -07:00
Phillip Pan 982ca30de0 bump iOS and tvOS from 11.0 to 12.4 in cocoapods
Summary:
Changelog: [iOS][Deprecated] Deprecating support for iOS/tvOS SDK 11.0, 12.4+ is now required

allow-large-files

Reviewed By: sammy-SC

Differential Revision: D34547333

fbshipit-source-id: a24bb09d03939a092de4198efb1aa4a44c69f718
2022-03-16 21:08:01 -07:00
Gijs Weterings b633cc1305 Remove console.disableYellowBox support
Summary:
We're replacing console.disableYellowBox (untyped, global hack, only warnings) with LogBox.ignoreAllLogs() (typed, local method, handles errors and warnings). rickhanlonii made the initial deprecation of this >2 years ago in 87f1e22434 . This diff finally removes the support of `console.disableYellowBox`. Users of LogBox should be using `LogBox.ignoreAllLogs`. This removal also allows us to move LogBox to strict mode flow.

Changelog: [BREAKING] [Removed] Removed console.disableYellowBox in favor of LogBox.ignoreAllLogs.

Reviewed By: rickhanlonii, yungsters

Differential Revision: D34689343

fbshipit-source-id: 3b2865a4918de703e47cd722e3f396475254c65a
2022-03-14 05:33:40 -07:00
Gabriel Donadel Dall'Agnol 64ebe5bbdd feat: Add dismissActionSheet method to ActionSheetIOS (#33189)
Summary:
This PR adds a `dismissActionSheet` method to `ActionSheetIOS` in order to allow dismissing an ActionSheet programmatically. This is especially useful in apps where a user has the ability to open an ActionSheet and then open a push notification that will redirect them to another screen which usually leads to scenarios where the presented ActionSheet has no relation with the current screen.

#### TODO
- [ ]  Submit react-native-website PR updating ActionSheetIOS documentation.

## Changelog

[iOS] [Added] - Add dismissActionSheet method to ActionSheetIOS

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

Test Plan:
1. Open the RNTester app and navigate to the ActionSheetIOS page
2. Test `dismissActionSheet` through the `Show Action Sheet and automatically dismiss it` example

https://user-images.githubusercontent.com/11707729/155867546-c6770a49-9b09-45e3-a6b1-4f7645d67dbf.mov

Reviewed By: lunaleaps

Differential Revision: D34518952

Pulled By: cortinico

fbshipit-source-id: 912a9b83ee078f791b42efddf5abb7e1cd09d520
2022-03-11 16:33:17 -08:00
Lulu Wu 1042a8012f Encode params in URLSearchParams
Summary:
URL params are not encoded which could cause a security risk, for more details pls see https://fb.workplace.com/groups/react.technologies.discussions/permalink/3184249088473474/

Changelog:
[General][Security] - Encode URL params in URLSearchParams.toString()

Reviewed By: yungsters

Differential Revision: D34415119

fbshipit-source-id: 83c29df9427ad0adc9b6a2b4d0ff5494247aa5cb
2022-03-11 16:26:48 -08:00
Vegas Murphy d34a75e9e5 Fix layout in casting screen
Summary:
Changelog:
[Android][Fixed] - Fix StatusBar not updating to use translucent values when set to the same value across different activities

With native nav we open routes in a new activity. Each activity has its own StatusBar configured so we need to ensure it is configured properly.
Currently since the statusBar RN component avoids changing the StatusBar if the value hasn't changed it never gets updated and doesn't become translucent this results in all our padding being off since we add padding to account for the status bar

Reviewed By: yungsters

Differential Revision: D34810143

fbshipit-source-id: 5e382026fb89542fe0c8f6ab396f2fbeedee7a05
2022-03-11 14:07:33 -08:00
Kudo Chien a6c2846b37 Fix ios build error when use_frameworks is on and fabric is off (v2) (#33409)
Summary:
alternative solution for https://github.com/facebook/react-native/issues/33379

> when `use_frameworks!` is on, there are errors like:
> ```
> 'FBReactNativeSpec/FBReactNativeSpec.h' file not found
> #import <FBReactNativeSpec/FBReactNativeSpec.h>
> ```
> this error may come from from https://github.com/facebook/react-native/commit/f7e4c07c84b6 regression.
>
> when `use_frameworks!` is on, xcode will search headers from framework directories, the correct imports would be `#import <React_Codegen/FBReactNativeSpec/FBReactNativeSpec.h>` (xcode will transform dash to underscore, so it is `React_Codegen` but not `React-Codegen`). in the other hand, when `use_frameworks!` is off, the correct import is `#import <React-Codegen/FBReactNativeSpec/FBReactNativeSpec.h>`.
>
>
> this fix is specific for old architecture (fabric is off).
>
> when fabric is on, there are other errors from duplicated headers when copying to build folder. [the reason is that framework build would try to flatten headers](https://mkonrad.net/2015/03/29/xcode-static-libraries-preserving-header-directory-structure.html). we have `primitives.h` in different folders and they would be flattened into `React_Fabric.framework/Headers`. to be honest, i don't know how to deal with the problem in the meantime,  maybe subspecs are not enough, we should separate them from subspecs to dedicated podspecs so that we can have these targets as different frameworks.

in this alternative fix, i try to add `React-Codegen/React_Codegen.framework/Headers` into header search paths and make original `#import <FBReactNativeSpec/FBReactNativeSpec.h>` reachable.

[this change](7a0398c331) in the pr is just a workaround to solve breaking in latest main branch and this is not important to the `use_frameworks!` fix at all. this breaking was coming from 1804951595.

## Changelog

[iOS] [Fixed] - Fix iOS build error when Podfile `use_frameworks!` is on and Fabric is off

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

Test Plan:
verify with rn-tester
1. change `fabric_enabled` to false in `packages/rn-tester/Podfile`
2. `USE_FRAMEWORKS=1 pod install`
3. build rn-tester in xcode

Reviewed By: dmitryrykun

Differential Revision: D34817041

Pulled By: cortinico

fbshipit-source-id: 4d1a610e99a807793eb3f64461e0d735c0a9ca9c
2022-03-11 09:08:07 -08:00
caioagiani 8200063ac6 fix: typos (#33040)
Summary:
Fix typos in:

- `Libraries/Renderer/implementations/ReactFabric-dev.js`: transfered -> **transferred**
- `Libraries/Renderer/implementations/ReactNativeRenderer-dev.js`: transfered -> **transferred**
- `ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressiveStringDecoder.java`: remainderLenght -> **remainderLength**
- `ReactAndroid/src/main/jni/first-party/yogajni/jni/ScopedGlobalRef.h`: Transfering -> **Transferring**
- `ReactCommon/react/renderer/graphics/Transform.h`:  tranformation -> **transformation**
- `packages/rn-tester/js/examples/ToastAndroid/ToastAndroidExample.android.js`: occured -> **occurred**

## 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] [Fixed] - fix typos

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

Test Plan: Considering this only changes code comments, I don’t think this pull request needs a test plan.

Reviewed By: cortinico, pasqualeanatriello

Differential Revision: D34003812

Pulled By: dmitryrykun

fbshipit-source-id: 5c8699f8efcc4354854190a9aade30dbc5c90fdb
2022-03-08 03:58:58 -08:00
Facebook Community Bot 4ee463c4f1
Re-sync with internal repository (#33392)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2022-03-08 08:18:17 +00:00
Qiao Tan c1af99d57e Back out "Back out "React Native sync for revisions 4de99b3...1780659""
Summary:
Original commit changeset: ce589d6e7d22

Original Phabricator Diff: D34632014 (4eef075a58)

Changelog:
[General][Changed] - React Native sync for revisions 4de99b3...1780659

-----

As part of the effort to address T113279390, we tried to back out a change in RN (D34632014 (4eef075a58)) but later realized it wasn't actually the root cause.

So this diff is to re-land the original change again.

Reviewed By: ShikaSD

Differential Revision: D34694253

fbshipit-source-id: 76fcfb852b8d8ae6e4287d1bc2b13010e824dd0b
2022-03-07 16:06:44 -08:00
Diego Pasquali 7b05b091fd Integrated iOS-only `accessibilityLanguage` prop (#33090)
Summary:
This PR fixes https://github.com/facebook/react-native/issues/30891

This PR is going to add an `accessibilityLanguage` prop to all the available components. This props is currently working only on iOS and should follow the [guidelines of the relative configuration](https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage).

I'm in no way an expert on native programming (especially Objective-C) so I'm open to changes / improvements 🙂

## 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
-->

[iOS] [Added] - Integrated the `accessibilityLanguage` prop to all the available components. The prop is available for any platform but it will work only on iOS.

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

Test Plan:
This has been tested using both the Simulator, checking for the `Language` attribute, and using a physical device with the Voice Over enabled.

<img width="1083" alt="Screenshot 2022-02-11 at 13 17 32" src="https://user-images.githubusercontent.com/5963683/153590415-65fcb4ff-8f31-4a0f-90e5-8eb1aae6aa3d.png">

Reviewed By: philIip

Differential Revision: D34523608

Pulled By: rh389

fbshipit-source-id: b5d77fc0b3d76ea8ed8f30c8385459ba98122ff6
2022-03-07 09:43:30 -08:00
Kevin Lin ff769521e4 Remove usage of overlay component builder
Summary: Changelog: [Internal]

Reviewed By: Andrey-Mishanin

Differential Revision: D34683221

fbshipit-source-id: 204fab7185017d1718cbcac5d2b388c8c0eaab08
2022-03-07 07:58:20 -08:00
Samuel Susla c2e4ae39b8 Add support for C++17 in OSS
Summary: changelog: Add support for C++17

Reviewed By: cortinico

Differential Revision: D34612257

fbshipit-source-id: 88a0307a750f2e0793a639b7a2b670a4571332fe
2022-03-04 07:25:59 -08:00
Qiao Tan 4eef075a58 Back out "React Native sync for revisions 4de99b3...1780659"
Summary:
Original commit changeset: f1c831a45f96

Original Phabricator Diff: D34552175 (6a4e905e3a)

Changelog:
[Android][Fixed] - Revert back a previous change that could cause null pointer exception on UI manager

----

Context:

We were flagged a spiking crash on BizApp v348 (T113279390). We were able to repro the issue on multiple UI components on BizApp so we suspect it's caused by some kind of RN infra issue.

Unfortunately the issue can't be always reproed so we can't do a biset.

Based on mdvacca's initial assessment, the original diff D34552175 (6a4e905e3a) was landed right before version 348.0.0.0.114 was created which aligns with the timeline of the crash (see attached task).

We've also tried to backout the diff locally and tested for multiple Pages and seems the crash disappears - so we decided to give it a shot and see if this could mitigate the crash on RC.

Reviewed By: mdvacca

Differential Revision: D34632014

fbshipit-source-id: ce589d6e7d2293befc3615ecb87a9fc09f6a33f4
2022-03-03 19:51:36 -08:00
Joshua Gross 6abbef1200 CustomEvent and Event polyfills for React Native
Summary:
In preparation for upcoming changes, it is useful / necessary to have a CustomEvent and Event polyfill for React Native.

In browser environments, both of those are expected to be accessible in the global scope, so we do the same here.

Changelog: [Added][JS] Event and CustomEvent W3C-compatible polyfills

Reviewed By: necolas

Differential Revision: D34462447

fbshipit-source-id: 5efdad6f24c268a6d248d4e3351fc96715ee3fdf
2022-03-02 11:39:00 -08:00
Ramanpreet Nara 922219a852 Fix ScrollView Static ViewConfigs
Summary:
This should fix the SVC === NVC check for ScrollView and AndroidHorizontalScrollView.

Changelog: [Internal]

Reviewed By: p-sun

Differential Revision: D34542873

fbshipit-source-id: 7e25d3a6c1417877b64501981652d767ba2eda48
2022-03-01 16:27:52 -08:00
Ramanpreet Nara 5c8d95b4e2 Make remaining FBiOS/FB4A components export SVCs via __INTERNAL_VIEW_CONFIG
Summary:
The static ViewConfig codegen generates the static ViewConfig inside the JavaScript module [under an exported constant](a0a2958cda/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js (L127-L129)):

```
export const __INTERNAL_VIEW_CONFIG = VIEW_CONFIG;
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
```

This exported constant allows us to build a test page that requires all components, and compares their static ViewConfigs with their native ViewConfig.

This diff makes components with hand-written static ViewConfigs also export this __INTERNAL_VIEW_CONFIG const.

Changelog: [Internal]

Reviewed By: p-sun

Differential Revision: D34541868

fbshipit-source-id: f55dd3f1b161038baaf84cbbf75c1f4041c34647
2022-03-01 16:27:52 -08:00
Kacie Bawiec 6a4e905e3a React Native sync for revisions 4de99b3...1780659
Summary:
This sync includes the following changes:
- **[17806594c](https://github.com/facebook/react/commit/17806594c )**: Move createRoot/hydrateRoot to react-dom/client ([#23385](https://github.com/facebook/react/pull/23385)) //<Sebastian Markbåge>//
- **[75662d6a7](https://github.com/facebook/react/commit/75662d6a7 )**: Remove hacky stream.locked check, declare as byte stream instead ([#23387](https://github.com/facebook/react/pull/23387)) //<Sebastian Markbåge>//
- **[a82ef6d40](https://github.com/facebook/react/commit/a82ef6d40 )**: Add back skipUnmountedBoundaries flag only for www ([#23383](https://github.com/facebook/react/pull/23383)) //<Andrew Clark>//
- **[f468816ef](https://github.com/facebook/react/commit/f468816ef )**: Fix false positive hydration warnings ([#23364](https://github.com/facebook/react/pull/23364)) //<Andrew Clark>//
- **[5d08a24c2](https://github.com/facebook/react/commit/5d08a24c2 )**: useId: Use 'H' to separate main id from hook index ([#23363](https://github.com/facebook/react/pull/23363)) //<Andrew Clark>//
- **[3a60844a0](https://github.com/facebook/react/commit/3a60844a0 )**: Update error message for suspending at sync priority ([#23361](https://github.com/facebook/react/pull/23361)) //<Andrew Clark>//
- **[efe4121ee](https://github.com/facebook/react/commit/efe4121ee )**: Add : to beginning and end of every useId ([#23360](https://github.com/facebook/react/pull/23360)) //<Andrew Clark>//
- **[42f15b324](https://github.com/facebook/react/commit/42f15b324 )**: [DevTools][Transition Tracing] onTransitionComplete and onTransitionStart implmentation ([#23313](https://github.com/facebook/react/pull/23313)) //<Luna Ruan>//
- **[a5b22155c](https://github.com/facebook/react/commit/a5b22155c )**: Warn if renderSubtreeIntoContainer is called ([#23355](https://github.com/facebook/react/pull/23355)) //<Andrew Clark>//
- **[52c393b5d](https://github.com/facebook/react/commit/52c393b5d )**: Revert to client render on text mismatch ([#23354](https://github.com/facebook/react/pull/23354)) //<Andrew Clark>//
- **[1ad8d8129](https://github.com/facebook/react/commit/1ad8d8129 )**: Remove object-assign polyfill ([#23351](https://github.com/facebook/react/pull/23351)) //<Sebastian Markbåge>//
- **[b3f3da205](https://github.com/facebook/react/commit/b3f3da205 )**: Land warnOnSubscriptionInsideStartTransition flag ([#23353](https://github.com/facebook/react/pull/23353)) //<Andrew Clark>//
- **[990098f88](https://github.com/facebook/react/commit/990098f88 )**: Re-arrange main ReactFeatureFlags module ([#23350](https://github.com/facebook/react/pull/23350)) //<Andrew Clark>//
- **[1f3f6db73](https://github.com/facebook/react/commit/1f3f6db73 )**: Remove createMutableSource from stable exports ([#23352](https://github.com/facebook/react/pull/23352)) //<Andrew Clark>//
- **[587e75930](https://github.com/facebook/react/commit/587e75930 )**: Remove Numeric Fallback of Symbols ([#23348](https://github.com/facebook/react/pull/23348)) //<Sebastian Markbåge>//
- **[40351575d](https://github.com/facebook/react/commit/40351575d )**: Split writeChunk into void and return value ([#23343](https://github.com/facebook/react/pull/23343)) //<Sebastian Markbåge>//
- **[2c693b2de](https://github.com/facebook/react/commit/2c693b2de )**: Re-add reentrancy avoidance ([#23342](https://github.com/facebook/react/pull/23342)) //<Sebastian Markbåge>//
- **[1760b27c0](https://github.com/facebook/react/commit/1760b27c0 )**: Remove ./src/* export from public build ([#23262](https://github.com/facebook/react/pull/23262)) //<Andrew Clark>//
- **[552c067bb](https://github.com/facebook/react/commit/552c067bb )**: Remove public export for unstable-shared-subset.js ([#23261](https://github.com/facebook/react/pull/23261)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 4de99b3...1780659

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii

Differential Revision: D34552175

fbshipit-source-id: f1c831a45f96d335a20c3b4113196e0a42cefc03
2022-03-01 14:40:34 -08:00
Paige Sun 3eae11e72f Migrate dev method codegenNativeComponent to be Bridgeless compatible
Summary: Changelog: [Internal] Migrate dev method codegenNativeComponent to be Bridgeless compatible

Reviewed By: RSNara

Differential Revision: D34513074

fbshipit-source-id: d71fbf066453ac8c407d0cf41c2dc7fa80c87688
2022-03-01 13:30:55 -08:00
Mo Wang 46bc521513 fix the crash caused by nil partialLoadHandler
Summary:
## Problem
the partialLoadHandler is nil on line 338 of RCTImageLoader, therefore, if there is a cached image, it would crash on line 495.

## Change
Check if partialLoadHandler is nil on line 495 to prevent the crash

Changelog: [iOS][Changed] - fix the crash caused by nil partialLoadHandler

Reviewed By: appden

Differential Revision: D34544090

fbshipit-source-id: f9965700e529c5add1e25867a3772c053447d99a
2022-03-01 00:25:02 -08:00
Rubén Norte 9d1400a1ef Add annotation to report the use of concurrent root in TTRC
Summary:
Annotate use of `ConcurrentRoot` in React in performance logger.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D34453147

fbshipit-source-id: 813a58ae964e5ae4ddf806a30597ee39d315e800
2022-02-28 19:30:41 -08:00
Gabriel Donadel Dall'Agnol e139ef0de8 chore: Add comments explaining the existence of NativeDatePickerAndroid (#33159)
Summary:
This PR adds comments explaining the reason why the `NativeDatePickerAndroid.js` file was kept when removing `DatePickerAndroid`(7a770526c6 ) in order to prevent people from trying to delete it, as this file has no references in the Github repo

## Changelog

[Internal] [Added] - Add comments explaining the existence of NativeDatePickerAndroid

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

Test Plan: Ensure builds are still working correctly, although this just adds a comment

Reviewed By: cortinico

Differential Revision: D34487638

Pulled By: lunaleaps

fbshipit-source-id: 42cb7331e98d69ff2f69f19bfbb2e65c063120f7
2022-02-28 06:25:20 -08:00
Mo Wang 189c2c8958 Synchronously render cached images
Summary:
## Problem
Previously the RN Image render the cached images asynchronously (line 555 and 594 prior to the change), which caused the images to render at least a frame later than the adjacent components.

## Change
In this change, we call partialLoadHandler with the cached image synchronously on the main thread.

Changelog: [iOS][Changed] - Synchronously render cached images

Reviewed By: p-sun

Differential Revision: D34487673

fbshipit-source-id: 0600c2fa5f7a1eca71b8582bbe968694cf211468
2022-02-25 19:38:18 -08:00
jonathanmos 8d50bf1133 Fix Switch causing RetryableMountingLayerException (#32602)
Summary:
Added a null check to native.value in Switch to fix regression from RN 66 -> stuck operation in mViewCommandOperations list in Android Release on initial layout of a screen with Switch component. If approved, please incorporate this fix into an RN 66 release.

## Changelog
[Android][Fixed] - Added a null check to native.value in Switch to fix https://github.com/facebook/react-native/issues/32594

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

Test Plan: To reproduce, put a log in UIViewOperationQueue in dispatchViewUpdates you can see that the RetryableMountingException is no longer thrown for a screen with the Switch component on Android Release. As a result, mViewCommandOperations no longer has a stuck operation on initial layout.

Reviewed By: charlesbdudley

Differential Revision: D34397788

Pulled By: lunaleaps

fbshipit-source-id: 1cee3516fb987942dfa50ad1f2d11c965a947f05
2022-02-24 17:46:41 -08:00
Dave McCabe f035f9e6bb React Native sync for revisions 27b5699...4de99b3
Summary:
This sync includes the following changes:
- **[4de99b3ca](https://github.com/facebook/react/commit/4de99b3ca )**: fix getSnapshot warning when a selector returns NaN ([#23333](https://github.com/facebook/react/pull/23333)) //<OGURA Daiki>//
- **[40eaa22d9](https://github.com/facebook/react/commit/40eaa22d9 )**: Remove dependency on Offscreen Fiber updateQueue for React Cache ([#23229](https://github.com/facebook/react/pull/23229)) //<Luna Ruan>//
- **[caf6d4707](https://github.com/facebook/react/commit/caf6d4707 )**: Enable enableCache on Test Renderer native ([#23314](https://github.com/facebook/react/pull/23314)) //<David McCabe>//
- **[419ccc2b1](https://github.com/facebook/react/commit/419ccc2b1 )**: Land skipUnmountedBoundaries experiment ([#23322](https://github.com/facebook/react/pull/23322)) //<Andrew Clark>//
- **[54f785bc5](https://github.com/facebook/react/commit/54f785bc5 )**: Disallow comments as DOM containers for createRoot ([#23321](https://github.com/facebook/react/pull/23321)) //<Andrew Clark>//
- **[e9aa9592c](https://github.com/facebook/react/commit/e9aa9592c )**: change ReactBatchConfig.transition //<Luna Ruan>//
- **[51c8411d9](https://github.com/facebook/react/commit/51c8411d9 )**: Log a recoverable error whenever hydration fails ([#23319](https://github.com/facebook/react/pull/23319)) //<Andrew Clark>//
- **[79ed5e18f](https://github.com/facebook/react/commit/79ed5e18f )**: Delete vestigial RetryAfterError logic ([#23312](https://github.com/facebook/react/pull/23312)) //<Andrew Clark>//
- **[80059bb73](https://github.com/facebook/react/commit/80059bb73 )**: Switch to client rendering if root receives update ([#23309](https://github.com/facebook/react/pull/23309)) //<Andrew Clark>//
- **[f7f7ed089](https://github.com/facebook/react/commit/f7f7ed089 )**: Allow suspending in the shell during hydration ([#23304](https://github.com/facebook/react/pull/23304)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 27b5699...4de99b3

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii

Differential Revision: D34399162

fbshipit-source-id: 5c49e2bdcf63eb6a601cfa6a4e4b8f2e1f83e2dd
2022-02-23 19:56:24 -08:00