Commit Graph
28353 Commits
Author SHA1 Message Date
Phillip PanandFacebook GitHub Bot 659ecd47ba cleanup isMainQueueExecutionOfConstantToExportDisabled (#38542)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38542

Changelog: [Internal]

never shipped, also seems not relevant after shipping TM

bypass-github-export-checks

Reviewed By: mdvacca, cipolleschi

Differential Revision: D47620463

fbshipit-source-id: 8d9120c6cfec60e2b0b25badc46d4e35b18cfc61
2023-07-22 23:21:22 -07:00
Phillip PanandFacebook GitHub Bot 74feb4cf6c cleanup installJSBindingWithRuntimeExecutor (#38541)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38541

Changelog: [iOS][Breaking]

we can just delete this, replacing the callsite w/ `installJSBindings` is straightforward

Reviewed By: mdvacca, cipolleschi

Differential Revision: D47620027

fbshipit-source-id: 8bb651dc14c6120f06a61326c63b15d1e3d68e9b
2023-07-22 23:21:22 -07:00
Intl SchedulerandFacebook GitHub Bot 89ff3ac6cd translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907927247222
Sandcastle Job Instance ID: 13510799882411639
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47701997

fbshipit-source-id: 7af8badb3e8f6ccfff2dc02bfeeea91f3b7cf436
2023-07-22 21:01:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e6dd22c628 Fix RCTBaseTextInputView for iOS 17
Summary:
The change in D47554161 is breaking builds for iOS 17 as the `addEntriesFromDictionary` method returns void and the code tries to assign the returned value to another dictionary.

## Changelog:
[iOS][Fixed] - Use `addEntriesFromDictionary` properly in RCTBaseTextInputView.

Reviewed By: sammy-SC

Differential Revision: D47696854

fbshipit-source-id: 49e01fdc63b3f0478762994d5cafdceb16830c74
2023-07-22 11:57:46 -07:00
Sam ZhouandFacebook GitHub Bot fc8ad8c659 Deploy 0.213.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D47685569

fbshipit-source-id: 2563ee5268b8225c22fec4c2611d2616a6023712
2023-07-21 17:54:49 -07:00
Nicola CortiandFacebook GitHub Bot ccc50ddd2d Fabric Interop - Properly dispatch integer commands (#38527)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38527

This fixes a bug that got reported for the Fabric Interop for Android with Command dispatching.
(See https://github.com/terrylinla/react-native-sketch-canvas/issues/236)

The problem is that libraries that were receiving commands as ints with:
```
public void receiveCommand(
      int surfaceId, int reactTag, int commandId, Nullable ReadableArray commandArgs) {
```

would not receive command with the Fabric Interop for Android.

The problem is that with Fabric, events are dispatched as string always.
cipolleschi took care of this for iOS, but we realized that the Android part was missing. I'm adding it here.

The logic is, if the event is dispatched as a string that represents a number (say `"42"`) and the user has Fabric Interop enabled, then we dispatch the event as `int` (so libraries will keep on working).

Changelog:
[Android] [Fixed] - Fabric Interop - Properly dispatch integer commands

Reviewed By: cipolleschi

Differential Revision: D47600094

fbshipit-source-id: c35f0509e6c6c0cddc7090a069882f92dd95532e
2023-07-21 10:17:31 -07:00
Lorenzo SciandraandFacebook GitHub Bot 8f4542d65c fix: remove old command for align packages versions (#38548)
Summary:
While working on a couple things, me Riccardo and Nicola noticed that in main for some reason the old `align-package-versions` command in the root package.json was still there in main branch.

This was "merged into" `bump-all-updated-packages` by hoxyq all the way back in March; here's the commit for 0.72 branch -> https://github.com/facebook/react-native/commit/a469927c16e175b637b2eaf9a84af94f2e8cb519

We are not sure why, but for some reason the same commit in main was borked in some way, and didn't actually remove the command: PR (https://github.com/facebook/react-native/pull/36568) and commit (https://github.com/facebook/react-native/commit/04df252aa7bff34a02b24f8381b3f2f1dd122c2f)

So this commit just takes care of that.

## 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] [REMOVED] - remove old command for align packages versions

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

Test Plan: N/A - it's a removal

Reviewed By: cipolleschi

Differential Revision: D47669016

Pulled By: cortinico

fbshipit-source-id: aa651b69433171219dbc235d947ceed4f88b602a
2023-07-21 09:17:58 -07:00
kacperkapusciakandFacebook GitHub Bot 3f78fa953a Fix checkForReproducer action not adding Missing Repro comment (#38531)
Summary:
This PR fixes a bug where GitHub Actions bot didn't add a comment when "Needs: Repro" label was present in an issue.

When a maintainer adds the label manually the bot comments with "Missing Reproductible Example" as normally.

It seems like the problem occurred because of a difference in a sandbox repository and the proper facebook/react-native repo environment.

My sandbox that I used to test https://github.com/facebook/react-native/pull/38338 had an "bot" account with Personal Access Token setup to reply to issues. Turns out that bots using PAT have more permissions and can trigger one action from the other.

**The solution is to send the comment directly from the `checkForReproducer` action.** This won't collide with other actions but sadly will duplicate the sending logic into two actions.

This PR also makes the bot respect when a maintainer removes and adds a label by hand and won't alter the maintainer decision.

Related to ☂️ https://github.com/facebook/react-native/issues/35591

## Changelog:

[INTERNAL] [FIXED] - Message

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

Test Plan: ![image](https://github.com/facebook/react-native/assets/39658211/b956416f-9834-4c61-981f-fe6c17a5eec5)

Reviewed By: cipolleschi

Differential Revision: D47666922

Pulled By: cortinico

fbshipit-source-id: 4a6a471cb11c6ed9b48263d18bf8e283577a14bb
2023-07-21 08:46:03 -07:00
Riccardo CipolleschiandFacebook GitHub Bot f6197cd846 Download artifacts from CI to speed up testing (#37971)
Summary:
Testing releases takes a lot of time because we have to build locally several configurations.
However, the artifacts that we build locally are also built in CI.

The goal of this PR is to implement a mechanism to download those artifacts from the CI instead of build locally, so that testing the release locally can take much less time.

As an example, the full test cycle can take more than 2 hours given that we need to repackage and rebuilt the app from the template.

My plan is to add a table with the time saved once the PR is done

### TODO:
- [x] Download Hermes tarball for RNTester iOS
- [x] Download Hermes APK for RNTester Android
- [x] Download JSC APK for RNTester Android
- [x] Download Packaged version of React Native to create a new app
- [x] Use the downloaded React Native to initialize an app from the template
- [x] Download Maven Local prebuilt in CI and use it for Template Android app

### Time Savings

| Setup | Before [s] | After [s] | Notes |
| --- | --- | --- | --- |
| iOS RNTester Hermes | 339.68 | 194.86 | Time saved by downloading Hermes rather then building it |
| iOS RNTester JSC | 129.80 | 123.35 | Not significant, expected as this workflow did not change
| Android RNTester Hermes | 1188.82 | 5.28 | Huge improvement: we download the APK rather then build |
| Android RNTester JSC | 103.10  | 6.28 | Huge improvement: we download the APK rather then build  |
| Creating the RNTestProject | 2074.82  | 191.16 | We download Maven, the packaged version of RN and Hermes instead of building from scratch |

## Changelog:
[Internal] - Speed up Release testing by downloading the CircleCI artifacts

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

Test Plan: - Tested the script locally

Reviewed By: cortinico, dmytrorykun

Differential Revision: D46859120

Pulled By: cipolleschi

fbshipit-source-id: 8878ebaccf6edb801f8e9884e2bf3946380aa748
2023-07-21 07:15:53 -07:00
kacperkapusciakandFacebook GitHub Bot 5705661d1f Fix issue bot triggering on PRs (#38525)
Summary:
This PR fixes a bug with an issue labeling bot issues triggering on comments to pull requests. The action doesn't trigger when a pull request is open (but other actions add comments immediately).

From [GitHub docs](https://docs.github.com/en/webhooks-and-events/events/issue-event-types):

> GitHub's REST API considers every pull request to be an issue, but not every issue is a pull request. [...] Pull requests have a **`pull_request` property in the `issue` object.**

☝️ Which is a way to differentiate between an issue and a pull request

Relates to a bug introduced in https://github.com/facebook/react-native/pull/38338 and links to ☂️https://github.com/facebook/react-native/issues/35591

## Changelog:

[INTERNAL] [FIXED] - Prevent issue bot triggering on pull requests

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

Test Plan:
This PR makes use of  `github.event.issue.pull_request` object which is null on issues and comments in issues:

![image](https://github.com/facebook/react-native/assets/39658211/e0a64039-5fb7-4ad3-95aa-65cb7c9f0a4b)

and truthy on comments on pull requests

![image](https://github.com/facebook/react-native/assets/39658211/9df69d00-c792-4c00-bfc2-9ee832551d16)

With a change from PR bot skips execution on comments on pull requests

![image](https://github.com/facebook/react-native/assets/39658211/f02687fb-f81b-4278-8d0e-9b23651229c1)

Reviewed By: ryancat

Differential Revision: D47628330

Pulled By: cortinico

fbshipit-source-id: 63e7180bb57ffd34904414a702c02019e18a042b
2023-07-21 03:10:12 -07:00
Rob WalkerandFacebook GitHub Bot 216865cdb7 feat: Support iOS 17 text content types (#38354)
Summary:
While setting up a credit card form in RN, I discovered that iOS 17 supports a number of new content types ([`UITextContentType` docs](https://developer.apple.com/documentation/uikit/uitextcontenttype?language=objc)). In the docs these are marked with the `Beta` flag.

Setting up the new content types is relatively straightforward, but a change is required in https://github.com/facebook/react-native-deprecated-modules to update the `TextInput` prop types. ~~I will open a PR in that repo shortly.~~ I have [opened a PR](https://github.com/facebook/react-native-deprecated-modules/pull/23) to update the prop types. ~~Once that PR is merged, a version bump for that dependency will need to be added to this PR.~~ The PR is merged and the dependency in this PR has been updated.

## Changelog:

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

Pick one each for the category and type tags:

[IOS] [ADDED] - Added support for iOS 17+ text content types

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

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

Test Plan: The `rn-tester` app builds and runs successfully. I have added a few new examples of inputs using the new text content types.

Reviewed By: javache

Differential Revision: D47554161

Pulled By: philIip

fbshipit-source-id: 8d4414dc6229063f81164f2d8727921c8294c92e
2023-07-20 20:31:04 -07:00
Vincent RiemerandFacebook GitHub Bot 0527aea3d9 Add basics of pointer event interception (#38474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38474

Changelog: [Internal] - Add basics of pointer event interception

This diff adds the scaffolding for intercepting Pointer Events (without actually doing anything with them yet). Most notably introduces the logic of determining which events are of the PointerEvent type and downcasting to the type so the interceptor can properly work with the typed properties.

Originally my plan was to leverage `dynamic_cast` but sandcastle's signals let me know that there exists internal apps (particularly VR ones) which don't have RTTI enabled — so to avoid that usage I introduced an additional abstract method on EventPayload which lets subclasses identify themselves cheaply and then subsequently leverage `static_cast`.

Reviewed By: NickGerleman

Differential Revision: D47443773

fbshipit-source-id: 3671285c0413a60475d51318e209376f8a2790ed
2023-07-20 16:23:36 -07:00
Everaldo JuniorandFacebook GitHub Bot caa8dbf0e9 fix: unified Share Action types (#38351)
Summary:
This pull request simplifies the type and fixes a TypeScript object destructuring problem by combining the ShareSharedAction and ShareDismissedAction types into a single ShareAction type. Enabling proper access to the activityType property without TypeScript errors.

## Changelog:
[INTERNAL] [FIXED] -  Unified ShareSharedAction and ShareDismissedAction into ShareAction. Resolved TypeScript issue with object destructuring.

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

Test Plan:
With the current typing:
![image](https://github.com/facebook/react-native/assets/7197169/40b43c40-ed6c-4b1a-8f43-0bb853920e20)

With the proposed solution:
![image](https://github.com/facebook/react-native/assets/7197169/af9e601b-780c-4c69-9a8c-11771a125a0c)

Reviewed By: NickGerleman

Differential Revision: D47527426

Pulled By: philIip

fbshipit-source-id: 9830cd993596bbac2dc07d9f37ca20b35f582156
2023-07-20 16:04:58 -07:00
Neil DharandFacebook GitHub Bot 2669f8c384 Fix setting array elements through JSI (#38521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38521

`HermesRuntimeImpl::setValueAtIndexImpl` directly called
`setElementAt`, which meant that it would not handle index-like
properties properly. Use `putComputed_RJS` instead, which will check
for such properties.

Reviewed By: avp

Differential Revision: D47617445

fbshipit-source-id: c3505670960bd6223bd014f138cee191267a5315
2023-07-20 13:01:46 -07:00
hublotandFacebook GitHub Bot b675667a47 Replace RCTLocalAssetImageLoader to RCTBundleAssetImageLoader (#37232)
Summary:
From the video below, we can see that the UI thread has dropped many frames, and it would become worse if there are multiple images.

If an image is located in the sandbox of the disk, we cannot load it using `RCTLocalAssetImageLoader` because `RCTLocalAssetImageLoader.requiresScheduling` is set to true, which loads the data on the UI thread and causes main thread stuttering. This will affect libraries such as `react-native-code-push` and others that save images to the sandbox of the disk.

Therefore, we should replace `RCTLocalAssetImageLoader.canLoadImageURL` from `RCTIsLocalAssetURL(url)` to `RCTIsBundleAssetURL(url)`. Similarly, we should rename the entire `RCTLocalAssetImageLoader` file with `RCTBundleAssetImageLoader`, which ignores images in the disk sandbox. And finally these images will be loaded from `NSURLRequest`, and our UI thread will run smoothly again.

https://user-images.githubusercontent.com/20135674/236368418-8933a2c6-549c-40d3-a551-81b492fe41d5.mp4

## 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] [Breaking] - Replace `RCTLocalAssetImageLoader` to `RCTBundleAssetImageLoader`

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

Test Plan:
Test Code:
```javascript
constructor(props) {
  super(props)
  this.state = {
    bundle_image: require('./large_image.png'),
    sandbox_image: '',
    source: null,
    isLoading: false,
  }
}

render() {
  console.log('render', this.state)
  return (
    <View style={{ flex: 1, padding: 50, backgroundColor: 'white'}}>
      <View style={{ flexDirection: 'row', alignItems: 'center', height: 70}}>
      {
        [{ title: 'Save Image To SandBox', onPress: () => {
          let image = Image.resolveAssetSource(this.state.bundle_image)
          console.log(image.uri)
          this.setState({ isLoading: true })
          RNFetchBlob.config({ fileCache: true, appendExt: "png" }).fetch("GET", image.uri).then(response => {
            let path = response.path()
            path = /^file:\/\//.test(path) ? path : 'file://' + path
            console.log(path)
            this.state.sandbox_image = path
          }).finally(() => this.setState({ isLoading: false }))
        }}, { title: 'Load From SandBox', onPress: () => {
          this.setState({ source: { uri: this.state.sandbox_image } })
        }}, { title: 'Clear', onPress: () => {
          this.setState({
              source: null,
              isLoading: false
          })
        }}, { title: 'Load From Bundle', onPress: () => {
          this.setState({ source: this.state.bundle_image })
        }}].map((item, index) => {
          return (
              <Pressable
                  key={index}
                  style={{ height: '100%', justifyContent: 'center', flex: 1, borderWidth: 1, borderColor: 'black', marginLeft: index > 0 ? 15 : 0 }}
                  onPress={item.onPress}
              >
                  <Text style={{ textAlign: 'center' }}>{item.title}</Text>
              </Pressable>
          )
        })
      }
      </View>
      <ActivityIndicator style={{ marginTop: 10 }} animating={this.state.isLoading} />
      <Image
        key={`${this.state.source}`}
        style={{ marginTop: 20, width: 200, height: 200 }}
        source={this.state.source}
        onProgress={({ nativeEvent }) => console.log(nativeEvent)}
        onLoadStart={() => this.setState({ isLoading: true })}
        onLoadEnd={() => this.setState({ isLoading: false })}
      />
    </View>
  )
}

```
It needs to be tested in three environments: [Simulator_Debug, RealDevice_Debug, RealDevice_Release]

1. Open `Perf Monitor` (RealDevice_Release can be skipped)
2. Click `Save Image to SandBox`
3. Wait for the loading to end and click `Load From SandBox`
4. Verify that the image can be loaded successfully
5. Verify that the `UI thread` keeps `60 FPS` (RealDevice_Release can be skipped)
6. Click `Clear`
7. Repeat steps [3, 4, 5, 6] several times
8. Click `Load From Bundle` to verify that the bundle image can be loaded successfully

Simulator_Debug

https://user-images.githubusercontent.com/20135674/236369344-ee1b8ff1-2d49-49f3-a322-d973f4adf3e7.mp4

RealDevice_Debug

https://user-images.githubusercontent.com/20135674/236369356-fe440b2b-f72a-49be-b63c-b4bf709dac8c.mp4

RealDevice_Release

https://user-images.githubusercontent.com/20135674/236369365-8a6a5c2f-09ad-4c90-b6bd-41e8a5e3aa7f.mp4

Reviewed By: rshest

Differential Revision: D46441513

Pulled By: dmytrorykun

fbshipit-source-id: 652febd4147dbff6c1ceef03d84ce125b8c66770
2023-07-20 10:55:54 -07:00
Intl SchedulerandFacebook GitHub Bot f6c417c7ae translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907925522686
Sandcastle Job Instance ID: 27021598760821970
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47633539

fbshipit-source-id: b4e0f207270d831108ade6078d693a0ab0c4930a
2023-07-20 07:52:45 -07:00
Dmitry RykunandFacebook GitHub Bot a6b49a15a0 Use RN$LegacyInterop_UIManager_getConstants in BridgelessUIManager (#37730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37730

This diff makes unschematized native components available in bridgeless mode. In case there is no static view config, `BridgelessUIManager` calls `RN$LegacyInterop_UIManager_getConstants`, and gets native view config form the constants.

Changelog: [Internal] - Use RN$LegacyInterop_UIManager_getConstants in BridgelessUIManager

Reviewed By: sammy-SC

Differential Revision: D45154396

fbshipit-source-id: 32b3718841b59a8b6fb22022c9d9edc17dad877f
2023-07-20 05:49:46 -07:00
Shoaib MeenaiandFacebook GitHub Bot 2d3348e642 Fix builds with C++20 (#38501)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38501

char8_t is a distinct type in C++20, which would need to be propagated
everywhere else (e.g. using `std::u8string` instead of `std::string`).
The code was already assuming that char is UTF-8, so we can just cast
accordingly (which works on all compilers: https://godbolt.org/z/9cv4c48o4).

Reviewed By: javache

Differential Revision: D47537998

fbshipit-source-id: ba045483361463f1754e02791114b78f51932a56
2023-07-19 16:34:41 -07:00
Arushi KesarwaniandFacebook GitHub Bot 6d1de636a6 Move SurfaceHandler to fabric/interfaces (#38508)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38508

Moving SurfaceHandler to `fabric/interfaces` since it was already a interface.

changelog: [internal] internal

Reviewed By: luluwu2032

Differential Revision: D47280778

fbshipit-source-id: e759cb6e1b570b782ff208f7cf26b9b9f62762b4
2023-07-19 15:38:23 -07:00
Arushi KesarwaniandFacebook GitHub Bot 442ccee313 Kotlinfy SurfaceHandler interface (#38507)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38507

Converting SurfaceHandler.java to Kotlin

Reviewed By: rshest

Differential Revision: D47568614

fbshipit-source-id: 5dda9d970e232fe2ff9e61a87d348961d212d6ea
2023-07-19 15:38:23 -07:00
Intl SchedulerandFacebook GitHub Bot c0b04d6647 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907925133086
Sandcastle Job Instance ID: 1000126147
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47606614

fbshipit-source-id: 0595aa23a4d6ce2f60c1fdebbe9ac3221261e8c8
2023-07-19 13:16:31 -07:00
Intl SchedulerandFacebook GitHub Bot 595465bf34 translation auto-update for i18n/messenger.config.json on master
Summary:
Chronos Job Instance ID: 1125907925133086
Sandcastle Job Instance ID: 1000126147
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47606628

fbshipit-source-id: ca795c6890b82740e91d202a8373cdb81ff3c88d
2023-07-19 13:16:31 -07:00
Lulu WuandFacebook GitHub Bot fa9ea8326e Throw ReactNoCrashSoftException when handle memeory pressure to avoid crash
Summary:
As title

Changelog:
[Android][Changed] - Throw ReactNoCrashSoftException when handle memeory pressure to avoid crash

Reviewed By: jacdebug

Differential Revision: D47596577

fbshipit-source-id: 311492eaa4ed15b17807f5aa6c351a528fcfcdfa
2023-07-19 11:04:12 -07:00
Dmitry RykunandFacebook GitHub Bot f7f5b4913a Android: Introduce RN$LegacyInterop_UIManager_getConstants (#38153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38153

This diff adds Android specific implementation of `RN$LegacyInterop_UIManager_getConstants` and binds it to JS runtime. It is supposed to be used as a substitute to UIManager.getConstants in bridgeless mode.

Changelog:
[Internal] - Introduce RN$LegacyInterop_UIManager_getConstants in Android.

Reviewed By: RSNara

Differential Revision: D45773342

fbshipit-source-id: 194aa5e940743b4d2c242798764a4207e8b1334f
2023-07-19 10:09:03 -07:00
Deepak JacobandFacebook GitHub Bot 6eeb81a86e Clear bundler banner messages after a certain delay during development. (#38355)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38355

Changelog: [General] [iOS] Clear bundler banner messages after a certain delay during development.

Reviewed By: cipolleschi

Differential Revision: D47478373

fbshipit-source-id: e171ec714fc13096adfd4811f2007ff3e37cbf38
2023-07-19 09:24:49 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 256aaa15bf Populate Platform.isDisableAnimations for the Android mobile platform (#38511)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38511

## Changelog
[Internal] -

This allows to override `Platform.isDisableAnimations` for the Android platform, in the same way as it's done with `IS_TESTING` (but similarly optionally doing `IS_DISABLE_ANIMATIONS` in addition to/instead).

See for more context: https://github.com/facebook/react-native/pull/38490

Reviewed By: cortinico

Differential Revision: D47530731

fbshipit-source-id: b90300124b2a8bac97fae78a94e8a2cc9d7fd5bc
2023-07-19 07:04:18 -07:00
kacperkapusciakandFacebook GitHub Bot 42a2898617 Add check-for-reproducer action (#38338)
Summary:
This PR adds a "check-for-reproducer" GitHub action proposed in https://github.com/facebook/react-native/issues/35591.
This GitHub action automatically labels an issue with when no link to GitHub repository under the authors name or link to Snack is present either in the issue body or in the comments.

## 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] [ADDED] - Add check-for-reproducer GitHub action

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

Test Plan:
This action was tested on a private repro mimicking on how GitHub actions are set-up in `facebook/react-native` repository. If you'd want to play around with the action on this private repo just ask for access - provided you're a maintainer.

### Regarding issue body

1. Labels "Needs: Repro" when no link to Expo Snack or a Github repo under the author's name is present in the issue body:

![image](https://github.com/facebook/react-native/assets/39658211/b8e6d4aa-bc9a-471d-99b8-3b551f2c46c6)

2. Removes the "Needs: Repro" label and deletes the Missing Repro comment when the author edits the issue and provides a link to GitHub repo under their name

![image](https://github.com/facebook/react-native/assets/39658211/2dc13fae-b6ca-432f-88a2-f5c340f28c86)

3. Removes the "Needs: Repro" label and deletes the Missing Repro comment when the author edits the issue and provides a valid link to Expo Snack

![image](https://github.com/facebook/react-native/assets/39658211/e82e744e-b2fb-4979-84de-08f95686feb3)

### Regarding comments

3. Removes the "Needs: Repro" label and deletes the Missing Repro comment when there's a comment with a link to reproduction under issue author's name

![image](https://github.com/facebook/react-native/assets/39658211/eefb5978-29d3-4486-8bd7-878fb2c07c05)

4. Removes the "Needs: Repro" label and deletes the Missing Repro comment when there's a comment with a link to Expo Snack

![image](https://github.com/facebook/react-native/assets/39658211/5769ff77-0d9f-4dac-bb36-6d257e6c2a35)

### Regarding false-positives

5. Adds a "Needs: Repro" label when a link to reprository isn't under the issue author's name

![image](https://github.com/facebook/react-native/assets/39658211/01c93ea3-88b9-4920-a8f8-bcd123d214de)

6. Adds a "Needs: Repro" label when a link to Expo Snack's homepage was sent

![image](https://github.com/facebook/react-native/assets/39658211/568c9824-67af-402a-b102-c1c355651d21)

7. Adds a "Needs: Repro" label when a random link was sent

![image](https://github.com/facebook/react-native/assets/39658211/23bb58b3-cc07-4284-a562-6651f2077a3c)

Reviewed By: NickGerleman

Differential Revision: D47511745

Pulled By: cortinico

fbshipit-source-id: 2c0e5a989f52b4e50992a3954283f122b14153e0
2023-07-19 02:38:28 -07:00
Kevin GozaliandFacebook GitHub Bot 6d317cf1f8 Sort iOS plugin maps
Summary:
A simple sorting of the plugins list in each map. This is to sync with Meta internal tools update.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D47581872

fbshipit-source-id: 522f845eaee63c2812315eb4b8c25237d114ccd4
2023-07-19 01:10:23 -07:00
Kevin GozaliandFacebook GitHub Bot 7341f9abdc Android: expose ReactFontManager as a standalone target (#38506)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38506

There are use cases where an app needs to install a custom font in a separate infra/tool. Instead of bloating those infra/tool with deep React Native dependencies, this allows it to depend on only the pieces that matter.

To ensure backward compatibility, the existing ReactFontManager will proxy method calls to the new impl going forward.

Changelog: [Changed][Android] Moved ReactFontManager to a common package

Reviewed By: mdvacca

Differential Revision: D47569319

fbshipit-source-id: 18ba6617d6c3f68823bdccaacfd8cc961cd6ce34
2023-07-18 23:17:48 -07:00
Xin ChenandFacebook GitHub Bot cb173e6a6f Change how app startup time is collected from platform side (#38325)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38325

This diff changed how we log app startup time by leveraging ReactMarker `logMarker` API, instead of the custom `setAppStartTime` API.

Changelog:
[Android][Internal] - Refactor how app should notify C++ about the app startup time.

Reviewed By: mdvacca

Differential Revision: D43863975

fbshipit-source-id: f80bcdb55fae82abce08eb2eff689985f90f1213
2023-07-18 19:20:44 -07:00
Xin ChenandFacebook GitHub Bot c12670263a Create flag to enable background executor and add to VR panel apps (#38343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38343

We'd like to run experiments on removing background executor in RN Fabric. This will move layout computing from the background thread (fabric_bg) to the JS thread. It will simplify the RN threading model and unblock new performance tracking features like Visual Completion Tracker and MutationObserver.

Changelog:
[Android][Internal] - Experiment with disabling background executor in VR panel apps

Reviewed By: javache

Differential Revision: D47452561

fbshipit-source-id: 554fef4ace2a967cdf0748d9148257d5d6bce987
2023-07-18 17:28:36 -07:00
Xin ChenandFacebook GitHub Bot d9260a81d1 Cache android react marker before the JNI load C++ libraries (#38327)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38327

This diff caches the react marker sent from the android host platform before JNI library is loaded and sent out once it's ready. This way the C++ side will receive those markers as expecetd.

Changelog:
[Android][Internal] - Cache react marker timings before JNI library is loaded.

Reviewed By: mdvacca

Differential Revision: D43863973

fbshipit-source-id: 6d0d41d803d39e66a793f86a21ee11133a631bf7
2023-07-18 15:52:34 -07:00
Intl SchedulerandFacebook GitHub Bot 230d7e3a79 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907924647465
Sandcastle Job Instance ID: 9007200249714837
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47569928

fbshipit-source-id: 65ac0d4bd4cb07c187334c292566c0fbaa0e7422
2023-07-18 15:49:56 -07:00
Vojtech NovakandFacebook GitHub Bot e414713e4c chore: stricter TS check for transform style (#38348)
Summary:
This improves the strictness of TS typings for `transform` on `View`'s `style` prop. Consider the following example, with what TS reports in case of errors, using RN 0.72.3. The  /  symbols indicate whether TS is happy with the code

```tsx
 <View style={{ transform: [{ scale: undefined }] }} />              //  TS2769: No overload matches this call.
 <View style={{ transform: [{ something: 1 }] }} />                  //  TS2769: No overload matches this call.
 <View style={{ transform: [{ scale: 1 }, { rotate: '90deg' }] }} />
 <View style={{ transform: [{ scale: 1, translateX: 1 }] }} /> // this is WRONG, corrected in the next row
 <View style={{ transform: [{ scale: 1 }, { translateX: 1 }] }} />
```

With this change, TS will report an error even for line 4

```tsx
 <View style={{ transform: [{ scale: undefined }] }} />              //  TS2769: No overload matches this call.
 <View style={{ transform: [{ something: 1 }] }} />                  //  TS2769: No overload matches this call.
 <View style={{ transform: [{ scale: 1 }, { rotate: '90deg' }] }} />
 <View style={{ transform: [{ scale: 1, translateX: 1 }] }} />      //  TS2769: No overload matches this call.
 <View style={{ transform: [{ scale: 1 }, { translateX: 1 }] }} />
```

## Changelog:

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

[GENERAL] [CHANGED] - stricter TS check for transform style

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

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

Test Plan: tested locally with the example given above; also added a TS type test

Reviewed By: rshest

Differential Revision: D47526366

Pulled By: NickGerleman

fbshipit-source-id: 5bd007ce29509ccdfce74c3864dee24290d9a175
2023-07-18 15:35:56 -07:00
MO-LewisandFacebook GitHub Bot 0cdb9e6a52 - added: Websocket Module setCustomClientBuilder (#37798)
Summary:
Added code previously added in the following PR: https://github.com/facebook/react-native/pull/28659.

The above PR was accidentally scrapped due to the renaming of the master branch on the React Native repo. As advised in this comment: https://github.com/facebook/react-native/issues/37770#issuecomment-1582476332, I'm opening a new PR with the same code to get this merged into master / main.

Currently, we need to run a local fork of React Native and manually apply these changes ourselves. This then causes additional issues, as it's currently _**impossible**_ to build React Native from source when running on a Windows machine, as evidenced in https://github.com/facebook/react-native/issues/37770 and the other linked issues nested inside of this issue.

**Original summary is as follows:**
With `NetworkModule.setCustomClientBuilder` we can customize our OkHttpClient to all requests made by react-native, it's very useful when you do `SSL Pinning` or change some OkHttpClient configuration at all. I've added a similar function to websocket, it allow us do some configurations on Websocket OkHttpClient.

## Changelog:
[Android] [Added] - Websocket Module setCustomClientBuilder

<!-- 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/37798

Test Plan:
**From the original PR:**

You can just set a custom `CustomClientBuilder` on `MainActivity` `onCreate`:

```
import okhttp3.OkHttpClient;
import java.util.concurrent.TimeUnit;
import com.facebook.react.modules.network.CustomClientBuilder;
import com.facebook.react.modules.websocket.WebsocketModule;

public class MainActivity extends ReactFragmentActivity {

    Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        RNBootSplash.init(R.drawable.launch_screen, MainActivity.this);

        WebsocketModule.setCustomClientBuilder(new CustomClientBuilder() {
            Override
            public void apply(OkHttpClient.Builder builder) {
              builder.connectTimeout(0, TimeUnit.MILLISECONDS);
            }
          });
    }

   ...
```

Reviewed By: cortinico

Differential Revision: D47468613

Pulled By: javache

fbshipit-source-id: ad97fb18ba5784d8abe157f5ccd29201b8b0fe84
2023-07-18 13:56:08 -07:00
Constantine FryandFacebook GitHub Bot b8d60a834f Move RCTSurfaceHostingComponent and RCTSurfaceBackedComponent (#38213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38213

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

Changelog: [iOS][Removed] Remove RCTSurfaceHostingComponent and RCTSurfaceBackedComponent, needed only for ComponentKit integration.

Reviewed By: motiz88

Differential Revision: D47255482

fbshipit-source-id: 11db6f37a69a6f1e76ee7744a92f85c232342bd5
2023-07-18 13:21:14 -07:00
Harry YuandFacebook GitHub Bot ff1972daba Wrap NullPointerExceptions and throw new Error in dispatchViewManagerCommand for easier debugging (#38444)
Summary:
This PR is a modified version of https://github.com/facebook/react-native/issues/38060 which was reverted because it may sometimes cause sensitive info to be logged. This version no longer includes any parameters in the thrown errors.

### Motivation

I had a crash-causing error in our error reporting console (Bugsnag) that was extremely hard to debug due to the lack of specificity in the thrown error.

```
java.lang.NullPointerException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference
        at com.facebook.react.bridge.ReadableNativeArray.getDouble(ReadableNativeArray.java:92)
        at com.facebook.react.bridge.JavaMethodWrapper$4.extractArgument(JavaMethodWrapper.java:64)
        at com.facebook.react.bridge.JavaMethodWrapper$4.extractArgument(JavaMethodWrapper.java:60)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:356)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
        at com.facebook.jni.NativeRunnable.run(NativeRunnable.java:-2)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loop(Looper.java:214)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
        at java.lang.Thread.run(Thread.java:919)
```

I noticed that `invoke` in `JavaMethodWrapper` tacks on the JS method name on other errors, so wanted to change this to handle NullPointerExceptions more gracefully too.

This helps make it easier to debug issues like https://github.com/facebook/react-native/issues/23126, https://github.com/facebook/react-native/issues/19413, https://github.com/facebook/react-native/issues/27633, https://github.com/facebook/react-native/issues/23378, https://github.com/facebook/react-native/issues/29250, https://github.com/facebook/react-native/issues/28262, https://github.com/facebook/react-native/issues/34001 and likely many more.

### After adding NullPointerException

Even after adding the NullPointerException, I got errors like this:

```
com.facebook.react.bridge.NativeArgumentsParseException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference (constructing arguments for UIManager.dispatchViewManagerCommand at argument index 0) with parameters [null, 4.0, []]
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:371)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
        at com.facebook.jni.NativeRunnable.run(NativeRunnable.java:-2)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
        at java.lang.Thread.run(Thread.java:1012)
```

This helped, but still didn't help me easily find which library calling `dispatchViewManagerCommand` was causing this.

## Changelog:

[ANDROID] [CHANGED] - Wrap NullPointerExceptions when thrown by native code called from JS for readability
[GENERAL] [CHANGED] - Throw Error in dispatchViewManagerCommand when non-numeric tag is passed for easier debugging

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

Test Plan:
Test change on our app via a beta release.

With these changes, we got better stacktraces like these:

### Java stacktrace

```
com.facebook.react.bridge.NativeArgumentsParseException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference (constructing arguments for UIManager.dispatchViewManagerCommand at argument index 0) with parameters [null, 4.0, []]
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:371)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
        at com.facebook.jni.NativeRunnable.run(NativeRunnable.java:-2)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
        at java.lang.Thread.run(Thread.java:1012)
```

### JS stacktrace (after dispatchViewManagerCommand change)

```
Error dispatchViewManagerCommand: found null reactTag with args []
    node_modules/react-native/Libraries/ReactNative/PaperUIManager.js:120:21 dispatchViewManagerCommand
    node_modules/react-native-maps/lib/MapMarker.js:68:67 _runCommand
    node_modules/react-native-maps/lib/MapMarker.js:60:24 redraw
    templates/Components/MapViewWithMarkers/PlaceMarker.tsx:88:32 anonymous
    (native) apply
    node_modules/react-native/Libraries/Core/Timers/JSTimers.js:213:22 anonymous
    node_modules/react-native/Libraries/Core/Timers/JSTimers.js:111:14 _callTimer
    node_modules/react-native/Libraries/Core/Timers/JSTimers.js:359:16 callTimers
    (native) apply
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:427:31 __callFunction
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:25 anonymous
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:10 __guard
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:16 callFunctionReturnFlushedQueue
```

Reviewed By: javache

Differential Revision: D47546672

Pulled By: cortinico

fbshipit-source-id: 68379561d84d0ef2ed5c6d66f3f49943c5d7cb7e
2023-07-18 10:37:57 -07:00
Nicola CortiandFacebook GitHub Bot 5dce2e470f Better Incremental build for :ReactAndroid:hermes-engine (#38497)
Summary:
This fixes an issue we had with incremental compilation of `:ReactAndroid:hermes-engine`
Practically the `buildHermesC` and `configureBuildForHermes` would re-run every time as they had no input/output configured.

This breaks incremental compilation, meaning that when you want to rebuild RN-Tester, you would rebuild hermesc every time.

This fixes it for good, so we won't be rebuilding `hermesc` unless needed.

## Changelog:

[INTERNAL] - Better Incremental build for :ReactAndroid:hermes-engine

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

Test Plan:
Will wait for CI to be green. Plus I've verified that those tasks don't get re-executed on subsequent builds:

```bash
$ gw :packages:rn-tester:android:app:assembleHermesDebug --console=plain
> Task :react-native-gradle-plugin:compileKotlin UP-TO-DATE
> Task :react-native-gradle-plugin:compileJava NO-SOURCE
> Task :react-native-gradle-plugin:pluginDescriptors UP-TO-DATE
> Task :react-native-gradle-plugin:processResources UP-TO-DATE
> Task :react-native-gradle-plugin:classes UP-TO-DATE
> Task :react-native-gradle-plugin:jar UP-TO-DATE
> Task :react-native-gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:preBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:preDebugBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:generateDebugResValues UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:generateDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:buildCodegenCLI SKIPPED
> Task :packages:react-native:ReactAndroid:flipper-integration:packageDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:parseDebugLocalResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:processDebugManifest UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:generateDebugRFile UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:javaPreCompileDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:compileDebugLibraryResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:writeDebugAarMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:extractDeepLinksDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:mergeDebugShaders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:compileDebugShaders NO-SOURCE
> Task :packages:react-native:ReactAndroid:flipper-integration:generateDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:packageDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:processDebugJavaRes NO-SOURCE
> Task :packages:react-native:ReactAndroid:flipper-integration:mergeDebugJniLibFolders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:mergeDebugNativeLibs NO-SOURCE
> Task :packages:react-native:ReactAndroid:flipper-integration:copyDebugJniLibsProjectOnly UP-TO-DATE
> Task :packages:rn-tester:android:app:buildCodegenCLI SKIPPED
> Task :packages:react-native:ReactAndroid:generateCodegenSchemaFromJavaScript UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateCodegenArtifactsFromSchema UP-TO-DATE
> Task :packages:react-native:ReactAndroid:createNativeDepsDirectories UP-TO-DATE
> Task :packages:rn-tester:android:app:generateCodegenSchemaFromJavaScript UP-TO-DATE
> Task :packages:rn-tester:android:app:generateCodegenArtifactsFromSchema UP-TO-DATE
> Task :packages:rn-tester:android:app:preBuild UP-TO-DATE
> Task :packages:rn-tester:android:app:preHermesDebugBuild UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugNativeDebugMetadata NO-SOURCE

> Task :packages:react-native:ReactAndroid:downloadBoost UP-TO-DATE
Download https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz

> Task :packages:rn-tester:android:app:generateHermesDebugBuildConfig UP-TO-DATE
> Task :packages:rn-tester:android:app:javaPreCompileHermesDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareBoost UP-TO-DATE
> Task :packages:rn-tester:android:app:generateHermesDebugResValues UP-TO-DATE

> Task :packages:react-native:ReactAndroid:downloadDoubleConversion UP-TO-DATE
Download https://github.com/google/double-conversion/archive/v1.1.6.tar.gz

> Task :packages:rn-tester:android:app:generateHermesDebugResources UP-TO-DATE
> Task :packages:rn-tester:android:app:packageHermesDebugResources UP-TO-DATE
> Task :packages:rn-tester:android:app:parseHermesDebugLocalResources UP-TO-DATE
> Task :packages:rn-tester:android:app:createHermesDebugCompatibleScreenManifests UP-TO-DATE
> Task :packages:rn-tester:android:app:extractDeepLinksHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugShaders UP-TO-DATE
> Task :packages:rn-tester:android:app:compileHermesDebugShaders NO-SOURCE
> Task :packages:rn-tester:android:app:generateHermesDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareDoubleConversion UP-TO-DATE

> Task :packages:react-native:ReactAndroid:downloadFmt UP-TO-DATE
Download https://github.com/fmtlib/fmt/archive/6.2.1.tar.gz

> Task :packages:react-native:ReactAndroid:downloadFolly UP-TO-DATE
Download https://github.com/facebook/folly/archive/v2021.07.22.00.tar.gz

> Task :packages:rn-tester:android:app:checkHermesDebugDuplicateClasses UP-TO-DATE
> Task :packages:rn-tester:android:app:desugarHermesDebugFileDependencies UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareFmt UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeExtDexHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:processHermesDebugJavaRes NO-SOURCE
> Task :packages:rn-tester:android:app:preJscDebugBuild UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugJniLibFolders UP-TO-DATE
> Task :packages:rn-tester:android:app:validateSigningHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:writeHermesDebugAppMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareFolly UP-TO-DATE
> Task :packages:rn-tester:android:app:writeHermesDebugSigningConfigVersions UP-TO-DATE

> Task :packages:react-native:ReactAndroid:downloadGlog UP-TO-DATE
Download https://github.com/google/glog/archive/v0.3.5.tar.gz

> Task :packages:react-native:ReactAndroid:downloadGtest UP-TO-DATE
Download https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz

> Task :packages:react-native:ReactAndroid:prepareGlog UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareGtest UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareJSC UP-TO-DATE

> Task :packages:react-native:ReactAndroid:downloadLibevent UP-TO-DATE
Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz

> Task :packages:react-native:ReactAndroid:preparePrefab UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareLibevent UP-TO-DATE
> Task :packages:react-native:ReactAndroid:preBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:preDebugBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateDebugBuildConfig UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateDebugResValues UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:packageDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:parseDebugLocalResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:processDebugManifest UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateDebugRFile UP-TO-DATE
> Task :packages:react-native:ReactAndroid:javaPreCompileDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:compileDebugLibraryResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:writeDebugAarMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:extractDeepLinksDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:mergeDebugShaders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:compileDebugShaders NO-SOURCE
> Task :packages:react-native:ReactAndroid:generateDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:packageDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:processDebugJavaRes NO-SOURCE
> Task :packages:react-native:ReactAndroid:mergeDebugJniLibFolders UP-TO-DATE

> Task :packages:react-native:ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
Download https://github.com/facebook/hermes/tarball/main

> Task :packages:react-native:ReactAndroid:hermes-engine:unzipHermes UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:configureBuildForHermes UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:buildHermesC UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:prepareHeadersForPrefab UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:preBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:preDebugBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:generateDebugResValues UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:generateDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:packageDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:parseDebugLocalResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:processDebugManifest UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:generateDebugRFile UP-TO-DATE
> Task :packages:rn-tester:android:app:mapHermesDebugSourceSetPaths UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:javaPreCompileDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:compileDebugJavaWithJavac UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:bundleLibCompileToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:compileDebugLibraryResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:writeDebugAarMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:extractDeepLinksDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:mergeDebugShaders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:compileDebugShaders NO-SOURCE
> Task :packages:react-native:ReactAndroid:hermes-engine:generateDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:packageDebugAssets UP-TO-DATE
> Task :packages:rn-tester:android:app:checkHermesDebugAarMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:processDebugJavaRes NO-SOURCE
> Task :packages:react-native:ReactAndroid:hermes-engine:bundleLibResDebug NO-SOURCE
> Task :packages:rn-tester:android:app:processHermesDebugMainManifest UP-TO-DATE
> Task :packages:rn-tester:android:app:processHermesDebugManifest UP-TO-DATE
> Task :packages:rn-tester:android:app:processHermesDebugManifestForPackage UP-TO-DATE
> Task :packages:rn-tester:android:app:processHermesDebugResources UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugAssets UP-TO-DATE
> Task :packages:rn-tester:android:app:compressHermesDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:configureCMakeRelease[arm64-v8a]
> Task :packages:react-native:ReactAndroid:hermes-engine:generateJsonModelDebug
> Task :packages:react-native:ReactAndroid:hermes-engine:prefabDebugConfigurePackage UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:buildCMakeRelease[arm64-v8a][libhermes]
> Task :packages:react-native:ReactAndroid:compileDebugKotlin UP-TO-DATE
> Task :packages:react-native:ReactAndroid:compileDebugJavaWithJavac UP-TO-DATE
> Task :packages:react-native:ReactAndroid:bundleLibCompileToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:bundleLibResDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:compileDebugKotlin UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:compileDebugJavaWithJavac NO-SOURCE
> Task :packages:react-native:ReactAndroid:flipper-integration:bundleLibCompileToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:bundleLibResDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:compileHermesDebugJavaWithJavac UP-TO-DATE
> Task :packages:rn-tester:android:app:dexBuilderHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugGlobalSynthetics UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugJavaResource UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeLibDexHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeProjectDexHermesDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:externalNativeBuildDebug
> Task :packages:react-native:ReactAndroid:hermes-engine:prefabDebugPackage UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:mergeDebugJniLibFolders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:mergeDebugNativeLibs UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:copyDebugJniLibsProjectOnly UP-TO-DATE
> Task :packages:react-native:ReactAndroid:configureCMakeDebug[arm64-v8a]
> Task :packages:react-native:ReactAndroid:buildCMakeDebug[arm64-v8a][bridgeless,fabricjni,etc]
> Task :packages:react-native:ReactAndroid:mergeDebugNativeLibs UP-TO-DATE
> Task :packages:react-native:ReactAndroid:copyDebugJniLibsProjectOnly UP-TO-DATE
> Task :packages:react-native:ReactAndroid:externalNativeBuildDebug
> Task :packages:react-native:ReactAndroid:generateJsonModelDebug
> Task :packages:react-native:ReactAndroid:prefabDebugConfigurePackage UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prefabDebugPackage UP-TO-DATE
> Task :packages:rn-tester:android:app:configureCMakeDebug[arm64-v8a]
> Task :packages:rn-tester:android:app:buildCMakeDebug[arm64-v8a]
> Task :packages:rn-tester:android:app:mergeHermesDebugNativeLibs UP-TO-DATE
> Task :packages:rn-tester:android:app:stripHermesDebugDebugSymbols UP-TO-DATE
> Task :packages:rn-tester:android:app:packageHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:createHermesDebugApkListingFileRedirect UP-TO-DATE
> Task :packages:rn-tester:android:app:assembleHermesDebug UP-TO-DATE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.2.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 3s
130 actionable tasks: 8 executed, 122 up-to-date
```

Reviewed By: mdvacca

Differential Revision: D47551640

Pulled By: cortinico

fbshipit-source-id: 8eaf5e189f85f323bc41f23f744c724bd6dd4262
2023-07-18 10:03:23 -07:00
Ken TominagaandFacebook GitHub Bot ba6dc35337 chore: Replace 'M1' with 'Apple Silicon' in the doc (#38344)
Summary:
Use Apple Silicon instead of M1 because we have M2 and other variations too.

I did not change the name of `__apply_Xcode_12_5_M1_post_install_workaround` as it's in use.

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

[GENERAL] [FIXED] - Use Apple Silicon instead of M1

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

Test Plan: None as no behavioral changes

Reviewed By: christophpurrer

Differential Revision: D47466540

Pulled By: javache

fbshipit-source-id: d770189e065899181a8b4ea17465beef09607d2f
2023-07-18 09:56:25 -07:00
Ramanpreet NaraandFacebook GitHub Bot 01594cae47 Interop: Fix regression test (#38476)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38476

The TurboModule interop layer test asserts that SampleLegacyModule.const2 == 390.

But SampleLegacyModule.const2 was actually the screen size of device, which is different locally vs sandcastle.

So, while the test passed locally (b/c screen size = 390), it failed on Sandcastle (b/c screen size = 375).

So, this diff hardcodes const2 to be 390.

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: christophpurrer

Differential Revision: D47379531

fbshipit-source-id: 0abf079400d376d4816fecf1e7dac6db6fc688c1
2023-07-18 09:11:23 -07:00
Pieter De BaetsandFacebook GitHub Bot 67e33ebd01 Align usage of JSPointerDispatcher across ReactSurfaceView and ReactRootView (#38350)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38350

Found subtle differences between how JSPointerDispatcher is configured across bridgeless.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D47468666

fbshipit-source-id: 730cd93ea426e50eb67a71feacc8d3eb477c4c96
2023-07-18 08:30:41 -07:00
Dmitry RykunandFacebook GitHub Bot 47557ae781 iOS: Add Commands and Constants properties to native view config (#38221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38221

View configs are supposed to have `Commands` and `Constants`. See [ReactNativeTypes.js](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js#L68-L69).
Android sets them in native: see [UIManagerModuleConstantsHelper.java](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java#L172-L179).
ut iOS doesn't: see [RCTUIManager.m](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Modules/RCTUIManager.m#L1484-L1487)
Instead there is code for that in [PaperUIManager.js](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L117-L160).
It accesses viewManagers like this: `const viewManager = NativeModules[viewConfig.Manager]`. But `NativeModules` object is not available in the bridgeless mode. So we fail to provide complete native view configs in the New Architecture.

This diff implements `Commands` and `Constants` in native in iOS.
This change should have no effect in the old architecture because these properties are overwritten by `lazifyViewManagerConfig`.

Changelog: [Internal] - Add Commands and Constants properties to native view config.

Reviewed By: sammy-SC

Differential Revision: D47096624

fbshipit-source-id: e3b3183ba5e3d1d2fb3f3ff5d6ff89ad86095a6c
2023-07-18 08:15:13 -07:00
Intl SchedulerandFacebook GitHub Bot 080a3d300d translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907924283078
Sandcastle Job Instance ID: 9007200249360092
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47549385

fbshipit-source-id: 3721ea2b2e51ab354917904ae79a1415a6e8a335
2023-07-18 06:17:30 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 04ad34d6ad Decouple isTesting Platform flag from disabling/enabling animations when testing (#38490)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38490

## Changelog
[Internal] -

The internal `Platform.isTesting` is tightly coupled to animations being disabled, which in turn can lead to subtle problems in some of the corner cases:
* Since `isTesting` is force override to `false` on JS side in non-dev builds, it means that e2e tests, that would like to use release builds, are out of luck when animation disabling is desired
* Conversely, some of the e2e tests may actually rely on animations being enabled in order to work, which means they are also out of luck if trying to test a dev build
* Finally, we have cases of hybrid builds, which are build in release on native side, but also have `__DEV__=true` on the native side

To both cover the above scenarios, but also to be backwards compatible to all the existing once, this change introduces another flag, `Platform.isDisableAnimations`.

The way it works is:
* If it's not specified, the e2e tests behaviour will be exactly the same as before, since by default `isDisableAnimations` will be true when `isTesting` is true
* If it's specified and is equal to `false`, it means that animations will be still enabled, even if `isTesting` is true (for those e2e tests that rely on animations being enabled)
* If it's specified and is equal to 'true', it means that animations will be force disabled, no matter whether we test a release or a dev build

Note that this only specifies the JS side of things, defaulting `Platform.isDisableAnimations` to "not specified" (i.e. all the tests will behave as before).

Pulling it through for different platforms is done as a separate follow-up.

Differential Revision: D47516800

fbshipit-source-id: efcb78f68f9102fec025ecce9a475c9c0bc1ecca
2023-07-17 22:07:53 -07:00
Xin ChenandFacebook GitHub Bot 777934ec3a Reenable scrollEventThrottle prop for ScrollView and HorizontalScrollView (#38475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38475

We added `scrollEventThrottle` for android in D35735978, but the experiment was never executed and the flag got removed in D39449184.

Since the same feature is on iOS and the implementation here is the same to iOS (https://fburl.com/code/htcuhq4w), it should be safe to support.

Changelog:
[Android][Add] - Add scrollEventThrottle prop support for android

Reviewed By: cortinico

Differential Revision: D47492259

fbshipit-source-id: 09a2bead652bfef4a2c70b996cf66f6983604db2
2023-07-17 16:42:03 -07:00
Gergely HegedusandFacebook GitHub Bot ab3c00de2c Fix issue#11068 of duplicating characters when replacing letters to lowercase or uppercase in TextInput (#35929)
Summary:
These changes are intended to resolve https://github.com/facebook/react-native/issues/11068.

## Changelog:

[Android] [Fixed] - Fix letters duplication when using autoCapitalize

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

Test Plan:
I took the `RewriteExample` from `TextInputSharedExamples.js` duplicated it, updated the labels, attached to the same screen. Modified its `onChangeText` function, from `text = text.replace(/ /g, '_');` to `text = text.toLowerCase();` then tested via rn-tester as shown in the video:
- No duplicate characters
- Characters are updated to be lowercase
- Long pressing delete properly deletes, doesn’t stop after deleting one character
- Suggestions (selected from keyboard) work and are updated to lowercase when it becomes part of the input text
- Moving the cursor and typing works, cursor position is kept as it should
- Moving the cursor and deleting works
- Selection portion and deleting it works, cursor position is kept as it should

https://user-images.githubusercontent.com/14225329/213890296-2f194e21-2cf9-493f-a516-5e0212ed070e.mp4

Note: I have tested manually with 0.67.4, because later versions failed on my machine with cmake and argument errors when building the rn-tester from Android Studio to any device.
Help regarding that would be appreciated.

## Possible Future Improvements

As it can be seen the video, the letter duplication is resolved, however since the lowercase modification happens on the Javascript side, it takes a couple milliseconds and the Uppercase can still be shown momentarily while typing.

## Technical details, why the solution works

I've debugged a simple AppCompatEditText with calling the same `getText().replace` in `doAfterTextChanged` with a bit of delay and noticed a difference to the `ReactEditText`.

The ReactEditText removes the `android.view.inputmethod.ComposingText` Span in `manageSpans` before calling replace (ComposingText is `Spanned.SPAN_EXCLUSIVE_EXCLUSIVE`).
That `ComposingText` Span is used in `android.view.inputmethod.BaseInputConnection` `private replaceText` to find from what point the text should be replaced from when applying suggestions or typing new letters. Without that Span, it defaults to the selection position, which is usually the end of the text causing duplication of the old "word".

**In simple terms, while typing with suggestions on the keyboard, each new letter is handled similarly as clicking a suggestion would be, aka replacing the current "word" with the new "word". (let's say "Ar" word with "Are" word)**

Another way to describe it:
While typing with suggestions, with the ComposingText Span the TextView keeps track of what word completions are suggested for on the keyboard UI. When receiving a new letter input, it replaces the current "word" with a new "word", and without the Span, it replaces nothing at the end (selection point) with the new word which results in character duplication.

It also seems to make sense then why without suggestions (like password-visible and secureTextEntry) the issue hasn't occurred.

### Examples

How the issue happened:
> - User types: A (ComposingText Span becomes (0,1), composingWord: "A")
> - Javascript replaced A with a, ComposingText Span was removed from getText()
> - User types a new character: r (ComposingText, defaulting to selection, from selection, empty string is replaced with word "Ar")
> => Complete text: aAr => letter duplication.

How it works with the changes applied:
> - User types: A (ComposingText Span becomes (0,1), composingWord: "A")
> - Javascript replaces A with a, (ComposingText Span (0,1) is re-set after replace)
> - User types a new character: r (ComposingText (0,1), "a" word is replaced with word "Ar". ComposingText becomes (0,2) "Ar")
> - Javascript replaced Ar with ar, (ComposingText Span (0,2) is re-set after replace)
> => Complete text: ar => no letter duplication
> - User selects suggestion "Are" (ComposingText Span (0,2) "ar" is replaced with new word and space "Are ")
> - CompleteText: "Are "
> - Javascript replaces "Are " with "are " (ComposingText Span doesn't exist, no string after space " ")

Note: the Editable.replace also removes the ComposingText, if it doesn't cover the whole text, that's why we need to re-setSpan them even if we wouldn't remove them in `manageSpans`.

## Note

This is my first attempt to contribute so if I missed something or messed up, please point out and I will try to adapt.

Reviewed By: NickGerleman

Differential Revision: D47243817

Pulled By: lunaleaps

fbshipit-source-id: 5f3551d17466f2c7cd1aa89ffb09af50e065b52e
2023-07-17 15:14:50 -07:00
Xin ChenandFacebook GitHub Bot d839e4abac Call C++ ReactMarker from android side to log platform specific timing (#38321)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38321

This diff adds the native method in `ReactMarker.java` file so that any logs in the android side will call into C++. Given that currently the C++ uses the native implementation from hosting platforms, this allows any call (either from C++ or android) will end up calling the C++ method after logging is done.

The motivation of this change is to allow us to collect timing information from  hosting platforms, and report back to JS performance startup API. We will have items that are logged before the JNI part is loaded, and those will be cached and sent over in the next diff.

Changelog:
[Android][Internal] - Implemented native method for Android LogMarker API to report timing values to C++.

Reviewed By: mdvacca

Differential Revision: D43806115

fbshipit-source-id: 11497bdc0af8d1b0299a797c636bb7af7a6ddda4
2023-07-17 14:32:00 -07:00
Juan Luis Herrero EstradaandFacebook GitHub Bot eadbfb86c6 fix pointerMove case (#38356)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38356

fix the correct case of this event

  Changelog:
    [General][Fixed] - fix the correct case of this event

Reviewed By: javache

Differential Revision: D47480741

fbshipit-source-id: a600f4921c59c571f2da251b36674a98c8c7e51f
2023-07-17 08:33:12 -07:00
Nicola CortiandFacebook GitHub Bot 995bb3e995 Fabric Interop - Also normalize direct events (#38352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38352

This change is making sure we normalize both bubbling and direct events for the sake of Fabric Interop.
This is currently required as some libraries have reported incompatiblities with Fabric Interop
(see https://github.com/react-native-maps/react-native-maps/issues/4383)

Also this is has been reported by the WG here:
https://github.com/reactwg/react-native-new-architecture/discussions/135#discussioncomment-6443294

Changelog:
[Android] [Fixed] - Fabric Interop - Fix support for direct events on Paper components

Reviewed By: rshest

Differential Revision: D47472050

fbshipit-source-id: f0ae95cb782e340281928819a702273fb14e9b16
2023-07-17 05:37:38 -07:00
Janic DuplessisandFacebook GitHub Bot e21c25eb91 Add missing toolchains plugin in react-native-gradle-plugin (#38292)
Summary:
I was getting the following error when trying to run RN Tester on Android.

```
A problem occurred configuring project ':packages:react-native:ReactAndroid'.
> Could not determine the dependencies of task ':react-native-gradle-plugin:compileKotlin'.
   > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
      > No locally installed toolchains match and toolchain download repositories have not been configured.
```

This is fixed by adding the `org.gradle.toolchains.foojay-resolver-convention` plugin in settings.gradle, this was done already for the root one, but not in the one in `react-native-gradle-plugin`.

## Changelog:

[INTERNAL] [FIXED] - Add missing toolchains plugin in react-native-gradle-plugin

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

Test Plan: Build RN Tester on android

Reviewed By: mdvacca

Differential Revision: D47371772

Pulled By: cortinico

fbshipit-source-id: 8eaa5de9559720a7b37d11b3ddceb5fb84753a40
2023-07-17 05:09:56 -07:00