Commit Graph

28233 Commits

Author SHA1 Message Date
Alex Danoff 3460ff5d04 W3CPointerEvents: include screen coordinates in pointer events (#38222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38222

Changelog: [Android] [Fixed] - W3CPointerEvents: include screen coordinates in pointer events

The [spec](https://www.w3.org/TR/uievents/#idl-mouseevent) says there should be properties on mouse events (and hence pointer events) indicating the screen coordinates of the event (i.e. coords relative to screen of the device).

This change adds those properties.

Reviewed By: javache

Differential Revision: D47162962

fbshipit-source-id: 5bb9780882459b3550bbac792b7d7cf9f5c10860
2023-07-06 10:26:42 -07:00
Alex Danoff 5a57c0bf3a W3CPointerEvents: fix unintentional shallow copy of coordinates (#38201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38201

Changelog: [Android] [Internal] - W3CPointerEvents: fix unintentional shallow copy of coordinates

When normalizing pointer event state, we previously only made a shallow copy and thus unintentionally modified the coordinate values in the original event state. This change fixes the issue by creating new coordinate arrays for the normalized event state instead of reusing the existing ones.

Reviewed By: javache

Differential Revision: D47230953

fbshipit-source-id: b29118c1ec32cd80fc0f05b2a55f283ef060f244
2023-07-06 10:26:42 -07:00
Alex Danoff 2bd4429365 W3CPointerEvents: include modifier key properties in Android pointer events (#38197)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38197

Changelog: [Android] [Fixed] - W3CPointerEvents: include modifier key properties in Android pointer events

The [spec](https://www.w3.org/TR/uievents/#idl-mouseevent) says there should be properties on mouse events (and hence pointer events) indicating whether ctrl, alt, shift, and/or meta are pressed during the event.

This change adds those properties.

Reviewed By: javache

Differential Revision: D47162963

fbshipit-source-id: fa76795217c08ef410fbc5467e9547074b47f3f7
2023-07-06 10:26:42 -07:00
Pieter De Baets 0f393a50f7 Improve docs of onResponderGrant and expose via Pressability (#38195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38195

`onResponderGrant`'s return value drives the `blockNativeResponder` value for the `setIsJSResponder` native callback. On Android this is used to call `requestDisallowInterceptTouchEvent`, which can be used to prevent a scrollview from activating while another responder is active.

Changelog: [Improved] Exposed ability to block native responder in Pressability. Pressables using `cancelable={false}` will now prevent scrolling and other native gestures from activating.

Reviewed By: yungsters

Differential Revision: D47225928

fbshipit-source-id: 27f1c677436da3add301ecdcda6b018b9038829e
2023-07-06 10:09:32 -07:00
Moti Zilberman af73a75c21 Ignore more files/packages by default in LogBox (#38217)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38217

Marks more filename patterns as "internal call sites" which has the effect of collapsing them by default in LogBox (and skipping them for the purpose of providing a code frame).

Changelog: [General][Fixed] Hide Babel helpers and other core files from LogBox stack traces by default

Reviewed By: cortinico, huntie

Differential Revision: D47230876

fbshipit-source-id: fe2d59d975c61cbdfd7b8da42288e284f3ab0739
2023-07-06 09:20:40 -07:00
trashcoder ff40138c76 Update globals.d.ts for Blob.slice() contentType declaration (#38163)
Summary:
For the contentType Parameter of the method slice in Class Blob which was fixed for
https://github.com/facebook/react-native/pull/38078
 the typescript declaration is missing.

## Changelog:
[GENERAL] [ADDED] - Added contentType parameter to Blob declaration

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan: I ran yarn run test-typescript and check with Webstorm and VSCode.

Reviewed By: rshest

Differential Revision: D47228992

Pulled By: javache

fbshipit-source-id: fd767bb47c5e64657bfafba4c84d1d8671857109
2023-07-06 09:01:01 -07:00
Intl Scheduler f6c91bf1b9 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907913365516
Sandcastle Job Instance ID: 9007200240486450
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47258622

fbshipit-source-id: 0c864ec26291a8cf3bca3de33264b852c04cde8e
2023-07-06 04:32:26 -07:00
Saad Najmi 62e9faefd5 Remove deprecated uses of UIActivityIndicatorViewStyle (#38208)
Summary:
Super simple change to replace some deprecated ENUM values with the correct one, now that we're on iOS 13.0+.

From `UIActivityIndicator.h`:
```
typedef NS_ENUM(NSInteger, UIActivityIndicatorViewStyle) {
    UIActivityIndicatorViewStyleMedium  API_AVAILABLE(ios(13.0), tvos(13.0)) = 100,
    UIActivityIndicatorViewStyleLarge   API_AVAILABLE(ios(13.0), tvos(13.0)) = 101,

    UIActivityIndicatorViewStyleWhiteLarge API_DEPRECATED_WITH_REPLACEMENT("UIActivityIndicatorViewStyleLarge", ios(2.0, 13.0), tvos(9.0, 13.0)) = 0,
    UIActivityIndicatorViewStyleWhite API_DEPRECATED_WITH_REPLACEMENT("UIActivityIndicatorViewStyleMedium", ios(2.0, 13.0), tvos(9.0, 13.0)) = 1,
    UIActivityIndicatorViewStyleGray API_DEPRECATED_WITH_REPLACEMENT("UIActivityIndicatorViewStyleMedium", ios(2.0, 13.0)) API_UNAVAILABLE(tvos) = 2,
};
```

## Changelog:

[IOS] [CHANGED] - Remove deprecated uses of UIActivityIndicatorViewStyle

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

Test Plan: CI should pass

Reviewed By: cipolleschi

Differential Revision: D47254035

Pulled By: rshest

fbshipit-source-id: 6d3270899e8d52611d91c777f324c3c6f0c520be
2023-07-06 03:19:58 -07:00
fergusean 28f4ebab8a fix: repairs $EXTRA_COMPILER_ARGS error with multiple args (#38147)
Summary:
Fixes a regression added [on merge of https://github.com/facebook/react-native/issues/37531](https://github.com/facebook/react-native/commit/260bcf7f1bf78022872eb2f40f33fb552a414809#diff-16a358d6a9dea8469bfdb899d0990df1c32b8c3b1149c86685bec81f50bd24beR179) (though oddly I don't see it in [https://github.com/facebook/react-native/issues/37531's diff](https://github.com/facebook/react-native/pull/37531/files#diff-16a358d6a9dea8469bfdb899d0990df1c32b8c3b1149c86685bec81f50bd24beR179), so perhaps added during conflict resolution?) where multiple arguments in `$EXTRA_COMPILER_ARGS` are now incorrectly wrapped in quotes, including RN's own sourcemap support:

```
runner@SeansMacBookGo sampleapp % /Users/runner/builds/y_x6gsp4/0/sampleapp/ios/Pods/hermes-engine/destroot/bin/hermesc -emit-binary -max-diagnostic-width=80 '-O -output-source-map' -out /Users/runner/builds/y_x6gsp4/0/sampleapp/ios/build/derived-data/Build/Intermediates.noindex/ArchiveIntermediates/sampleapp/BuildProductsPath/Release-iphoneos/sampleapp.app/main.jsbundle /Users/runner/builds/y_x6gsp4/0/sampleapp/ios/build/derived-data/Build/Intermediates.noindex/ArchiveIntermediates/sampleapp/BuildProductsPath/Release-iphoneos/main.jsbundle
hermesc: Unknown command line argument '-O -output-source-map'.  Try: '/Users/runner/builds/y_x6gsp4/0/sampleapp/ios/Pods/hermes-engine/destroot/bin/hermesc -help'
hermesc: Did you mean '-output-source-map'?
```

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS] [FIXED] - Fix build error when there are multiple EXTRA_COMPILER_ARGS

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

Test Plan: Removing the quotes and running the command results a successful run of `hermesc` (exit code 0 and the expected files produced).

Reviewed By: rshest

Differential Revision: D47254412

Pulled By: cipolleschi

fbshipit-source-id: 96b71bb05c7a6939088816e76a9a2d02e89ed768
2023-07-06 02:50:51 -07:00
Nicola Corti 86b5b4cc34 Compile hermes-engine with -DHERMES_ENABLE_DEBUGGER=False on Release (#38212)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38212

This mirrors the same logic that the Hermes team has on facebook/hermes.
Practically, we want to pass the CMake config flag `HERMES_ENABLE_DEBUGGER=False` only for Release
so that their CMake build is configured correctly.

Their build always enables the Debugger and allows us to selectively turn it off only for release
builds.

More context: https://github.com/facebook/hermes/commit/eabf5fcd25

Changelog:
[Internal] [Changed] - Compile hermes-engine with -DHERMES_ENABLE_DEBUGGER=False on Release

Reviewed By: cipolleschi

Differential Revision: D47252735

fbshipit-source-id: 9b5cd801dea3b540a3f80b0d0975e05984f1d9b9
2023-07-06 02:40:45 -07:00
evelant 58adc5e4b9 Fix build failure on iOS with pnpm and use_frameworks! (#38158)
Summary:
Fix build failure on iOS with pnpm and use_frameworks! due to cocoapods copying symlinked headers to wrong paths

When using pnpm all packages are symlinked to node_modules/.pnpm to prevent phantom dependency resolution. This causes react-native iOS build to fail because Cocoapods copies headers to incorrect destinations when they're behind symlinks. The fix resolves absolute paths to the header_mappings_dir at pod install time. With absolute paths cocoapods copies the headers correctly.

This commit also adds a few missing header search paths in use_frameworks! mode.

Fixes https://github.com/facebook/react-native/issues/38140

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[IOS] [FIXED] - Build failure with pnpm and use_frameworks! due to incorrect header paths

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan:
1. `pnpm pnpx react-native@latest init AwesomeProject`
2. `cd AwesomeProject`
3. `rm -rf node_modules yarn.lock`
4. `mkdir patches`
5. copy [react-native@0.72.1.patch](https://github.com/facebook/react-native/files/11937570/react-native%400.72.1.patch) to `patches/`
6. Add patch to package.json
```
"pnpm": {
    "patchedDependencies": {
        "react-native@0.72.1": "patches/react-native@0.72.1.patch"
    }
}
```
7. `pnpm install`
8. `cd ios`
9. `NO_FLIPPER=1 USE_FRAMEWORKS=static pod install`
10. `cd ..`
11. `pnpm react-native run-ios`

Hopefully an automated test of building with `pnpm` can be added to CI. I don't know how to make that happen, hopefully someone at facebook can do it.

Reviewed By: dmytrorykun

Differential Revision: D47211946

Pulled By: cipolleschi

fbshipit-source-id: 87640bd3f32f023c43291213b5291a7b990d7e1f
2023-07-06 02:18:38 -07:00
Matt Blagden 41477c898c Enable debugging in debug build (#38205)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38205

Enable the preprocessor flag to allow debugging when in a debug build. This flag influences the Hermes headers included in the inspector, and causes them to include the debugging functionality.

Changelog:
    [General][Fixed] - Re-enabled debugging for debug builds

Reviewed By: lunaleaps, cortinico

Differential Revision: D47243235

fbshipit-source-id: 7982c69ab554335a9ad985394e4416ed69831137
2023-07-06 00:44:13 -07:00
Ramanpreet Nara 5f84d7338f Bridgeless mode: Attach bridge/bridgeless apis to interop modules (#38202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38202

## Context
Native modules can synthesize these bridge/bridgeless-agnostic abstractions:
- viewRegistry_DEPRECATED
- bundleManager
- callableJSModules
- moduleRegistry

## The Problem
The TurboModule interop layer wasn't attaching these abstractions to legacy modules.

## The Issue
In Bridgeless mode, the React instance attaches these abstractions to **all** modules, by implementing TurboModuleManagerDelegate.

But, the TurboModuleManager creates legacy modules without calling into the TurboModuleManagerDelegate. So, legacy modules never had these abstractions attached.

## The Fix
Move the attachment logic to within TurboModuleManager.

Changelog: [Internal]

Reviewed By: dmytrorykun

Differential Revision: D47074304

fbshipit-source-id: 87408106c00db8011740068ac0bd7dacd6b5ff81
2023-07-05 15:00:36 -07:00
Ramanpreet Nara 8ab233d7b7 Migrate TurboModule system off RCTTurboModuleEnabled() flag (#38203)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38203

The TurboModule system should just assume that RCTTurboModuleEnabled() is true.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D47074303

fbshipit-source-id: 7b360ff10966d4b20206231f4200f3f474ddff8f
2023-07-05 15:00:36 -07:00
John Ward 294b1b5a62 Remove extra semis in RN (#38068)
Summary:
X-link: https://github.com/facebook/hermes/pull/1037

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

## Changelog:
[Internal] - Remove extra semis called out by -Wextra-semi compiler flag

Reviewed By: cipolleschi

Differential Revision: D46765640

fbshipit-source-id: 376255d8b3e94620a3a0768ca1cecd5431633136
2023-07-05 11:25:10 -07:00
Nicola Corti 31be96c9b0 Remove duplicate changelog entry (#38177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38177

Closes #36442

Remove duplicated entries for versions 0.68.6 and 0.69.8 in CHANGELOG.md

Changelog:
[Internal] [Changed] - Remove duplicated entries for versions 0.68.6 and 0.69.8 in CHANGELOG.md

Reviewed By: ryancat

Differential Revision: D47208049

fbshipit-source-id: 664ab35018d6eb1ef299c1efe575132ae7f83d9c
2023-07-05 09:32:10 -07:00
Intl Scheduler 1489f0fbf9 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907912806708
Sandcastle Job Instance ID: 4503600614250484
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47230246

fbshipit-source-id: e7ba260f2af936797d9b2747116f2afdc0d13df0
2023-07-05 08:15:49 -07:00
Intl Scheduler 05858c74c3 translation auto-update for i18n/adsmanager.config.json on master
Summary:
Chronos Job Instance ID: 1125907912806708
Sandcastle Job Instance ID: 4503600614250484
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47230238

fbshipit-source-id: 4c0b5c0b481fa2bf0f07642f6fbfbdff21c527a8
2023-07-05 08:15:49 -07:00
Fabrizio Bertoglio 35a1648d0c Fix TextInput vertical alignment issue when using lineHeight prop on iOS (Paper - old arch) (#37465)
Summary:
Adding paragraphStyle.maximumLineHeight to a iOS UITextField displays the text under the UITextField ([ios-screenshot-1][1], [ios-screenshot-2][2], [ios-screenshot-3][3]). The issue reproduces on Storyboard App (iOS) using UITextField and  paragraphStyle.maximumLineHeight. It is not caused by react-native.

[1]: https://user-images.githubusercontent.com/24992535/238834159-566f7eef-ea2d-4fd4-a519-099b0a12046c.png "ios-screenshot-1"
[2]: https://user-images.githubusercontent.com/24992535/238834184-feb454a9-6504-4832-aec8-989f1d027861.png "ios-screenshot-2"
[3]: https://user-images.githubusercontent.com/24992535/238834283-cf572f94-a641-4790-92bf-bbe43afb1443.png "ios-screenshot-3"

The issue is caused by a private class _UITextLayoutFragmentView (a CALayer children of UITextField), which assumes the wrong position when setting the lineHeight. _UITextLayoutFragmentView frame's y coordinates are set to 30, instead of 0 ([react-native-screenshot-1][4], [react-native-screenshot-2][5])
- The _UITextLayoutFragmentView layer does not correctly position
- The issue is caused by adding paragraphStyle.maximumLineHeight to UITextField.attributedText
- The parent UITextField bounds do not correctly position child _UITextLayoutFragmentView.
The issue causes the below text Sdfsd to display under the TextInput.

[4]: https://github.com/Expensify/App/assets/24992535/06726b45-7e35-4003-9fcc-50c8d0dff0f6
[5]: https://github.com/Expensify/App/assets/24992535/d9745d29-8863-4170-bcc3-e78fa7e550d2

I was able to fix the issue and correctly align the private layout view _UITextLayoutFragmentView using the public API RCTUITextField textRectForBound, which allows modifying the UITextField frame and inset.
The solution consists in the following steps, applied only to UITextField with lineHeight prop:

1) set _UITextLayoutFragmentView to vertically align to the top. Required to correctly align _UITextLayoutFragmentView.
2) apply custom bounds with RCTUITextField textRectForBound to align _UITextLayoutFragmentView with the correct y coordinates and height
2) Adjust text baseline to be center aligned

fixes https://github.com/facebook/react-native/issues/28012

## Changelog:

[IOS] [FIXED] - Fix TextInput vertical alignment issue when using lineHeight prop on iOS (Paper - old arch)

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

Test Plan: Extensive test included in the PR comments https://github.com/facebook/react-native/pull/37465#issuecomment-1551459879

Reviewed By: NickGerleman

Differential Revision: D46086661

Pulled By: sammy-SC

fbshipit-source-id: faece0940b153f3525ddcfae9417e943c957a5bf
2023-07-05 05:50:20 -07:00
Intl Scheduler a531e917ba translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907912751083
Sandcastle Job Instance ID: 31525198378795701
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47226504

fbshipit-source-id: ea11c158eb6ac96e5660b699c8072a21faba653b
2023-07-05 04:48:33 -07:00
Riccardo Cipolleschi 5846be0e83 Add Changelog for 0.69.12 and 0.70.12 (#38185)
Summary:
This PR adds the changelog for 0.69.12 and 0.70.12

## Changelog:

[Internal] [Changed] - Add changelog for 0.69.12 and 0.70.12

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

Test Plan: N/A

Reviewed By: Andjeliko

Differential Revision: D47214106

Pulled By: cipolleschi

fbshipit-source-id: 8a623761754f46c34664b5f91208bdb5aad9d989
2023-07-05 04:23:44 -07:00
Intl Scheduler 64b6e7aa38 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907912254733
Sandcastle Job Instance ID: 18014399496370468
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47218009

fbshipit-source-id: 4930388501cd2dfb129dbf12a689c2b00fc6a8ba
2023-07-04 14:31:54 -07:00
trashcoder 9c0441b8a1 Update globals.d.ts for File declaration in Typescript (#38165)
Summary:
In Webstorm or VSCode when using Typescript the declaration of the class "File" is missing. So both IDEs show "File" as error. With this change it fixes the issue https://github.com/facebook/react-native/issues/38061 .

## Changelog:
[GENERAL] [FIXED] Fixed missing File declaration in Typescript global.d.ts
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan:
I ran
`yarn run test-typescript`
with no error

After that i initialized a new react-native project and installed the react-native library with my local changes of global.d.ts. Webstorm and VSCode now find the declaration of "File" and don't show "File" as error and suggest the right parameters.

Reviewed By: rshest

Differential Revision: D47209461

Pulled By: cortinico

fbshipit-source-id: 0884dfe786ea3a5070aa0a487a8e74463c8f1a0f
2023-07-04 09:47:53 -07:00
Intl Scheduler f2d93a3d28 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907911981491
Sandcastle Job Instance ID: 22517999121631956
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47212218

fbshipit-source-id: 51e66bfcacb91db037846d773bc328e09a066e1b
2023-07-04 07:12:44 -07:00
Koichi Nagaoka 0c9c57a9f7 Fix onChangeText not firing when clearing the value of TextInput with multiline=true on iOS (#37958)
Summary:
This fix fixes the TextInput issue in https://github.com/facebook/react-native/issues/37784 with onChangeText not working on iOS only.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [FIXED] - Fix onChangeText not firing when clearing the value of TextInput with multiline=true on iOS

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

Test Plan:
1. Run the repro code given in the issue (https://github.com/facebook/react-native/issues/37784).
2. Verified that onChangeText works after pressing the submit button.
3. Run the repro code from the issue (https://github.com/facebook/react-native/issues/36494) that caused this issue.
4. Verified that issue (https://github.com/facebook/react-native/issues/36494) is not reoccurring.

Reviewed By: rshest

Differential Revision: D47185775

Pulled By: dmytrorykun

fbshipit-source-id: 1a1a6534d6bf8b5bb8cf1090734dd894bab43f82
2023-07-04 06:25:22 -07:00
Lorenzo Sciandra c0b2770dee add 0.71.12 and 0.70.11 changelog (#38182)
Summary:
Adds changelog for new patch.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - add changelog entry for 0.71.12 and 0.70.11

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

Test Plan: N/A

Reviewed By: GijsWeterings

Differential Revision: D47210080

Pulled By: cipolleschi

fbshipit-source-id: d0df8184a0a6f7848d2bf08102329b73bcb67846
2023-07-04 06:15:05 -07:00
Nicola Corti 16201f8be3 Move Flipper integration to a separate Gradle module inside ReactAndroid (#37688)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37688

This moves the `ReactNativeFlipper` classes used to configure Flipper on Android from the template to
a separate Gradle artifact that will be published under the coordinates:
```
com.facebook.react:flipper-integration:0.73.x
```

This reduces the footprint of Flipper on the app template and makes easier for user on 0.73 to migrate
to Kotlin (as they will now have to migrate only 2 files rather than 4).

Changelog:
[Android] [Changed] - Move Flipper integration to a separate Gradle module inside `ReactAndroid`

Reviewed By: huntie

Differential Revision: D46441588

fbshipit-source-id: e197f29b7386b52091b8d38ed09bbd8f74a997df
2023-07-04 06:01:09 -07:00
Gabriel Donadel 0e80fdb1e9 fix: Fix id prop not working on all Touchable components (#38169)
Summary:
This PR fixed the `id` prop to being correctly mapped to `nativeID` on the following components: `TouchableBounce`, `TouchableHighlight`, ` TouchableNativeFeedback`, and `TouchableOpacity`.

Closes https://github.com/facebook/react-native/issues/38117
Follow up of https://github.com/facebook/react-native/pull/34522

## Changelog:

[GENERAL] [FIXED] - Fix `id` prop not working on `TouchableBounce`, `TouchableHighlight`, ` TouchableNativeFeedback`, and `TouchableOpacity`

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

Test Plan: Ensure that the `id` prop android tests pass on CircleCI

Reviewed By: jacdebug

Differential Revision: D47209319

Pulled By: cortinico

fbshipit-source-id: 50cdf0f1113e067aa46d55e4faaff6818509546e
2023-07-04 05:06:32 -07:00
JP ee1cd13db6 iOS: only exclude i386 while using hermes (#38132)
Summary:
- if an existing iOS project specifies `EXCLUDED_ARCHS`, these settings are overwritten by the `react_native_post_install` step as part of the Cocoapods install
- closes https://github.com/facebook/react-native/issues/35544

### Existing Behaviour

- one of the functions called as part of the `react_native_post_install` step is `exclude_i386_architecture_while_using_hermes`
  - see [/packages/react-native/scripts/cocoapods/utils.rb](https://github.com/facebook/react-native/blob/v0.72.1/packages/react-native/scripts/cocoapods/utils.rb#L56-L69)
```
    def self.exclude_i386_architecture_while_using_hermes(installer)
        projects = self.extract_projects(installer)

        # Hermes does not support `i386` architecture
        excluded_archs_default = self.has_pod(installer, 'hermes-engine') ? "i386" : ""

        projects.each do |project|
            project.build_configurations.each do |config|
                config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = excluded_archs_default
            end

            project.save()
        end
    end
```

🐛 **However** 🐛

- this function is currently called regardless of whether or not you are **actually** using Hermes
- this means existing projects that have `EXCLUDED_ARCHS` set, the existing value will be changed either to `"i386"` or a blank string

### Changed Behaviour

- moved the function call inside an `if ReactNativePodsUtils.has_pod(installer, "React-hermes")` block
- `EXCLUDED_ARCHS` should only be modified if needed now

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [FIXED] Only modify EXCLUDED_ARCHS when needed for Hermes

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

Reviewed By: cortinico

Differential Revision: D47149618

Pulled By: cipolleschi

fbshipit-source-id: cffc2a0d4bc35fa4e933d3f4df6ee85e2f5c4486
2023-07-04 03:38:47 -07:00
Nicola Corti f92ed27fa4 Do not directly access RuntimeEnvironment.application in tests (#38159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38159

Accessing `RuntimeEnvironment.application` is deprecated and we should instead use `RuntimeEnvironment.getApplication()`

Changelog:
[Internal] [Changed] - Do not directly access RuntimeEnvironment.application in tests

Reviewed By: rshest

Differential Revision: D47186902

fbshipit-source-id: dc28930570e2991da0ad91311f0402fd73af8214
2023-07-04 03:19:43 -07:00
Intl Scheduler ebc1fe6d53 translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907911888160
Sandcastle Job Instance ID: 22517999121458532
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47203365

fbshipit-source-id: 99e1419cca5258ec2fc512c75b4675fb2c27e842
2023-07-03 21:12:17 -07:00
Sam Zhou ee425cca0d Deploy 0.211.0 to xplat (#38168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38168

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D47202522

fbshipit-source-id: a3c9fddfcdf917bb88006832cc597b31ed4a76d4
2023-07-03 20:26:57 -07:00
Intl Scheduler e64373aa86 translation auto-update for i18n/talk.config.json on master
Summary:
Chronos Job Instance ID: 1125907911705690
Sandcastle Job Instance ID: 18014399495936303
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47202642

fbshipit-source-id: 5d923d36d271cd92d9faedaaa5909716aa3ae978
2023-07-03 18:34:20 -07:00
Intl Scheduler 33ce19d963 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907911705690
Sandcastle Job Instance ID: 18014399495936303
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47202640

fbshipit-source-id: 37cb4c1ec3d99a7410d5a81bcc27429e6d400392
2023-07-03 18:34:20 -07:00
Rubén Norte f193b1774c Enable MutationObserver in RNTester (#38101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38101

This adds a few examples of using `MutationObserver` in React Native to RNTester.

`MutationObserver` isn't yet enabled so these shouldn't be accessible normally for the time being.

Changelog: [internal]

Reviewed By: NickGerleman

Differential Revision: D46149087

fbshipit-source-id: 8374b5915b8474a17a2f2e3277a9f409f6ab8380
2023-07-03 15:34:34 -07:00
Rubén Norte b1040c4e46 Implementation of a subset of MutationObserver (#38100)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38100

This creates an experimental subset of MutationObserver. This will not be available yet and is only compatible with the new React Native architecture. This shouldn't show up in the changelog until we're ready to enable this in some form.

Changelog: [Internal]

## Context

This implements a subset of the `MutationObserver` API (as defined on the Web) for React Native.

This subset allows observing nodes added or removed from the UI tree (at any depth) without modifications in user code. This is not possible at the moment and it's required by some performance logging APIs that rely on observability for tracking.

**This is not intended for general use at the moment**. We will continue experimenting with this API and might change important details about how it works.

## Implementation details

This API is implemented as a native module that registers a commit hook in Fabric. Whenever there's a commit in React Native, we check for nodes added or removed from the shadow tree (compared with the previous committed version).

**This implementation is completely cross-platform.**

This API uses a centralized entity in JS and native to handle registration of observers and dispatch of notifications. The dispatch the notifications for all observers in the same callback so we can easily change the sequencing of events easily (for example, we can change this to use microtasks when they're available in RN).

An important aspect to highlight about this is that we call into JavaScript when executing the commit hooks. **We assume that commit hooks that trigger mutations will always happen in the JS thread**, so it's safe to do so. This was necessary because React nullifies all fields in fiber when they're unmounted, and we're reporting nodes being deleted. If we wait too long to get a reference to the public instances, they become unavailable and this API doesn't work correctly. To avoid this we eagerly get references to these public instances right when mutations are being applied, so it's safe.

## Known limitations

* Only the `childList` and `subtree` options are supported.
* There is a feature flag in React Native to do commits in background threads to avoid having to do that work in JS (including layout). This implementation is NOT compatible with that and we're currently working on removing the background executor permanently.
* Notifications from `MutationObserver` are dispatched as regular JavaScript tasks, not as microtasks, and they don't block rendering/mount/paint. Some consequences of that are:
  * UI changes done in MutationObserver callbacks are not flushed atomically with the changes being observed. This is caused by the lack of microtasks and because Fabric doesn't wait for them to mount commits in the host platform.
  * MutationObserver callbacks cannot reliably set up intersection observers to get a notification for the first paint, as it could have potentially happened already (similar to the previous point).

We are working on infrastructure changes (support for microtasks, blocking paint on microtasks, etc.) to overcome this limitations.

----

Reviewed By: sammy-SC

Differential Revision: D46149086

fbshipit-source-id: be7ba4acd0886d1661a6500d61d2122f34b98b5a
2023-07-03 15:34:34 -07:00
Rubén Norte 2ccde4060e Small cleanups for IntersectionObserver (#38099)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38099

A couple of small cleanups after the bulk of the work for `IntersectionObserver` was already merged.

Changelog: [internal]

Reviewed By: NickGerleman

Differential Revision: D47056943

fbshipit-source-id: 2a6f9062d91da458f8b980f3abcdc9a4ac86389b
2023-07-03 15:34:34 -07:00
Luna Wei 2910f87b58 JestE2E: Add view screenshots
Summary: Changelog: [Internal] - Add e2e snapshot testing for our View examples on rntester

Reviewed By: NickGerleman

Differential Revision: D47073356

fbshipit-source-id: 979d34227a5ae77d2d03636d40617b7ecf44c28e
2023-07-03 13:24:11 -07:00
Nicola Corti bf7b81f3a2 Fix multiple warnings post Kotlin migration (#38156)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38156

As we migrated several files from Java to Kotlin, our build log got really noisy with several compilation warnings.
That's happing as the Kotlin compiler is stricter than the Java one.

Here I've fixed most of them.

Changelog:
[Internal] [Changed] - Fix multiple warnings post Kotlin migration

Reviewed By: rshest

Differential Revision: D47185820

fbshipit-source-id: f49c90b4a6db9892979ea95b404cf427805c6503
2023-07-03 12:20:01 -07:00
Jatin Nagar f90829fb01 converted JavaScriptModuleRegistryTest java file to kotlin (#38143)
Summary:
Helping in [Kotlin-ify React Native tests](https://github.com/facebook/react-native/issues/37708), Converted [react/bridge/JavaScriptModuleRegistryTest.java](https://github.com/facebook/react-native/tree/main/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/bridge/JavaScriptModuleRegistryTest.java) to kotlin file

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [CHANGED] - `JavaScriptModuleRegistryTest.java` file migrated from java to kotlin

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

Test Plan:
Tests should pass
```
./gradlew :packages:react-native:ReactAndroid:test
```

Reviewed By: NickGerleman

Differential Revision: D47164993

Pulled By: mdvacca

fbshipit-source-id: 6aee2bcb2766fc2e6d68f4df272aaafb9c65bdcb
2023-07-03 11:51:42 -07:00
Intl Scheduler b10f0b8a8b translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907911327421
Sandcastle Job Instance ID: 31525198377833807
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47193308

fbshipit-source-id: 7b96b75004d7f2e3fe4aeba0a66f3a496d512a65
2023-07-03 10:44:49 -07:00
Alex Hunt d1882c3056 Remove duplication in rn-tester react-native.config.js file (#37978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37978

Tweaks `react-native.config.js` files to remove duplication. `rn-tester` now references framework-included config from `react-native` (ahead of making config additions to this entry point).

As far as I can tell (from historic diff context), the presence of `packages/rn-tester/react-native.config.js` is a special case, due to the CLI's config discovery algorithm, and this file needs to remain a complete config.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D46859698

fbshipit-source-id: 5d31c6ffe43a364f1f2e7d456a6bc15f900be336
2023-07-03 09:55:11 -07:00
Rob Hogan 971bb81d13 Monorepo Jest - remove now unnecessary Babel registration (#38146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38146

Now that `metro-react-native-babel-transformer` may be loaded from source without transformation, we can remove this workaround / potential footgun.

Jest uses Babel imperatively and doesn't rely on registration (require hooks), so registering within the preprocessor potentially conflicts and has caused problems before. This just tidies up some complexity we don't need.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D47162728

fbshipit-source-id: 06215f9bb7b8e71bcca0429d0bae9f20a22f45a8
2023-07-03 06:58:20 -07:00
Rob Hogan 1202d394a9 Add Babel Flow lib defs to React Native repo (#38145)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38145

Add Babel type definitions ahead of moving `metro-react-native-babel-transformer` under `react-natve`.

These are mostly duplicated from https://github.com/facebook/metro, adapted for RN's naming conventions and lint rules.

Changelog:
[Internal]

Reviewed By: christophpurrer

Differential Revision: D47154206

fbshipit-source-id: a44703f6926507732f2f1c65a17e5d4ac590c724
2023-07-03 06:58:20 -07:00
Intl Scheduler 259a316893 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907910595572
Sandcastle Job Instance ID: 987595037
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47173948

fbshipit-source-id: 0b8415edf595f772153be1990faabb8fbef0b9d2
2023-07-01 23:54:27 -07:00
Intl Scheduler 5957014266 translation auto-update for i18n/instagram.config.json on master
Summary:
Chronos Job Instance ID: 1125907910595572
Sandcastle Job Instance ID: 987595037
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47173950

fbshipit-source-id: 8c9a28a8e20121b74317746f3d01c8c4369a13ca
2023-07-01 23:54:27 -07:00
Intl Scheduler 0958b9b0b6 translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907910549669
Sandcastle Job Instance ID: 18014399495240353
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47173375

fbshipit-source-id: f97a11774474da12c31ba52b46b05f189e717ae0
2023-07-01 20:29:59 -07:00
Intl Scheduler 5262e9bb63 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907910428138
Sandcastle Job Instance ID: 9007200238030275
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47172440

fbshipit-source-id: 3f0f85f09e8bd200f5855e3e8a65e7769e419eea
2023-07-01 14:19:18 -07:00
Intl Scheduler eca0d1231a translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907910091203
Sandcastle Job Instance ID: 4503600612360907
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47170011

fbshipit-source-id: ecead608224885a47f9eb1d90dd8b348ebbcba0f
2023-07-01 04:24:00 -07:00
Nick Gerleman 5008a91029 Disable REACT_NATIVE_DEBUG in gray builds (#38082)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38082

Reviewed By: javache

Differential Revision: D47028243

fbshipit-source-id: 79b3bc2a075bf74fcf4aa197326ec00150167845
2023-06-30 22:18:11 -07:00