Commit Graph

12270 Commits

Author SHA1 Message Date
Facebook Community Bot 88fb0218fb Re-sync with internal repository (#49811) 2025-03-04 11:55:38 +00:00
David Vacca 25d501df7e Annotate LegacyArchitecture classes for com/facebook/react/uimanager package (#49764)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49764

Annotate LegacyArchitecture classes for com/facebook/react/uimanager package

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441495

fbshipit-source-id: fd3e5b3a40dffc31197df2153cde528bc723a2ab
2025-03-03 17:31:27 -08:00
David Vacca 8254758f74 Annotate Legacy Architecture classes of com/facebook/react (#49765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49765

Annotate Legacy Architecture classes of com/facebook/react

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441494

fbshipit-source-id: bc677ce508a0d119258819fc6a02d339dc5d8e9a
2025-03-03 17:31:27 -08:00
David Vacca 7d71f5d2de Mark Bridge classes as LegacyArchitecture (#49763)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49763

Mark Bridge classes as LegacyArchitecture

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D70429646

fbshipit-source-id: 12b4ff95f337b046a9f377529d92eac70c16e7ea
2025-03-03 17:31:27 -08:00
David Vacca a8c4b3a274 Mark all LayoutAnination classes as LegacyArchitecture (#49761)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49761

LayoutAnination classes are not used on the new architecture, this diff marks the as LegacyArchitecture to drive its removal

Changelog: [Internal] internal

Reviewed By: rshest

Differential Revision: D70410096

fbshipit-source-id: cda84958985c4133c926455a5c9611773a0d32ec
2025-03-03 17:31:27 -08:00
David Vacca 9915cf0811 Annotate as LegacyArchitecture classes from devSupport, internal and jsexecutor (#49766)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49766

Annotate as LegacyArchitecture classes from devSupport, internal and jsexecutor

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441497

fbshipit-source-id: bfb4f5ce7dc4c73e120bdf00ebc21ffd07b5b43b
2025-03-03 17:08:21 -08:00
David Vacca 40b38d0a44 Delete Deprecated classs StandardCharsets (#49762)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49762

Delete Deprecated classs StandardCharsets

changelog: [Android][Breaking] Delete Deprecated classs StandardCharsets

Reviewed By: rshest

Differential Revision: D70441496

fbshipit-source-id: f8f9cf9fc5a90d73d79a6493c7343a80f683c237
2025-03-03 17:08:21 -08:00
Nicola Corti c4c3d3bfbe Do not use $ in identifiers for event emitters. (#49792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49792

This removes the `$` from the `event` and `payload` identifier inside codegen.
This is causing the `-Wdollar-in-identifier-extension` warning to fire.

As I'm looking into enabling `-Wall -Werror` for React Common, this should be addressed as well.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D70500543

fbshipit-source-id: c593680961b1b98561c3985f92ade5d6ba448ac9
2025-03-03 16:47:46 -08:00
Nicola Corti a724b27301 Remove _Nullable from jni_lib_merge.
Summary:
This is causing the `-Wno-nullability-extension` warning to fire.
As I'm looking into enabling `Wall Werror` for ReactCommon, this should be fixed as it's causing the build to fail.

We don't use nullability extensions at all in the other JNI_OnLoad files, so it's fine (and probably better) we
replace them with a function that also doens't specify a Nullability annotation.

This is impacting only the OSS So Merging toolchain.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: cipolleschi

Differential Revision: D70500544

fbshipit-source-id: 2d5b52d8f34ec026a25e8625bd0c6a1812221dea
2025-03-03 16:47:46 -08:00
Riccardo Cipolleschi 53eaf3e4e4 Back out "fix: avoid race condition crash in [RCTDataRequestHandler invalidate]" (#49797)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49797

Backing D70314889 as it was breaking some internal tests.

I verified that before the backout the tests were failing and after the backout they were not.

## Changelog:
[iOS][Changed] - Reverted  fix: avoid race condition crash in [RCTDataRequestHandler invalidate].

Reviewed By: Abbondanzo

Differential Revision: D70511155

fbshipit-source-id: 276f6947aa6bb648c9c9eeb5c342f336acc8a26f
2025-03-03 15:25:46 -08:00
Samuel Susla 5e39bd6131 move initialisation of UIKit proxies to RCTHost initialisation (#49790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49790

changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D70399708

fbshipit-source-id: f9883616377343f6c29eaa0ccee8681967fa570c
2025-03-03 10:24:28 -08:00
Jorge Cabiedes Acosta df282a0538 Add prerelease staging API for iOS (#49650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49650

- Added a new template to React Native's Feature Flag's script for Canary and Experimental prerelease stages iOS
- Overload initWithDelegate to add optional releaseLevel parameter
- Add Obj-C enum for Release Level
- Use static variables to keep the context on whether a ReactNative Factory has been created and with which flags it has been created.
- Crash in case we try to create multiple factories with different feature flags.
- Creating multiple factories with the same feature flags is allowed

Changelog: [iOS] [Added] - On `RCTReactNativeFactory` add `initWithDelegate` overload with argument to specify release level for an application

Reviewed By: cipolleschi

Differential Revision: D70106210

fbshipit-source-id: 14fe4c8571621a75a7064f1ffd02a07270cea43a
2025-03-03 09:52:26 -08:00
Nicola Corti 5f0c857c0e Move react-native-flags.cmake to ReactCommon (#49745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49745

It turns out we want those flags to be available also inside ReactCommon so I'm moving it there.
This will allow us to reference them also inside ReactCommon and will make sure Common does not depend on Android

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386742

fbshipit-source-id: 3675c01f5e3f6515af6423d75e3fe145ba3d8936
2025-03-03 09:41:24 -08:00
Nicola Corti d8b714488b Use target_compile_reactnative_options for the remaining third-party libs (#49743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49743

Those 3rd party CMake libraries were not using our compiler flags correctly.
This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386743

fbshipit-source-id: e35688f7eb3fa9bcdda1180023006d267782ceaf
2025-03-03 09:41:24 -08:00
Nicola Corti 87466a2025 Use target_compile_reactnative_options on all the remaining ReactAndroid targets (#49744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49744

Those targets inside ReactAndroid were not setting the compiler flags correctly for React Native.
This change fixes them.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386747

fbshipit-source-id: 424e93c444347db88c941d442e0eaeedf2b1bee1
2025-03-03 09:41:24 -08:00
Nicola Corti fb55ab9c84 Introduce the target_compile_reactnative_options function (#49747)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49747

I'm adding the `target_compile_reactnative_options` to centralize the management
of compilation flags for React Native CMake build.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386746

fbshipit-source-id: aefbd5a073d9fab48d09ebbba6507377ef626d73
2025-03-03 09:41:24 -08:00
Pieter De Baets d3b203f2cb Cleanup enableAnimatedClearImmediateFix (#49787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49787

We're not experimenting with this, so cleanup the code.

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D70488980

fbshipit-source-id: 12e93b7f8fb89e3bb1f06c8f734b782286f3fad3
2025-03-03 08:04:27 -08:00
Rob Hogan 035142e62d metro-config: Don't always assert import/require with unstable_enablePackageExports (#49780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49780

Now that we're using a minimum Metro version of 0.81.3, Metro will dynamically assert `import` or `require` based on the style of the import at source.

Asserting both is likely to cause issues with `babel/runtime` and potentially other packages - see https://github.com/facebook/metro/pull/1447.

Changelog:
[Internal] metro-config: Assert import/require dynamically when using `unstable_enablePackageExports` with Metro.

Reviewed By: hoxyq

Differential Revision: D70473577

fbshipit-source-id: b3e6fbd78e2b6fc0f9a16ec3db2c19698848e6d1
2025-03-03 07:58:20 -08:00
Rob Hogan 6606a1da84 Update Metro ^0.81.0 -> ^0.81.3 || ^0.82.0 (#49779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49779

Changelog:
[General][Changed] Bump minimum Metro from 0.81.0 to ^0.81.3 || ^0.82.0

Reviewed By: hoxyq

Differential Revision: D70473389

fbshipit-source-id: aee3cb073fef420fd7bc1efedb0b48411b038c44
2025-03-03 07:58:20 -08:00
Riccardo Cipolleschi b8a0499ce4 Publish dSYMs for RN Dependencies (#49782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49782

This commit adds the configuration to upload the ReactNativeDependencies.dSYM files to maven

## Changelog:
[Internal] - Add code to upload dSYMs to Maven

Reviewed By: cortinico

Differential Revision: D70485966

fbshipit-source-id: 129dea1c75181f22e9bf304e39ac91835bb87b39
2025-03-03 07:26:36 -08:00
Nicola Corti cee63397bf Remove unnecessary -Wno-error=cpp (#49746)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49746

This flag is no longer necessary since RN 0.73 so I'm cleaning it up.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D70386741

fbshipit-source-id: c2c8f998fa7b97985396b26345cfcf3474effc7b
2025-03-03 06:52:22 -08:00
Ruslan Lesiutin 81e490164f Update debugger-frontend from 3adf51a...97e9912 (#49784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49784

Changelog: [Internal] - Update `react-native/debugger-frontend` from 3adf51a...97e9912

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/3adf51aa915c2deb26f5d373751a15b4d0c8f259...97e9912605ce73b06f67fc607c1a5c434a67d6de).

Reviewed By: huntie

Differential Revision: D70487787

fbshipit-source-id: 6f3b47a254f45b770798ff3af8ade1c9a6d7fc64
2025-03-03 06:08:30 -08:00
Oskar Kwaśniewski 515ff1e626 fix: return nullptr when USE_THIRD_PARTY_JSC is set to true (#49781)
Summary:
When setting `USE_THIRD_PARTY_JSC=1`, we don't return anything from createJSRuntimeFactory function:

![CleanShot 2025-03-03 at 13 05 24@2x](https://github.com/user-attachments/assets/090ca47a-77f8-4a1b-9171-79b5e4ce91fb)

It's meant to be overwritten, but we must satisfy the compiler.

## Changelog:

[IOS] [FIXED] - return nullptr when USE_THIRD_PARTY_JSC is set to true

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

Test Plan: CI Green

Reviewed By: cortinico

Differential Revision: D70486837

Pulled By: cipolleschi

fbshipit-source-id: c09622f75608dc203d41167fc375a000a2f12e37
2025-03-03 06:01:23 -08:00
Saad Najmi 6bc5ddea3e fix: avoid race condition crash in [RCTDataRequestHandler invalidate] (#49705)
Summary:
Upstreaming a fix by ntre that fixes a crash we saw internally related to `[_queue cancelAllOperations]`.

>Calling [_queue cancelAllOperations] will release all references to any active operations.
>If the blocks of those operations have a reference to itself, it will result in dangling pointers, which could conceptually trigger a later crash if there's a race between the operation completing and it being pulled out of the queue.
>
>Add explicit strong reference while block is running.
>For good measure, fix same pattern also in RCTFileRequestHandler.
>
>Note: separately, that this code is passing the op itself as a requestToken to [delegate URLRequest:] methods is suspect. That delegate can retain said token.

## Changelog:

[IOS] [FIXED] - avoid race condition crash in [RCTDataRequestHandler invalidate]

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

Test Plan: Tested internally, we no longer saw the crash after this fix.

Reviewed By: javache

Differential Revision: D70314889

Pulled By: cipolleschi

fbshipit-source-id: ebcecb4675bd1dda3d9ee60d69967feb4e05e11b
2025-03-03 05:58:07 -08:00
Jakub Piasecki 13ac1a9a88 Align FlatList types with OSS (#49713)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49713

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70317013

fbshipit-source-id: f131cb204135a2a41aa7d3bafe13fc7b44446036
2025-03-03 04:06:39 -08:00
Dawid Małecki 569c01e141 Add Text to buildTypes and align Flow with TS (#49774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49774

Changelog:
[Internal] - Added Text to buildTypes and aligned Flow with TS

Reviewed By: huntie

Differential Revision: D70324061

fbshipit-source-id: 2a032317acdc0a119f5d33da86a40461f8c60ab1
2025-03-03 04:02:18 -08:00
Alex Hunt 2acb407562 Update references to relocated react-native-devtools-frontend repo (#49777)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49777

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D70485084

fbshipit-source-id: d6243b3bc607af39c67c3f1cebdf0b53a3502538
2025-03-03 03:49:04 -08:00
Oskar Kwaśniewski ae7bbe06c9 fix: make React Native work without AppDelegate window property (#49748)
Summary:
This PR makes React Native not relying on the `window` property in AppDelegate. When running in SwiftUI lifecycle mode / SceneDelegate mode there is window property on AppDelegate. This PR fixes crashes that happen because RN asserts window property is there.

## Changelog:

[IOS] [FIXED] - make React Native work without AppDelegate window property

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

Test Plan: CI Green

Reviewed By: javache

Differential Revision: D70389691

Pulled By: cipolleschi

fbshipit-source-id: fe39f123b47014ba91a080239ccd298192c92a6a
2025-03-03 03:47:46 -08:00
Vitali Zaidman 21c85ef52d batch debug logging for cdp messages (#49726)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49726

The `InspectorProxy` debug logging became incredibly spammy making it almost unuseful unless the output is manipulated so this commit batches all these cdp messages and only desplays how many were received in the span of 5s. If no messages are received, the throttle is not triggered.

To get the actual CDP messages logged, we still log these to `Metro:InspectorProxyCDPMessages`.

Changelog:
[General][Internal] batch debug logging for cdp messages

Reviewed By: robhogan

Differential Revision: D70324724

fbshipit-source-id: a269302f52e18af6c4be651758c042596abdbad8
2025-03-03 01:49:39 -08:00
Riccardo Cipolleschi 0bb6243550 Compress xcframework to let sonatype sign it (#49753)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49753

Sonatype cannot sign folders. It needs a file to be signed.
To make it happen, we are compressing the xcframeworks and the dSYM with tar, and we are uploading those files instead of the folders

I also observed that the cache keys were not computed correctly, so I'm fixing them.

## Changelog:
[Internal] - use tar.gz instad of folders for dSYM and xcframeworks

Reviewed By: bvanderhoof, mofeiZ

Differential Revision: D70409314

fbshipit-source-id: 20a5ee4f24b644f4f087974ad6b0831d5769b1d9
2025-02-28 14:00:43 -08:00
Riccardo Cipolleschi 33c0112b63 Configure gradle to publish RNDependencies to Maven (#49749)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49749

This change configures gradle and CI to properly publish the RNDependencies artifacts to Maven Central

## Changelog
[Internal] - Configure gradle to publish on Maven Central

Reviewed By: cortinico

Differential Revision: D70390191

fbshipit-source-id: fc1e1070325240584cb07fb17e58118c4c583fa9
2025-02-28 09:05:37 -08:00
Jakub Piasecki 167a1a30da Improve text measurement for multiline TextInput on iOS (#49711)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49711

Changelog: [IOS][CHANGED] - Moved workaround for multiline text measurement with `maximumNumberOfLines` earlier in the pipeline

Reviewed By: huntie

Differential Revision: D70314397

fbshipit-source-id: ef7dbf0c4bb3d5053328d81b7d5b8208e92ee7f5
2025-02-28 07:52:03 -08:00
Samuel Susla 2b93377a9c add e2e test for AppState module (#49680)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49680

changelog: [internal]

add an end to end test for AppState module.

Reviewed By: rshest

Differential Revision: D70184850

fbshipit-source-id: ead1388ceb1018e7615e50f846f3c95224be97d0
2025-02-28 07:41:47 -08:00
Iwo Plaza 5fc2484440 Align useAnimatedValue with OSS types (#49643)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49643

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
Aligns `useAnimatedValue.js` with its manual .d.ts types.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70096210

fbshipit-source-id: c3cd517eccf1cb68400772ddde6e5891861c927d
2025-02-28 06:33:21 -08:00
Vitali Zaidman 0289e4061e fix race condition in getPages test for device disconnection (#49741)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49741

While the test delay `PAGES_POLLING_DELAY` is usually enough to be equal to `PAGES_POLLING_INTERVAL`, in some cases we need extra time to sync that with the polling in `Devices.js`.

Changelog:
[General][Internal] - fix test

Reviewed By: huntie

Differential Revision: D70384823

fbshipit-source-id: ccb18884d32dc27636dbbb3a9786412056f90830
2025-02-28 06:24:03 -08:00
Rubén Norte 84a1211773 Strip all "bom" types that are actually not defined in RN (#49730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49730

Changelog: [internal]

This removes all the types from "bom" that are actually not implemented in RN. For now, we're just stripping whole interfaces and not looking into specific methods/properties in interfaces that we do implement but not 100%.

`Performance`, `PerformanceObserver`, `MutationObserver` and `IntersectionObserver` are implemented but not stable yet, so they aren't exposed as globals in the types.

Reviewed By: huntie

Differential Revision: D70329185

fbshipit-source-id: 63bac619e100ca66b41df071df80dfa73d0f9651
2025-02-28 05:58:45 -08:00
Rubén Norte 52713eeff3 Refactor IntersectionObserver, MutationObserver and PerformanceObserver options as interfaces (#49737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49737

Changelog: [internal]

Just a minor change to align with similar other option bags and TypeScript definitions.

Reviewed By: huntie

Differential Revision: D70355669

fbshipit-source-id: 37c44338c7b358eb2d25e8a14c75a78545b34bf1
2025-02-28 05:58:45 -08:00
Rubén Norte eb877cba39 Remove references to service workers in RN globals (#49727)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49727

Changelog: [internal]

React Native doesn't define or use Service Workers, so this entire section for types is unnecessary.

Reviewed By: cortinico

Differential Revision: D70327703

fbshipit-source-id: b998eade21d19ed124824cb255a37cb9e805d151
2025-02-28 05:58:45 -08:00
Rubén Norte e808011b26 Move environment types (globals) from flow-typed/environment to src/types (#49724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49724

Changelog: [internal]

This moves the type definitions for the globals defined by React Native from the repository root to the `react-native` package, in the same directory as the existing TypeScript definitions. This will make it easier for end users to configure the globals from RN using the right source of truth.

Reviewed By: huntie

Differential Revision: D70322032

fbshipit-source-id: 932df75ded0c254f2acb32e865cbbb9474c94159
2025-02-28 05:58:45 -08:00
Jakub Piasecki be59427448 Align ProgressBarAndroid types with OSS (#49663)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49663

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70176068

fbshipit-source-id: 0a1febb390affc2a3123e49e88b039b390a34387
2025-02-28 05:46:48 -08:00
Iwo Plaza 42cea2dc9c (reattempt) Use implicit namespace to better align Animated module with OSS types (#49685)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49685

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
Renames `Animated.js` to `AnimatedExports.js`, and introduces an intermediate file that reexports `* as Animated` as a default. This should have equivalent runtime behavior, but allows for a common interface file: `Animated.js.flow` to reinterpret the module as having single exports. TypeScript treats this as a namespace.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70237239

fbshipit-source-id: f552490cb6bb721c6163272689ec9b6c68386574
2025-02-28 05:03:55 -08:00
Dawid Małecki 8919fc3243 Set optional ref on View and split View Props (#49725)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49725

Changelog:
[Internal] - Set optional ref on View and split View Props

Reviewed By: huntie

Differential Revision: D70327820

fbshipit-source-id: 2021125b0aff1497df50c2be73c2ecfc7e8f1157
2025-02-28 01:15:07 -08:00
Shawn Dempsey d0a101fbea Add guard for custom module provider lookup in TMManager (#49738)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49738

**Context**

- D70012142 added TM module provider support
- This was causing RN MacOS to silently fail to load any platform modules since it didn't implement the delegate method

Changelog:
[iOS][Fixed] - Add guard for custom module provider lookup in TMManager

Reviewed By: sbuggay

Differential Revision: D70357542

fbshipit-source-id: 5b338616655ecb84cdb3c60e243fdb99444af657
2025-02-27 18:41:41 -08:00
generatedunixname89002005232357 587d849c23 Revert D70200854
Summary:
This diff reverts D70200854
To revert for S494669

#bypass-github-export-checks
bypass-github-export-checks

Reviewed By: NickGerleman

Differential Revision: D70347605

fbshipit-source-id: 454cb0a8f5a7562cd6602c32f4978b129821730c
2025-02-27 15:42:38 -08:00
Joe Vilches 144f44f653 Reorder the contents in ReactAccessibilityDelegate.java to be more logical (#49735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49735

I always get confused when I open this file. One of the main reasons is the order of contents is quite random, so I decided to reorder things. I tried to find a style guide on this but the [google ones](https://google.github.io/styleguide/javaguide.html#s3.4.2-ordering-class-contents) really just say do something that is logical so...

In general what I did was

* All instance variables, class variables, class constants, etc. are at the top of the class
* The constructor, `setDelegate`, `resetDelegate` methods are at the top of the class since these all deal with creating or destroying instances of this class
* Nested enums towards the bottom of the class so they are not in the way of people trying to reason about the methods and other contents (they are quite long)
* Delete random extra spaces / unneeded comments
* Move some private methods to be closer to the public methods that call them

Changelog: [Internal]

Reviewed By: mlord93

Differential Revision: D70345882

fbshipit-source-id: a8425c7b90c5d4fbea5ee5daa3c4ff9f7f189ce5
2025-02-27 15:38:15 -08:00
Jorge Cabiedes Acosta 19c18eb995 Add prerelease staging API for Android (#49649)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49649

- Added a new template to React Native's Feature Flag's script for Canary and Experimental prerelease stages
- Added a parameter to `DefaultNewArchitectureEntryPoint.kt` to select prerelease stage

Changelog: [Android] [Added] - On `DefaultNewArchitectureEntryPoint` class add property to specify the desired release level for an application

Reviewed By: rubennorte, mdvacca

Differential Revision: D69412971

fbshipit-source-id: 1a76ac723e1e06b40aad5910604e0384b208d3a5
2025-02-27 12:38:03 -08:00
David Vacca ee7514cf49 Ensure Synchronous events are always dispatched from the UIThread (#49732)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49732

Ensure Synchronous events are always dispatched from the UIThread

changelog: [internal] internal

Reviewed By: lunaleaps, NickGerleman

Differential Revision: D70203460

fbshipit-source-id: 04fa02ae731bce579a231052e5ed7953852f61bc
2025-02-27 11:08:01 -08:00
Ruslan Lesiutin 8698ecad18 Emit synthetic Trace Events for non-bridgeless to fix trace representation (#49729)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49729

# Changelog: [Internal]

The only data source for non-bridgeless setup is JavaScript samples.

Chrome DevTools frontend is built around an assumption that thread should have at least single timeline or user timing event to be represented on a timeline view. They do it for filtering out unnecessary workers threads and other.

We will emit 2 synthetic Trace Events that should cover these requirements and recorded traces that contain only JavaScript samples should now be displayed correctly.

This is where trace bounds are calculated - https://github.com/facebookexperimental/rn-chrome-devtools-frontend/blob/3adf51aa915c2deb26f5d373751a15b4d0c8f259/front_end/models/trace/handlers/MetaHandler.ts#L169-L173

Reviewed By: huntie

Differential Revision: D70328681

fbshipit-source-id: 8eca0017d85de9ecbfb49074b439d5c4fee4aa56
2025-02-27 10:38:38 -08:00
Oskar Kwaśniewski 13177b3025 feat: warn about jsc moving to a separate repo (#49692)
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore

This PR warns about JavaScriptCore being moved in the postinstall phase:

![CleanShot 2025-02-26 at 13 35 54@2x](https://github.com/user-attachments/assets/f392f7a3-fb8b-4089-9375-2d88ba4cb60b)

as well as in the build logs:

![CleanShot 2025-02-26 at 13 35 45@2x](https://github.com/user-attachments/assets/481e44f2-c30e-43f2-8cbc-5006959a42fc)

## Changelog:

[IOS] [ADDED] - Inform users about JSC being moved to a different repo

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

Test Plan: CI Grene

Reviewed By: huntie

Differential Revision: D70321201

Pulled By: cipolleschi

fbshipit-source-id: 1a97f3bceb57079f0e63848745c1a973b6dd614d
2025-02-27 10:32:25 -08:00
Nick Lefever ed106640c3 Rename fantom_internal_flags pragma to fantom_react_fb_flags (#49728)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49728

See title.

Resolving https://www.internalfb.com/diff/D70242739?dst_version_fbid=1295747645054627&transaction_fbid=1285615715828636

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D70328653

fbshipit-source-id: c3e7377760f53bc37d1a6f3e25a0053e12d4f66e
2025-02-27 09:50:45 -08:00