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

6935 Коммитов

Автор SHA1 Сообщение Дата
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
Riccardo Cipolleschi 235f168574 Move the `SegmentedComponentIOS` away from React Native Core (#33140)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33140

Pull Request resolved: https://github.com/facebook/metro/pull/776

This Diff moves the `SegmentedComponentIOS` away from the core of React Native to move forward with the Lean Core effort

## Changelog
[General][Removed] - This diff removes the `SegmentedControlIOS` export from React Native. Internally, we are requiring `SegmentedControlIOS` directly now and externally people will have to use the community maintained module (https://github.com/react-native-segmented-control).

Reviewed By: cortinico

Differential Revision: D34304255

fbshipit-source-id: d4e2b0bda56708769603be6f164e6bf89997fd93
2022-02-21 05:23:16 -08:00
David Vacca 05b4570d3f Refactor LayoutAnimation to use ReactNativeFeatureFlags
Summary:
This diff refactors LayoutAnimation to use ReactNativeFeatureFlags.ENABLE_LAYOUT_ANIMATION to enable / disable this feature

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D34349648

fbshipit-source-id: 90d1db6560867e44eeffbf03e5a84edadcdd55f9
2022-02-18 18:23:00 -08:00
David Vacca 33aba77456 Introduce ReactNativeFeatureFlags file to control FeatureFlags in React Native
Summary:
introduce ReactNativeFeatureFlags file to control FeatureFlags in React Native

changelog: [JS][Added] Create new API to configure FeatureFlags in ReactNative

Reviewed By: JoshuaGross

Differential Revision: D34349458

fbshipit-source-id: 73bb3704fc47e950ee1fcefcfaec1a85dfbcef59
2022-02-18 18:23:00 -08:00
Andrei Shikov e912c462eb Add a feature flag to disable Fabric layout animations
Summary:
tsia

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D34340023

fbshipit-source-id: 61956f1819f1f7e10dc2520c444fa5dd305d1363
2022-02-18 08:21:06 -08:00
Amy Lee 16feabf676 Address some RN build warnings
Summary:
Addresses build warnings for some additional compiler flags.

Changelog: [Internal]

Reviewed By: nlutsenko

Differential Revision: D34299822

fbshipit-source-id: d3d873fb600990a869cb0e6fbe9fff4ebc8c5d0e
2022-02-17 19:18:11 -08:00
Moti Zilberman c56754ae39 Add default Instance type and variance to AnimatedComponentType
Summary:
Updates `AnimatedComponentType`'s type arguments to match [`React.AbstractComponent`](https://flow.org/en/docs/react/types/#toc-react-abstractcomponent)'s more closely in [variance](https://flow.org/en/docs/types/generics/#toc-variance-sigils) and defaults (`Instance = mixed`).

Changelog: [Internal]

Reviewed By: genkikondo

Differential Revision: D34254030

fbshipit-source-id: 622d1e4ecbc493bba8ec857454dd28583b677d78
2022-02-17 13:10:58 -08:00
Andrei Shikov aca9037813 React Native sync for revisions a3bde79...27b5699
Summary:
This sync includes the following changes:
- **[27b569969](https://github.com/facebook/react/commit/27b569969 )**: Simplify cache pool contexts ([#23280](https://github.com/facebook/react/pull/23280)) //<Andrew Clark>//
- **[1fb0d0687](https://github.com/facebook/react/commit/1fb0d0687 )**: [Devtools][Transition Tracing] Add Transition callbacks to createRoot ([#23276](https://github.com/facebook/react/pull/23276)) //<Luna Ruan>//
- **[a6987bee7](https://github.com/facebook/react/commit/a6987bee7 )**: add <TracingMarker> component boilerplate ([#23275](https://github.com/facebook/react/pull/23275)) //<Luna Ruan>//
- **[796fff548](https://github.com/facebook/react/commit/796fff548 )**: Allow suspending outside a Suspense boundary ([#23267](https://github.com/facebook/react/pull/23267)) //<Andrew Clark>//
- **[64223fed8](https://github.com/facebook/react/commit/64223fed8 )**: Fix: Multiple hydration errors in same render ([#23273](https://github.com/facebook/react/pull/23273)) //<Andrew Clark>//
- **[efd8f6442](https://github.com/facebook/react/commit/efd8f6442 )**: Resolve default onRecoverableError at root init ([#23264](https://github.com/facebook/react/pull/23264)) //<Andrew Clark>//
- **[e0af1aabe](https://github.com/facebook/react/commit/e0af1aabe )**: Fix wrong context argument to `apply` //<Andrew Clark>//
- **[9b5e0517b](https://github.com/facebook/react/commit/9b5e0517b )**: Remove deprecated wildcard folder mapping ([#23256](https://github.com/facebook/react/pull/23256)) //<Andrew Clark>//
- **[274b9fb16](https://github.com/facebook/react/commit/274b9fb16 )**: Remove path resolution from internal forks plugin ([#23255](https://github.com/facebook/react/pull/23255)) //<Andrew Clark>//

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

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii, kacieb

Differential Revision: D34241986

fbshipit-source-id: f6ab62df2a918728864283b4f13201275eb3b8a3
2022-02-17 12:56:13 -08:00
Moti Zilberman 35800962c1 Deprecate nonstandard Promise.prototype.done
Summary:
Deprecates the nonstandard `Promise.prototype.done` method. This also removes one call site within React Native itself that relied on this method.

As part of this we are also removing React Native's custom Flow definition for `Promise` in favour of the standard one built into Flow. This will flag uses of `done` as type errors for anyone using the default app template's `.flowconfig`.

In a future release of React Native, we will remove the `done` method from the built-in `Promise` polyfill.

Changelog:
[General][Deprecated] - Deprecate the Promise.prototype.done method and log a warning when it's called in development.

Reviewed By: yungsters

Differential Revision: D34222667

fbshipit-source-id: 4b9708ac20c45b3966fdb93e883ab7f8d80017c1
2022-02-17 09:15:03 -08:00
fabriziobertoglio1987 b2e625a517 Switch component does not disable click (#33070)
Summary:
This issue fixes https://github.com/facebook/react-native/issues/30944 fixes https://github.com/facebook/react-native/issues/30840 ([Test Case 7.1][7.1], [Test Case 7.3][7.3], [Test Case 7.5][7.5]) which affects Platform Android. Previous PR https://github.com/facebook/react-native/pull/31199.
The issue is caused by the missing prop `accessibilityState` in the Switch component.

The solution consists of passing the accessibilityState to the `AndroidSwitchNativeComponent` component as previously implemented in other components (for example, [Button][8]).

Relevant discussions https://github.com/facebook/react-native/issues/30840#issuecomment-780981316 and https://github.com/facebook/react-native/pull/31001/files#r578827409.

[8]: https://github.com/facebook/react-native/pull/31001/files#diff-4f225d043edf4cf5b8288285b6a957e2187fc0242f240bde396e41c4c25e4124R281-R289

The solution proposed in this pull request consists of:
1. Passing `accessibilityState` to the `AndroidSwitchNativeComponent`
2. If the value of prop `accessibilityState.disabled` is different from the prop `disabled`, the prop `disabled` over-rides the `accessibilityState.disabled` value.

For example:
```jsx
<Switch disabled={true} accessibilityState={{disabled: false}} />
````
becomes:
````jsx
<Switch disabled={true} accessibilityState={{disabled: true}} />
````

## 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] - Switch Component doesn't disable click functionality when disabled

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

Test Plan:
[1]. Switch has `disabled` and `accessibilityState={{disabled: false}}`
[2]. Switch has `disabled`
[3]. Switch has `accessibilityState={{disabled: true}}`
[4]. Switch has `accessibilityState={{disabled:false}}`
[5]. Switch has `disabled={false}`  and `accessibilityState={{disabled:true}}`
7. Test Cases on the main branch
[7.1]. Switch has `disabled` and `accessibilityState={{disabled: false}}`
[7.3] Switch has `accessibilityState={{disabled: true}}`
[7.5] Switch has `disabled={false}`  and `accessibilityState={{disabled:true}}`

[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031168488
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031168868
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031169167
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031170883
[5]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031170989
[7.1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031171560
[7.3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031172605
[7.5]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031173437

Reviewed By: kacieb

Differential Revision: D34189484

Pulled By: blavalla

fbshipit-source-id: 8ea9221a5641d05c20d0309abdb3f0d02c569f2f
2022-02-16 15:02:59 -08:00
Paige Sun af793dd14d Don't error to Logview APIs not supported by new architecture that are expected to happen often
Summary:
Changelog: [Internal]

In the new architecture, when an interop component is being called, log instead of warn/error, since at the moment we expect this to happen often.

Reviewed By: fkgozali

Differential Revision: D34252666

fbshipit-source-id: 971156a1cd9ef9b788f677c49fa2c55bd86ad4fa
2022-02-16 14:18:08 -08:00
fabriziobertoglio1987 7b2d8178b1 Text Component does not announce disabled and disables click functionality when disabled (#33076)
Summary:
This issue fixes https://github.com/facebook/react-native/issues/30937 fixes https://github.com/facebook/react-native/issues/30947 fixes https://github.com/facebook/react-native/issues/30840 ([Test Case 7.1][7.1], [Test Case 7.3][7.3], [Test Case 7.5][7.5]) .
The issue is caused by:

1) The missing javascript logic on the `accessibilityState` in the Text component 6ab7ab34e5 (as previously implemented in [Button][20]).
2) The missing setter for prop `accessible` in `ReactTextAnchorViewManager` 17095c6615 (More information in previous PR https://github.com/facebook/react-native/pull/31252)

Related PR https://github.com/facebook/react-native/pull/33070 PR https://github.com/callstack/react-native-slider/pull/354

[20]: https://github.com/facebook/react-native/pull/31001/files#diff-4f225d043edf4cf5b8288285b6a957e2187fc0242f240bde396e41c4c25e4124R281-R289

## Changelog

[Android] [Fixed] - Text Component does not announce disabled and disables click functionality when disabled

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

Test Plan:
[1]. Text has `disabled` and `accessibilityState={{disabled: false}}` ([link][1])
[2]. Text has `disabled` ([link][2])
[3]. Text has `accessibilityState={{disabled: true}}` ([link][3])
[4]. Text has `accessibilityState={{disabled:false}}` ([link][4])
[5]. Text has `disabled={false}`  and `accessibilityState={{disabled:true}}` ([link][5])
[6]. Text has `accessibilityState={{disabled:true}}` and method `setAccessible` in `ReactTextAnchorViewManager` (tested on commit [b4cd8][10]) ([link][6])
7. Test Cases on the main branch
[7.1]. Text has `disabled` and `accessibilityState={{disabled: false}}` ([link][7.1])
[7.3] Text has `accessibilityState={{disabled: true}}` ([link][7.3])
[7.5] Text has `disabled={false}`  and `accessibilityState={{disabled:true}}` ([link][7.5])
[7.6] Text has `onPress callback` and `accessibilityState={{disabled: true}}` ([link][7.6])
[7.7] Text has `accessibilityState={{disabled:true}}` and no method `setAccessible` in `ReactTextAnchorViewManager` (tested on commit [c4f98dd][11]) ([link][7.7])

[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033465424
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033465631
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033465706
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033465755
[5]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033465813
[6]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1038473783
[7.1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033465874
[7.3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033465961
[7.5]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033466018
[7.6]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1033321965
[7.7]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/1#issuecomment-1038471984

[10]: 17095c6615
[11]: 6ab7ab34e5

Reviewed By: blavalla

Differential Revision: D34211793

Pulled By: ShikaSD

fbshipit-source-id: e153fb48c194f5884e30beb9172e66aca7ce1a41
2022-02-15 11:23:11 -08:00
Moti Zilberman 370c65b943 Refactor StyleSheetTypes for (internal) extensibility
Summary: Changelog: [Internal]

Reviewed By: arushikesarwani94

Differential Revision: D34188705

fbshipit-source-id: 017285553f24144f8f7eff3a126a99be6c9b2f25
2022-02-15 08:50:55 -08:00
Moti Zilberman 1814bffcc2 Minor changes to Flow types
Summary: Changelog: [Internal]

Reviewed By: arushikesarwani94

Differential Revision: D34171528

fbshipit-source-id: c3fdc4a8c77731f1f43f0e6d830d172906ed79a1
2022-02-15 08:50:55 -08:00
Paige Sun f8158f8a03 Replace DummyUIManager with BridgelessUIManager. Log errors for deprecated methods in Bridgeless.
Summary:
Changelog: [Internal]

* Rename DummyUIManager to BridgelessUIManager
* Cleanup `RCTVirtualText` & `RCTShimmeringView` since the native changes from T107747313 are already in production, so these two will components always return a viewConfig in prod.

- `console.error` when deprecated Bridge UIManager method are being accessed.
- Make sure new BridgelessUIManager.js has the same method definition as [NativeUIManager.js](https://www.internalfb.com/code/fbsource/[e80c98b816183dcdfde1e81de01ba99aa6e30ed2]/xplat/js/react-native-github/Libraries/ReactNative/NativeUIManager.js?lines=15)

Reviewed By: RSNara

Differential Revision: D34203081

fbshipit-source-id: 99aafc2372b118d0c8cc41f7376e136dabae9bd5
2022-02-14 16:31:15 -08:00
Genki Kondo 47820cba39 Optimize AnimatedColor when setting platform color
Summary:
Before, when we called setValue with a PlatformColor, we unnecessarily called setValue on all component AnimatedValues before updateAnimatedNodeConfig.

This diff also fixes a bug where if we set a PlatformColor as the initial color, calling setValue with a non-PlatformColor would not have any effect. The fix is to reset AnimatedColor.nativeColor to null upon calling setValue.

Changelog:
[Internal] Optimize AnimatedColor when setting platform color

Reviewed By: javache

Differential Revision: D34187540

fbshipit-source-id: a0005d13f392a858d2eade912f2353f67eec1fd9
2022-02-14 11:15:19 -08:00
Genki Kondo 1b3581e245 Export isSupportedProp checks in NativeAnimatedHelper
Summary:
More convenient to call these

Changelog:
[Internal] - Export isSupportedProp checks in NativeAnimatedHelper

Reviewed By: javache

Differential Revision: D34163370

fbshipit-source-id: 9e3b5e5e4a9272f9b807863dfde2c3b0fb13acd8
2022-02-11 09:56:10 -08:00
Moti Zilberman 7374dba6b0 Use ImageSource type in LogBox implementation
Summary:
Changes an internal call site that assumes image assets are `number`s to use the more general `ImageSource` type.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D34076216

fbshipit-source-id: dc0dc0c39982c87c21385828bb3357f9654d029f
2022-02-11 07:04:06 -08:00
Moti Zilberman 83b1975b90 Extend ColorValue Flow type to include numbers
Summary:
Adds `number` to the `ColorValue` union type.

Per our docs, React Native supports specifying colours as RGBA values packed into ints: https://reactnative.dev/docs/colors#color-ints. It looks like this case was missed in D6226807 (da047966e4) when we started typing the `StyleSheet` API with Flow.

Changelog: [General][Fixed] - Support numeric color values in StyleSheet's Flow types

Reviewed By: yungsters

Differential Revision: D34140748

fbshipit-source-id: 5bfe2995a473260926fa3c8b6926bb841615d393
2022-02-11 06:54:24 -08:00
Moti Zilberman 4cd50aee78 Make TimingAnimationConfig read-only
Summary:
Makes `TimingAnimationConfig` read-only, as it's purely an input type.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D34146703

fbshipit-source-id: 77ac7ee0641a869b62e5f95b6a7f711c71e82c7d
2022-02-11 06:02:24 -08:00
Genki Kondo 201f355479 Allow color styles to be animated with native driver
Summary:
Now that animating color styles using native driver is supported on both Android and iOS, add color styles to the allowlist in NativeAnimatedHelper.

Changelog:
[General][Added] - Allow color styles to be animated using native driver

Reviewed By: mdvacca

Differential Revision: D34148038

fbshipit-source-id: c20dc149b805ec691a3936a77ab130fb4477a4c3
2022-02-10 17:41:08 -08:00
Genki Kondo 49f3f47b1e Support color animation with native driver for iOS
Summary:
Adds support for Animated.Color with native driver for iOS. Reads the native config for the rbga channel AnimatedNodes, and on update(), converts the values into a SharedColor.

Followup changes will include support for platform colors.

Ran update_pods: https://www.internalfb.com/intern/wiki/React_Native/Preparing_to_Ship/Open_Source_Pods/

Changelog:
[iOS][Added] - Support running animations with AnimatedColor with native driver

Reviewed By: sammy-SC

Differential Revision: D33860583

fbshipit-source-id: 990ad0f754a21e3939f2cb233bcfa793ef12eb14
2022-02-10 11:18:39 -08:00
Ramanpreet Nara e254073b17 Update ViewConfigIgnore comment
Summary:
This comment was out of date.

Changelog: [Internal]

Reviewed By: sshic

Differential Revision: D34113966

fbshipit-source-id: 0768baa9238736aea26e354792096fea6bb7fcdb
2022-02-10 08:47:22 -08:00
Andrei Shikov 980c52de41 Disable view flattening when the view has event handlers on Android
Summary:
The views with touch event props are currently flattened by Fabric core, as we don't take event listeners into account when calculating whether the view should be flattened. This results in a confusing situation when components with touch event listeners (e.g. `<View onTouchStart={() => {}} /> `) or ones using `PanResponder` are either ignored (iOS) or cause a crash (Android).

This change passes touch event props to C++ layer and uses them to calculate whether the view node should be flattened or not. It also refactors events to be kept as a singular bitset with 32 bit (~`uint32_t`).

Changelog: [Changed][General] Avoid flattening nodes with event props

Reviewed By: sammy-SC

Differential Revision: D34005536

fbshipit-source-id: 96255b389a7bfff4aa208a96fd0c173d9edf1512
2022-02-10 06:07:39 -08:00
Moti Zilberman 159eb0bdf4 Normalize platform colors early
Summary:
Changelog: [Internal]

Fixes `normalizeColor` to always return the normalized color. Previously, when normalization was delegated to `normalizeColorObject`, we would return the *original* color object, which is a bug.

Reviewed By: javache

Differential Revision: D34048595

fbshipit-source-id: 083cbe36be2311ea9cffe8ef61e6a986840aec71
2022-02-10 04:57:47 -08:00
Minsik Kim 1a83dc36ce Fix a broken input for the Korean alphabet in TextInput (#32523)
Summary:
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

Fix https://github.com/facebook/react-native/issues/32503

Updating the attributed text in TextView/TextField while inputting Korean language will break input mechanism of the Korean alphabet. This results unexpected text input.

This PR supersedes the previous fixes: https://github.com/facebook/react-native/issues/19809, https://github.com/facebook/react-native/issues/22546

## 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] [Fixed] - Fix a broken input for the Korean alphabet in TextInput

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

Test Plan: https://user-images.githubusercontent.com/20317121/140013434-1674c391-54d6-4410-b4c1-c633697e639d.mov

Reviewed By: lunaleaps, sammy-SC

Differential Revision: D32470543

Pulled By: philIip

fbshipit-source-id: e7e34bd362fa2ab2ca579103db01ad8d1a891c35
2022-02-09 22:06:55 -08:00
Kacie Bawiec a6c792db0b React Native sync for revisions 51947a1...a3bde79
Summary:
This sync includes the following changes:
- **[a3bde7974](https://github.com/facebook/react/commit/a3bde7974 )**: Exclude react-dom/unstable_testing entry point from stable releases ([#23258](https://github.com/facebook/react/pull/23258)) //<Sebastian Markbåge>//
- **[569093276](https://github.com/facebook/react/commit/569093276 )**: Add onErrorShell Callback ([#23247](https://github.com/facebook/react/pull/23247)) //<Sebastian Markbåge>//
- **[0dedfcc68](https://github.com/facebook/react/commit/0dedfcc68 )**: Update the exports field ([#23257](https://github.com/facebook/react/pull/23257)) //<Sebastian Markbåge>//
- **[9d4e8e84f](https://github.com/facebook/react/commit/9d4e8e84f )**: React Native raw event EventEmitter - intended for app-specific perf listeners and debugging ([#23232](https://github.com/facebook/react/pull/23232)) //<Joshua Gross>//
- **[1dece5235](https://github.com/facebook/react/commit/1dece5235 )**: Add back warning with component stack on Hydration mismatch ([#23241](https://github.com/facebook/react/pull/23241)) //<salazarm>//
- **[cd4eb116c](https://github.com/facebook/react/commit/cd4eb116c )**: Revert "update node.js version for CI ([#23236](https://github.com/facebook/react/pull/23236))" ([#23239](https://github.com/facebook/react/pull/23239)) //<dan>//
- **[1d7728bf9](https://github.com/facebook/react/commit/1d7728bf9 )**: update node.js version for CI ([#23236](https://github.com/facebook/react/pull/23236)) //<sunderls>//
- **[848e802d2](https://github.com/facebook/react/commit/848e802d2 )**: Add onRecoverableError option to hydrateRoot, createRoot ([#23207](https://github.com/facebook/react/pull/23207)) //<Andrew Clark>//
- **[5318971f5](https://github.com/facebook/react/commit/5318971f5 )**: Remove logic for multiple error recovery attempts ([#23227](https://github.com/facebook/react/pull/23227)) //<Andrew Clark>//
- **[3a4462129](https://github.com/facebook/react/commit/3a4462129 )**: Disable avoidThisFallback support in Fizz  ([#23224](https://github.com/facebook/react/pull/23224)) //<salazarm>//
- **[0318ac2c4](https://github.com/facebook/react/commit/0318ac2c4 )**: Revert 4f5449 //<Ricky>//
- **[4f5449eb4](https://github.com/facebook/react/commit/4f5449eb4 )**: Remove main from scheduler `index.js` //<Ricky>//
- **[3f5ff16c1](https://github.com/facebook/react/commit/3f5ff16c1 )**: [Hydration] Fallback to client render if server rendered extra nodes ([#23176](https://github.com/facebook/react/pull/23176)) //<salazarm>//
- **[529dc3ce8](https://github.com/facebook/react/commit/529dc3ce8 )**: Fix context providers in SSR when handling multiple requests ([#23171](https://github.com/facebook/react/pull/23171)) //<Fran Dios>//
- **[505c15c9e](https://github.com/facebook/react/commit/505c15c9e )**: Don't inject timeline hooks unless React supports profiling ([#23151](https://github.com/facebook/react/pull/23151)) //<Brian Vaughn>//
- **[e12a9dfc9](https://github.com/facebook/react/commit/e12a9dfc9 )**: Fix production-only updateSyncExternalStore() crash when doing setState in render ([#23150](https://github.com/facebook/react/pull/23150)) //<Douglas Armstrong>//
- **[e48940255](https://github.com/facebook/react/commit/e48940255 )**: Warn when a callback ref returns a function ([#23145](https://github.com/facebook/react/pull/23145)) //<Dan Abramov>//
- **[d8cfeaf22](https://github.com/facebook/react/commit/d8cfeaf22 )**: Fix context propagation for offscreen/fallback trees ([#23095](https://github.com/facebook/react/pull/23095)) //<Dan Abramov>//
- **[d50482478](https://github.com/facebook/react/commit/d50482478 )**: Enable scheduling profiler flag in react-dom/testing builds ([#23142](https://github.com/facebook/react/pull/23142)) //<Brian Vaughn>//
- **[790b5246f](https://github.com/facebook/react/commit/790b5246f )**: Fix setState ignored in Safari when iframe is added to DOM in the same commit ([#23111](https://github.com/facebook/react/pull/23111)) //<Dan Abramov>//

Changelog:
[General][Changed] - React Native sync for revisions 51947a1...a3bde79

jest_e2e[run_all_tests]

Reviewed By: ShikaSD

Differential Revision: D34108924

fbshipit-source-id: 96acb66c1a7da79d6ef9403490cd0e29ad23d9fb
2022-02-09 11:24:29 -08:00
Ramanpreet Nara 971ba5c26b Re-introduce {eventName}: true ViewConfig ValidAttributes in Static ViewConfigs
Summary:
# Problem
I removed the {eventName}: true entries from ViewConfigs validAttributes in D33303950 (ca5aaa7663). These entries were iOS-only. I removed them to achieve platform-consistency in native ViewConfigs.

This change broke the onLayout event for all React Native components. So, I reverted D33303950 (ca5aaa7663) for native ViewConfigs server-side. But I never got around to reverting D33303950 (ca5aaa7663) for static ViewConfigs.

# Changes
This diff reverts D33303950 (ca5aaa7663) for Static ViewConfigs, with server-side gating.

Now, these {eventName}: true ViewConfig validAttribute will be inserted into all view configs (static and native) **by default**.

Calling RCTDisableViewConfigEventValidAttributes(YES) on iOS will remove {eventName}: true ViewConfig ValidAttributes entries from Static ViewConfigs. (Previously, this method only removed the entries from native ViewConfigs).

https://www.internalfb.com/code/fbsource/[6615b0675bdf]/fbobjc/Apps/Wilde/FBReactModule2/FBReactModuleAPI/FBReactModuleAPI/Exported/FBReactModule.mm?lines=344

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D33933403

fbshipit-source-id: 17823ed99f97d7851f04e5cdab9c95667df13253
2022-02-08 19:11:08 -08:00
Ramanpreet Nara f89ed90a1e Remove the onChange event for Slider
Summary:
The onChange event for slider isn't necessary. Instead, it uses onValueChanged.

## What motivated this change?
After D33933403, the SliderNativeComponent starts generating an onChange: true entry in its static ViewConfig's validAttributes map.

**The Problem:** Slider inherits the onChange event from RCTViewManager. And in RCTViewManager, onChange is defined as an event that doesn't generate a ViewConfig validAttribute:
1. onChange is exported from [RCTViewManager customBubblingEventTypes](https://www.internalfb.com/code/fbsource/[210a214c9da7a847dd8840cae9f8341ed39a2ff6]/xplat/js/react-native-github/React/Views/RCTViewManager.m?lines=99%2C105%2C118)
2. Events exported from customBubblingEventTypes [don't insert into validAttributes](https://www.internalfb.com/code/fbsource/[8237815744b8cf7e38d9cf107a55c015f7b1545b]/xplat/js/react-native-github/React/Views/RCTComponentData.m?lines=393-398).

To summarize:
- onChange isn't used by slider
- onChange generates an onChange: true entry in SVCs
- onChange **doesn't** generate an onChange: true entry in NVC

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D34052662

fbshipit-source-id: 76bfd75c1ecbaa40d33e2b097b1f4458bf200ac2
2022-02-08 19:11:07 -08:00
Ramanpreet Nara 95f950de2a Move validateStaticViewConfigs to RNHostComponentList route
Summary:
This function is only used by the RNHostComponentList route. Let's move it into the route, so that we could keep the StaticViewConfigValidator slim.

This will also allow us to more heavily customize this function for the route.

Changelog: [Internal]

Reviewed By: p-sun

Differential Revision: D34026073

fbshipit-source-id: c3b3a93aed6007fadda2993afa52c28c028f6327
2022-02-08 17:41:06 -08:00
Genki Kondo bb435a2b11 Support AnimatedColor.setValue for platform colors
Summary:
In order to support AnimatedColor.setValue for platform colors, we need to pass the platform color object to the native animated node which will then resolve and apply the color.

Thus, the approach is:
- Add a new API updateAnimatedNodeConfig to NativeAnimatedModule
- [JS] On AnimatedColor.setValue, if the value is a platform color, then we call updateAnimatedNodeConfig
- [Android] We introduce AnimatedNodeWithUpdateableConfig interface with a method updateConfig. On ColorAnimatedNode.java, we use updateConfig to resolve and apply the color

Changelog:
[Internal][Fixed] - Use context from view when resolving platform color

Reviewed By: javache, mdvacca

Differential Revision: D34025193

fbshipit-source-id: 8b368f6b7cb2cf7cebe8b66461cd4185cbadd44c
2022-02-08 16:31:14 -08:00
Joshua Gross 271b9132bc Rename RawEventTelemetryEventEmitter to RawEventEmitter
Summary:
This event listener does nothing by default and will do nothing if (developer) users don't explicitly create some telemetry system for their own app.

This EventEmitter makes that easier but isn't necessarily tied to telemetry, especially since it does nothing at all by default.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D34060116

fbshipit-source-id: 9345a52f502e0225358fdaa1431c052a70fa54ce
2022-02-07 18:19:53 -08:00
Joshua Gross 1f15a64028 Add RawEventTelemetryEventEmitter interface to ReactNativePrivateInterface
Summary:
This will be used from the React JS renderer in a followup PR.

Changelog: [Added][JS] New event telemetry mechanism exposed from JS to supercede the Pressability-specific telemetry mechanism

Reviewed By: ryancat

Differential Revision: D33986916

fbshipit-source-id: 912d0b351869348f0ca6e5f6a882fc0501c2c7f0
2022-02-07 15:44:17 -08:00
Hetan Thakkar 3eddc9abb7 Opacity in TouchableOpacity properly react to state change (#32956)
Summary:
This PR fixes the opacity bug where it fails to properly react to state change. This PR resolves the issue detailed in https://github.com/facebook/react-native/issues/32476

## 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 opacity value in TouchableOpacity

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

Test Plan: The code I added in componentDidUpdate does solve the issue and passes all the test cases

Reviewed By: ryancat

Differential Revision: D33766718

Pulled By: cortinico

fbshipit-source-id: 951bedf22619fc12e66156d0a6074cd8adf1d3eb
2022-02-07 04:23:01 -08:00
Moses DeJong eb19499484 Enable custom sound for local notification in PushNotificationIOS
Summary:
Add soundName property in NativePushNotificationManagerIOS JS module and deliver to native local notification API.
Changelog:
[iOS][Fixed] - Enable custom sound for local push notifications.

Reviewed By: RSNara

Differential Revision: D33898630

fbshipit-source-id: c6362032601f0f6d20479465ce1f0a84c450ea72
2022-02-04 18:16:19 -08:00
Moses DeJong 3633a05299 Invoke registerForRemoteNotifications on main UI thread to avoid error messages in Xcode
Summary:
Invoke registerForRemoteNotifications on main UI thread to avoid error messages in Xcode.

Changelog:
[iOS][Fixed] - Invoke registerForRemoteNotifications on main UI thread.

Reviewed By: philIip

Differential Revision: D33780141

fbshipit-source-id: 64b825dfc15e7ac262e210b90bb334a7e415e402
2022-02-04 18:16:19 -08:00
Ramanpreet Nara b8a2f34dee Make lefthandObjectDiff private to verifyComponentAttributeEquivalence
Summary:
## Rationale
verifyComponentAttributeEquivalence is the legacy check for making sure that Static ViewConfigs match Native ViewConfigs. Eventually, we should just delete this module/check from the codebase.

## Changes
This diff migrates the RNHostComponentViewConfig differences screen to display the ViewConfig differences using the new StaticViewConfigValidator validation result vs the legacy validator's lefthandObjectDiff method.

## Benefits:
- Now, **all the diffing logic** on this route uses the new StaticViewConfigValidator.
- This takes us one step closer towards deleting verifyComponentAttributeEquivalence
- StaticViewConfigValidator [supports ignoring ViewConfig properties](https://fburl.com/code/2it5r7py). Now, the RNHostComponentViewConfig respects these ignores.

Changelog: [Internal]

Reviewed By: p-sun

Differential Revision: D34017602

fbshipit-source-id: 3ad909adcbb95b932a269dd55dd5445834a9cfd4
2022-02-04 16:21:00 -08:00
Moti Zilberman 8c5cacf30e Fix type import style in EventEmitter and Linking
Summary:
Changelog: [Internal]

Fixes some files to use the preferred `import type {Foo}` syntax instead of `import {type Foo}`.

Reviewed By: rh389

Differential Revision: D34001108

fbshipit-source-id: 64675fefa71b6832118eabc60c825c65b87514d9
2022-02-04 05:27:56 -08:00
Moti Zilberman b2f871a6fa Fix crash with SectionList.scrollToLocation and private property munging
Summary:
Changelog:
[General][Fixed] - Remove illegal private property access in VirtualizedSectionList.scrollToLocation

`VirtualizedSectionList.scrollToLocation` internally uses `VirtualizedList`'s `_getFrameMetricsApprox` method. This method is private by convention (since it's `_`-prefixed), but under certain build setups this is also enforced at runtime, so using `scrollToLocation` can throw an error.

Here, we rename this internal method to `__getFrameMetricsApprox` (adding another leading underscore) which opts it out of being treated as private, while still communicating that it's not part of the public API. We also delete the Flow error suppression that masked this issue.

For reference: This convention for private methods (including the double-underscore opt out) has its roots in Facebook's pre-Babel [JSTransform](https://github.com/facebookarchive/jstransform/blob/master/visitors/es6-class-visitors.js) compiler and is implemented in Flow as [`munge_underscores=true`](https://flow.org/en/docs/config/options/#toc-munge-underscores-boolean).

Reviewed By: yungsters

Differential Revision: D33982339

fbshipit-source-id: 498563c59d42549c94fe90d363677d6d3ea35d2d
2022-02-03 17:34:50 -08:00
Moti Zilberman 6584304c10 Make Animated.Interpolation config read-only
Summary:
Changelog:
[General] [Changed] Type the argument of Animated.interpolate as read-only

Reviewed By: javache

Differential Revision: D33950698

fbshipit-source-id: b959d34eb9752358f4a8ba1d290b56c099f535e0
2022-02-03 03:45:23 -08:00
Genki Kondo 1f778014a7 Fix JS animated node value updating when listener is attached
Summary:
The JS-side animated node values were not being updated on AnimatedValue (and thus AnimatedValueXY); however, the native event "onAnimatedValueUpdate" is being handled properly in AnimatedNode. It turns out that single underscore prefixed methods are obfuscated at FB. And thus AnimatedValue._onAnimatedValueUpdateReceived was not getting called. Changing the method name to double underscore as a way to denote "protected" fixes the issue.

Changelog:
[General][Fixed] - JS animated node value updates properly when listener is attached

Reviewed By: yungsters

Differential Revision: D33962038

fbshipit-source-id: c4f60e1f1ccc0cef3e65b89034bdb91376a26416
2022-02-02 19:56:43 -08:00
Tim Yung 3e229f27bc RN: Remove `propTypes` from Image, Text, and TextInput
Summary:
Removes the `propTypes` member from the `Image`, `Text`, and `TextInput` components.

They have been deprecated since React Native v0.66.

Changelog:
[General][Removed] - Removed `Image.propTypes`, `Text.propTypes`, and `TextInput.propTypes`.

Reviewed By: kacieb

Differential Revision: D33750298

fbshipit-source-id: 085f83ad838196bdd531b097b8ce5957270c3ad1
2022-02-01 16:19:01 -08:00