Commit Graph
28460 Commits
Author SHA1 Message Date
Xin Chen 6ab062dfec Fix concurrent consumers issue with ReactMarker (#38710)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38710

Fix a race condition when multiple consumers try to access ReactMarker and trigger calls to native module. Even though ReactMarker uses `ConcurrentLinkedQueue`, the loop itself could race and cause NPE.

Changelog:
[Android][Fixed] - Fix race condition with ReactMarker calls to its native module

Reviewed By: rshest

Differential Revision: D47933993

fbshipit-source-id: a56e5e4f3564922d534235991da5b6842248bf24
2023-08-01 12:19:17 -07:00
Sam Zhou 743799078b Parse .js.flow files with hermes-parser (#38726)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38726

Changelog: [Internal]

Needed to fix spurious parser errors

Reviewed By: pieterv

Differential Revision: D47959263

fbshipit-source-id: 95ce244de41c5b4b53fd56c542d660944b7e216f
2023-08-01 11:17:07 -07:00
Ruslan Shestopalyuk 4b84a2b913 Add .cpplsp-buck-out to .gitignore (#38723)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38723

## Changelog:
[Internal] -

Add a buck-specific (on Windows) non-source file type to .gitignore.

Reviewed By: christophpurrer

Differential Revision: D47957053

fbshipit-source-id: 732fdc554730037da5b5daa11ebff58a56f21c21
2023-08-01 10:56:21 -07:00
David Vacca b28e3c16ed Reduce visibility of ReactHost.prerenderSurface (#38699)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38699

Reduce visibility of ReactHost.prerenderSurface since this is only used from ReactSurface

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D47915588

fbshipit-source-id: 953b04b531d718434170d63e9f66d22758d26ddf
2023-08-01 08:55:40 -07:00
David Vacca 30a312c25f Move ReactHost.destroy to ReactHostInterface (#38697)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38697

Move ReactHost.destroy to ReactHostInterface

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D47915485

fbshipit-source-id: 491af8fa76cb6eb738acc9a87922ac8099e7547e
2023-08-01 08:55:40 -07:00
David Vacca 4e44fda261 Add reload to ReactHostInterface (#38698)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38698

Add reload to ReactHostInterface

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D47915444

fbshipit-source-id: f423b7daf2f086370c80b3135c2139315e32c9f5
2023-08-01 08:55:40 -07:00
David Vacca 7e44d2cca4 Reduce visibility of ReactHost.stopSurface to package only (#38695)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38695

Reduce visibility of ReactHost.stopSurface to package only

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D47915446

fbshipit-source-id: 570c4d195b6f7a028aad8707a4149a94d8e9ca1d
2023-08-01 08:55:40 -07:00
David Vacca 9eabf48c26 Reduce visibility of ReactHost.startSurface to package only (#38694)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38694

Reduce visibility of ReactHost.startSurface to package only

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D47915445

fbshipit-source-id: 94f7e1822c4e758815daea24cfe4193e99cd1b7e
2023-08-01 08:55:40 -07:00
David Vacca 2403acfae8 Move ReactHost.start method to interface (#38696)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38696

Move ReactHost.start method to interface

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D47915277

fbshipit-source-id: f7a4c5f4a4c4405a3809db7303d1292bd7c7b005
2023-08-01 08:55:40 -07:00
David Vacca bfc2cb972a Reduce visibility of ReactSurface.getSurfaceHandler() (#38693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38693

Reduce visibility of ReactSurface.getSurfaceHandler()

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D47915065

fbshipit-source-id: e1501f075c9bb8858d859681fa7053dd0f9bbcfa
2023-08-01 08:55:40 -07:00
David Vacca 9ece027bdc Fix lint warn (#38700)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38700

Fix lint warn in DevOptionHandler.java

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D47915066

fbshipit-source-id: 3584a749ef042c6e2b491ae5170adf1cfad95106
2023-08-01 08:55:40 -07:00
Phillip Pan 8cd5b2a57d delete RCT_EXPORT_PRE_REGISTERED_MODULE (#38707)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38707

Changelog: [iOS][Breaking]

seemed like a confusing api, so getting rid of it

also did not see any libraries using this in GH: https://github.com/search?q=RCT_EXPORT_PRE_REGISTERED_MODULE&type=code, so can just delete this safely

Reviewed By: fkgozali

Differential Revision: D47919116

fbshipit-source-id: 6f6393bdf80a2f9836cbe5e1508da80d6bdc2e2d
2023-08-01 08:38:37 -07:00
Dmitry Rykun 1c3b3a09b6 Add @react-native/babel-plugin-codegen to @react-native/babel-preset (#38227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38227

X-link: https://github.com/facebook/metro/pull/1023

This diff enables react-native/babel-plugin-codegen to react-native/babel-preset. This will enable static view configs generation for properly schematized native components.

Changelog: [General][Changed] - react-native/babel-plugin-codegen to react-native/babel-preset

Reviewed By: christophpurrer

Differential Revision: D46688516

fbshipit-source-id: ebecc5fd610ca4b86c55355879ad3fd36d51cae9
2023-08-01 07:49:23 -07:00
Phillip Pan a79cde689f delete unused feature flag (#38708)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38708

Changelog: [Internal]

as title

Reviewed By: fkgozali

Differential Revision: D47924734

fbshipit-source-id: e55a9c6ce80f9e1f843cc9bbb9a555b76e4e4548
2023-08-01 06:36:26 -07:00
Alex Hunt bfd5fe27b3 Fix react_native_pods_utils copy step under Eden (#38719)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38719

This removes a point of friction where the `moveOutputs` script step would fail to copy extended file attributes under [EdenFS](https://github.com/facebook/sapling/blob/29362eb4fd06b63a2184f5cce729c304c70b0582/eden/fs/docs/Overview.md).

Changelog: [Internal]

Reviewed By: cipolleschi, dmytrorykun

Differential Revision: D47951246

fbshipit-source-id: 0a22d623b5e8c60c68778d3458a9046aeafbe87f
2023-08-01 05:35:44 -07:00
Denis 5eaf28b247 add emitUnionProp in parser primitives (#38705)
Summary:
[Codegen 131] This PR add a function `emitUnionProp` to the parser-primitives, as requested on https://github.com/facebook/react-native/issues/34872

## Changelog:

[INTERNAL] [ADDED] - Add `emitUnionProp` function to parser-primitives

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

Test Plan: `yarn test react-native-codegen`

Reviewed By: christophpurrer

Differential Revision: D47921708

Pulled By: rshest

fbshipit-source-id: c2c081c6317928e5eb8b0c1d0640c7b7f40a4b0b
2023-08-01 01:43:31 -07:00
szymonrybczak 529c952499 Move script checking Appium server status to separate file (#38692)
Summary:
This PR is small cleanup in `.circleci/config.yml` file. Request here: https://github.com/facebook/react-native/pull/36267#discussion_r1272050735

## Changelog:
[INTERNAL] [CHANGED] - move script checking Appium server status to separate file

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

Test Plan: CI Green 

Reviewed By: NickGerleman

Differential Revision: D47926222

Pulled By: ryancat

fbshipit-source-id: eeff338ca018549762dce46a744b80f659b4bd5d
2023-07-31 21:36:49 -07:00
Cao Doan 2856bef721 Fix nullable-to-nonnull-conversion warnings (#38677)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38677

Cleaning up some build warnings when Wnullable-to-nonnull-conversion is enabled.

Changelog: Fixes nullability warnings from `RCTConverstions.h`.

Reviewed By: christophpurrer

Differential Revision: D47886567

fbshipit-source-id: 71d33951f8565e58ba6c9414dc4a40debf94785d
2023-07-31 18:54:47 -07:00
Tim Yung ec96641a17 RN: Upgrade Deprecated ListView / PropTypes Packages (#38680)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38680

Upgrades to the recently published versions of `deprecated-react-native-listview` and `deprecated-react-native-prop-types`.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D47893357

fbshipit-source-id: 430cbb51086cfd1c346a6a5c15b2e90358ab6565
2023-07-31 17:45:47 -07:00
Nick Gerleman 3eccc53629 Remove default 50ms Scroll Event Throttling in VirtualizedList (#38648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38648

https://github.com/facebook/react-native/pull/38475 made this code no longer no-op on Android, which caused regressions documented in https://github.com/facebook/react-native/issues/38470#issuecomment-1639620459 due to VirtualizedList having more out-of-date information.

We are already coalescing scroll events on both Android and iOS, which will ensure we are not flooded with events. VirtualizedList also already inserts an artificial 50ms delay to new renders by default when high priority work is not happening (see `updateCellsBatchingPeriod`). This limits the heavy work done by VirtualizedList (no new renders or expensive math on scroll events), while letting the list still have the most recent events.

We can eventually remove this once VirtualizedList is able to use OffScreen universally.

Changelog:
[General][Changed] - Remove default 50ms Scroll Event Throttling in VirtualizedList

Reviewed By: ryancat

Differential Revision: D47823772

fbshipit-source-id: 55d22a1074235ccc1b2cf167f6b1758640c79edb
2023-07-31 13:58:56 -07:00
Eric Rozell b0a8d45e28 More consistent platform for out-of-tree platform extensions (#38703)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38703

This change consolidates the pattern for setting up out-of-tree platform options for core classes like ViewProps and ViewEventEmitter. A similar pattern was used for Touch.h. As we move towards documenting how to build an out-of-tree platform, it would be nice to specify a set of HostPlatformX classes that need to be implemented and made resolvable from specific header paths.

At this point, there is:
- HostPlatformViewProps
- HostPlatformViewEventEmitter
- HostPlatformViewTraitsInitializer
- HostPlatformTouch
- HostPlatformColor

The other benefit of this pattern is to DRY helper aliases like SharedViewEventEmitter and SharedViewProps.

## Changelog:
[General] [Added] - Use more consistent pattern for out-of-tree platform Fabric C++ class extensions

Reviewed By: christophpurrer

Differential Revision: D47917598

fbshipit-source-id: 58ee9677eefd34eb0bc2d321103314642c457cd8
2023-07-31 11:38:36 -07:00
Eric Rozell 4884322781 Allow out-of-tree platforms to extend Touch fields (#38681)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38681

Desktop platforms send additional information with onTouch(Start|Move|End|Cancel) events, including modifier keys and mouse button information.

This information has not historically been available for mobile platforms, so rather than blindly adding the fields, this change adds a hook for out-of-tree platforms to extend the data in nativeEvent payload for Fabric Touch events.

## Changelog:
[General] [Added] - Support customization of underlying Touch event representation in out-of-tree platforms

Reviewed By: christophpurrer

Differential Revision: D47896016

fbshipit-source-id: 02e3fce854302412381b0bd9254474c6bb5c63ac
2023-07-31 11:38:36 -07:00
Eric Rozell 2b688f6031 Abstract underlying Color implementation (#38668)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38668

On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors.

This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used.

## Changelog:
[General] [Added] - Support customization of underlying Color representation in out-of-tree platforms

Reviewed By: NickGerleman

Differential Revision: D47873465

fbshipit-source-id: 1dbb36be409c04ce87b356d75503ec0cf88f1c5b
2023-07-31 11:38:36 -07:00
Eric Rozell 6e3e6b574f Create option for out-of-tree platforms to customize ViewEventEmitter (#38582)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38582

Some out of tree platforms may have extra events (e.g., events for different input modalities) that don't exist on other platforms.

For example, react-native-windows and react-native-macos have `onKeyUp` and `onKeyDown` that can be emitted from any native component.

This change provides a hook for out of platforms to customize which events can be emitted from all native components.

## Changelog:
[General] [Added] - Support additional View events in out of tree platform Fabric implementations

Reviewed By: christophpurrer

Differential Revision: D47721603

fbshipit-source-id: 5ae2ff0f6c1b1dfd72b0a310c1309a85e6b170b1
2023-07-31 11:38:36 -07:00
Eric Rozell 646c75995e Create option for out-of-tree platforms to customize View traits (#38580)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38580

We already have a differential between Android and iOS View props that force view flattening (or unflattening) behaviors. Other out-of-tree platforms may have a need to customize view flattening behaviors.

This change adds a ViewTraitsInitializer header that out of tree platforms can inject to include platform-specific ViewProps fields when considering view flattening behaviors.

## Changelog:
[General] [Added] - Support customization of View traits for flattening in out of tree platform Fabric implementations

Reviewed By: christophpurrer

Differential Revision: D47721377

fbshipit-source-id: b7d6dda2f20e153a0277861d04709090756c96ce
2023-07-31 11:38:36 -07:00
Eric Rozell a0bb79d84f Create BaseViewProps for platforms to derive (#38549)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38549

Out of tree platforms may need different implementations of ViewProps. In fact, Android does already with props like `needsOffscreenAlphaCompositing` and `focusable`. This diff is not opinionated on whether these props should actually be shared on all platforms. Props like `focusable` may be a good candidate for generalizing to all platforms. However, there will always be a need for one platform to experiment with a new prop while it's not available yet on another, especially when considering out of tree platforms.

This diff moves the existing ViewProps class to BaseViewProps, aliases ViewProps as BaseViewProps for iOS for now, and moves Android-specific view props to it's own header and implementation.

## Changelog:
[General] [Added] - Support additional View props in out of tree platform Fabric implementations

Reviewed By: christophpurrer

Differential Revision: D47492635

fbshipit-source-id: 5739174a2b1d28ba84f4398ccc1cc0b846ebea79
2023-07-31 11:38:36 -07:00
Siddarth Kumar 8bcfc493ea add getPaperTopLevelNameDeprecated to parsers (#38683)
Summary:
[Codegen 135] This PR introduces `getPaperTopLevelNameDeprecated` to parser base class and abstracts the logic out of typescript and parser events as requested on https://github.com/facebook/react-native/issues/34872

## Changelog:

[Internal] [Changed] - Add `getPaperTopLevelNameDeprecated` to parser base class and update usages.

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

Test Plan:
Run `yarn jest react-native-codegen` locally and ensure CI is green

## Screenshot of test passing locally:
<img width="1060" alt="Screenshot 2023-07-30 at 10 04 24 AM" src="https://github.com/facebook/react-native/assets/64726664/3f61377b-9f44-45e8-bece-d4fd6bcc4567">

Reviewed By: cipolleschi

Differential Revision: D47902816

Pulled By: rshest

fbshipit-source-id: 6fab53e02cfc3f0aaa3ffd795c3fe1d2f723e060
2023-07-31 07:52:19 -07:00
Dmitry Rykun 1ba7bc0eb1 Do not enable bridgeless mode when RCT_NEW_ARCH_ENABLED=1 (#38690)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38690

Bridgeless mode needs static view configs support. Let's not not enable it until this support is shipped to OSS.
Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D47913713

fbshipit-source-id: 207be574295455cc215f907803b596bf48dca88b
2023-07-31 06:18:08 -07:00
Phillip Pan 682887587b cleanup turbomodule eager init (#38540)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38540

Changelog: [Internal]

this is never set to yes, clean it up

we need to decide if this is actually part of our feature set

Reviewed By: cipolleschi

Differential Revision: D47620233

fbshipit-source-id: 6f530015da0645d721bef7ff7c5d512113273b1a
2023-07-31 06:06:06 -07:00
Phillip Pan de7c0655f0 cleanup RCTDisableTurboModuleManagerDelegateLocking (#38522)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38522

Changelog: [Internal]

as title

Reviewed By: mdvacca

Differential Revision: D47619958

fbshipit-source-id: f37efe205b4bf607dc5d159f87104edbf794c6eb
2023-07-31 06:06:06 -07:00
Alex Hunt aab52859a4 Add Flow libdef for @babel/register (#38691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38691

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47835803

fbshipit-source-id: 05d8379568862ae882f950d22f3b922d91f0460c
2023-07-31 06:04:09 -07:00
Denis 6d5be2630c refactor(codegen): add getLiteralValue in parser (#38651)
Summary:
[Codegen 130] This PR add a `getLiteralValue` function to the Parser interface, which returns the literal value of an union represented, given an option. as requested on https://github.com/facebook/react-native/issues/34872

## Changelog:

[INTERNAL] [ADDED] - Add `getLiteralValue` function to codegen Parser

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

Test Plan: Run `yarn jest react-native-codegen` and ensure CI is green

Reviewed By: cipolleschi

Differential Revision: D47912960

Pulled By: rshest

fbshipit-source-id: d9426fef4c0f92c5244d5c4c72202ec29099b76e
2023-07-31 04:56:25 -07:00
William Bell 8a63b91525 Update new_architecture.rb for React-ImageManager (#38247)
Summary:
This added React-ImageManager to the use_frameworks! - a lot of rpm modules podspec need this.

bypass-github-export-checks

## Changelog:

[iOS] [FIXED] - Add React-ImageManager path to work with use_frameworks!

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

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

Test Plan: Should not be breaking - it will add to the header_search_paths React-ImageManager

Reviewed By: dmytrorykun

Differential Revision: D47593749

Pulled By: cipolleschi

fbshipit-source-id: a66e90707e5fa73573deab1f04e8d8693869a90c
2023-07-31 04:04:20 -07:00
David Vacca cbf9408dd0 Introduce FrameworkAPI annotation to document APIs that are provided ONLY for frameworks (#38686)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38686

In this diff I'm introducing the FrameworkAPI annotation to document APIs that are provided ONLY for frameworks

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D47839411

fbshipit-source-id: 254a1f6cd42279478fba0ddb3f3736bb2b675bae
2023-07-30 11:54:13 -07:00
David Vacca 17ebe6cd69 Ez fix lint warn (#38595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38595

 Ez fix lint warn

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D47565845

fbshipit-source-id: 6337831031fd4060bcc9168e8ae0be2655718241
2023-07-30 11:54:13 -07:00
David Vacca 2ef711cf45 Add proper Override annotation into ReactPackageTurboModuleManagerDelegate methods (#38589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38589

Add proper Override annotation into ReactPackageTurboModuleManagerDelegate methods

changelog: [internal] internal

Reviewed By: christophpurrer, cortinico

Differential Revision: D47483652

fbshipit-source-id: 3b3bccdccdc3efa6ee7221830ee39735cd1b1758
2023-07-30 11:54:13 -07:00
David Vacca ea5bf30a1b Update comment in ReactInstance to properly descrube package visibility (#38590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38590

Update comment in ReactInstance to properly descrube package visibility

changelog: [internal] internal

Reviewed By: christophpurrer, cortinico

Differential Revision: D47483651

fbshipit-source-id: 1743bc76f515eb1cf2021e422b08f62f316b8ef9
2023-07-30 11:54:13 -07:00
David Vacca 0cac88fa65 Android deprecate JSCJavaScriptExecutorFactory and JSCJavaScriptExecutor (#38594)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38594

These classes are deprecated in favor of com.facebook.react.jscexecutor instead

changelog: [Android][Changed] Deprecate JSCJavaScriptExecutorFactory and JSCJavaScriptExecutor, use com.facebook.react.jscexecutor instead

Reviewed By: christophpurrer, cortinico

Differential Revision: D47483650

fbshipit-source-id: 5c29cf2bfff201468f171f1529e76ecf65244731
2023-07-30 11:54:13 -07:00
Riccardo Cipolleschi 62c9aaea9b Remove the package_and_publish_release_dryrun workflow (#38533)
Summary:
The `package_and_publish_release_dryrun` workflow does the same steps that we are actually already doing in the `tests` workflow.
Both workflows are triggered when `run_nightly_workflow == false && run_release_workflow == false` so the triggering condition **is the same**

The following table highlights and compares the steps performed by the two workflows:

| Package_and_publish_release_dryrun | Tests |
| --- | --- |
| `prepare_package_for_release(version: ‘’, latest: false, dryrun: true)` | |
| `prepare_hermes_workspace` | `prepare_hermes_workspace` |
| `build_hermesc_linux` | `build_hermesc_linux` |
| `build_hermes_macos(flavor: Debug | Release)` | `build_hermes_macos(flavor: Debug | Release)` |
| `build_hermesc_windows` | `build_hermesc_windows` |
| `build_npm_package (release_type: dry-run)` | `build_npm_package(release_type: dry-run)` |

The only missing job in `tests` workflow is `prepare_package_for_release`. This job has the following features:
1. It invokes the `prepare-package-for-release.js` scripts, actually testing it.
2. It doesn’t cache anything,
3. it doesn’t attach any workspace

Due to 2 and 3, it means that it does not influence any job that follow it in the pipeline as they won't access any of the results from this job.

So, we are adding this job in the Test pipeline, so we exercise the `prepare-package-for-release.js` making sure that it works,  and remove
the whole `package_and_publish_release_dryrun` wroflow as it will now be completely duplicated

## Changelog:

[Internal] - Remove the `package_and_publish_release_dryrun` workflow

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

Test Plan: CircleCI stays green

Reviewed By: cortinico

Differential Revision: D47633526

Pulled By: cipolleschi

fbshipit-source-id: 28ea9c5944931b992ad07fdeecf08e1d1a86b775
2023-07-30 07:57:49 -07:00
Intl Scheduler 265f72f6da translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907931550347
Sandcastle Job Instance ID: 31525198397291914
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47898016

fbshipit-source-id: cdfa4975162969626581cf139c7411195ea9bc37
2023-07-29 12:02:45 -07:00
David Vacca 4e8a321d3b Reduce visibility of log() method (#38597)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38597

Reduce visibility of log() method

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D47455664

fbshipit-source-id: a41bc430fe05edb0d048050a4a0c04727f61a934
2023-07-29 11:20:24 -07:00
David Vacca 3e1456311a Delete ContextBasedJavaModule (#38592)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38592

ContextBasedJavaModule is not used, neither internally or externdally. We are just deleting it

changelog: [internal] intenral

Reviewed By: christophpurrer, cortinico

Differential Revision: D47450518

fbshipit-source-id: b431adbe30c72491723b8821b3c59e0e8e7030f1
2023-07-29 11:20:24 -07:00
David Vacca b77f265afe Reduce visibility of JavaMethodWrapper and JavaModuleWrapper to package only (#38591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38591

Reduce visibility of JavaMethodWrapper and JavaModuleWrapper to package only

changelog: [internal] internal

Reviewed By: christophpurrer, cortinico

Differential Revision: D47449525

fbshipit-source-id: a1a573c31fbe3402f32d05005848fc113419a00a
2023-07-29 11:20:24 -07:00
David Vacca faae720e41 Fix lint warns (#38596)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38596

Fix lint warns

changelog: [internal] internal

Reviewed By: arushikesarwani94

Differential Revision: D47445900

fbshipit-source-id: af1d30e3889050c15d015cd6f1c35c73210167d9
2023-07-29 11:20:24 -07:00
David Vacca e9246852df Extract loading of turbomodulejsijni into its own function (#38320)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38320

In this diff I'm extracting the loading of turbomodulejsijni into its own function. This could have perf implications as we are trying to load multimple times the same soLoader

changelog: [intenral] internal

Reviewed By: luluwu2032

Differential Revision: D47409162

fbshipit-source-id: 007e89e99ec0e7fa494d811f9c830b1363acec19
2023-07-29 11:20:24 -07:00
Davyd Narbutovich 1383a59ed2 Replace JSX.Element with React.JSX.Element (#38615)
Summary:
the global `JSX` namespace was depreacted in react 18:

```tsx
declare global {
    /**
     * deprecated Use `React.JSX` instead of the global `JSX` namespace.
     */
    namespace JSX {
```

## Changelog:

[GENERAL] [CHANGED] - Replace `JSX.Element` with `React.JSX.Element` in `App.tsx` template

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

Test Plan:
Before

<img width="686" alt="Screenshot 2023-07-25 at 14 11 59" src="https://github.com/facebook/react-native/assets/4661784/531a4f88-8090-43aa-86d6-4af595d4cb5d">

After

<img width="445" alt="Screenshot 2023-07-25 at 14 12 12" src="https://github.com/facebook/react-native/assets/4661784/3b427938-2768-4131-b77a-62045e5b8d08">

Reviewed By: rshest

Differential Revision: D47873435

Pulled By: NickGerleman

fbshipit-source-id: c8a9e0e8e96a54c6ee66fcae2392e0d20d20d026
2023-07-28 21:42:41 -07:00
Ed Voas 823b79584d Export StartupLogger
Summary: Export StartupLogger

Differential Revision: D47883845

fbshipit-source-id: 8429f4f7f157b1b26623920557347dd80c154850
2023-07-28 16:58:43 -07:00
Eric Rozell a830223f95 Fix OSS gradle build for ReactCommon/react/renderer/graphics (#38644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38644

It's likely that some components consuming react/renderer/graphics headers are consuming the wrong PlatformColorParser header, since the implementation under platform/android is quite different from the implementation under platform/cxx.

This change should hoist the correct headers to react/renderer/graphics when building Fabric in OSS.

## Changelog:
[General] [Fixed] - Fix headers for react/renderer/graphics for Fabric Android

Reviewed By: cortinico, NickGerleman

Differential Revision: D47821848

fbshipit-source-id: a2f2b057aa73c1c6b4a00e2c3e508cebb6e6facf
2023-07-28 15:45:53 -07:00
Nick Gerleman c168a4f88b Fix invariant violation when maintainVisibleContentPosition adjustment moves window before list start (#38655)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38655

https://github.com/facebook/react-native/pull/35993 added logic in VirtualizedList to support `maintainVisibleContentPosition`. This logic makes sure that a previously visible cell being used as an anchor remains rendered after new content is added.

The strategy here is to calculate the difference in previous and new positions of the anchor, and move the render window to its new location during item change. `minIndexForVisible` is used as this anchor.

When an item change moves the anchor to a position below `minIndexForVisible`, shifting the render window may result in a window which starts before zero. This fixes up `_constrainToItemCount()` to handle this.

Changelog:
[General][Fixed] - Fix invariant violation when `maintainVisibleContentPosition` adjustment moves window before list start

Reviewed By: yungsters

Differential Revision: D47846165

fbshipit-source-id: 8a36f66fdad321acb255745dad85618d28c54dba
2023-07-28 12:55:17 -07:00
Hanno J. Gödecke 3dd816c6b7 Add workaround fix for #35350 (#38073)
Summary:
This PR is a result of this PR, which got merged but then reverted:

- https://github.com/facebook/react-native/pull/37913

We are trying to implement a workaround for https://github.com/facebook/react-native/issues/35350, so react-native users on android API 33+ can use `<FlatList inverted={true} />` without running into ANRs.

As explained in the issue, starting from android API 33 there are severe performance issues when using scaleY: -1 on a view, and its child view, which is what we are doing when inverting the ScrollView component (e.g. in FlatList).

This PR adds a workaround. The workaround is to also scale on the X-Axis which causes a different transform matrix to be created, that doesn't cause the ANR (see the issue for details).
However, when doing that the vertical scroll bar will be on the wrong side, thus we switch the position in the native code once we detect that the list is inverted, using the newly added `isInvertedVirtualizedList` prop.

This is a follow up PR to:

- https://github.com/facebook/react-native/pull/38071

⚠️ **Note:** [38071](https://github.com/facebook/react-native/pull/38071) needs to be merged and shipped first! Only then we can merge this PR.

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

[ANDROID] [FIXED] - ANR when having an inverted FlatList on android API 33+

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

Test Plan:
- Check the RN tester app and see that scrollview is still working as expected
- Add the `internalAndroidApplyInvertedFix` prop as test to a scrollview and see how the scrollbar will change position.

Reviewed By: cortinico

Differential Revision: D47848063

Pulled By: NickGerleman

fbshipit-source-id: 4a6948a8b89f0b39f01b7a2d44dba740c53fabb3
2023-07-28 10:55:52 -07:00