Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52902
changelog: [internal]
These values must not change during view's life cycle.
Reviewed By: rshest
Differential Revision: D79165823
fbshipit-source-id: dff85d369e4f79ba88740b0f3a23b71af5ec0c5e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52901
I'm removing this class as we should not expose it publicly.
It's not used at all inside react-native and can potentally be moved internally.
The only usage I've found in OSS is patched with this PR:
- https://github.com/fabOnReact/react-native-wear-connectivity/pull/46
Changelog:
[Android] [Removed] - Remove the `com.facebook.react.bridge.JSONArguments` class
Reviewed By: javache, mdvacca
Differential Revision: D78265165
fbshipit-source-id: 704575e7b9cfd6d40980511d6064d39991b3eb48
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52887
Syncs Reac 19.1.1 into React Native.
This commit should contains the fix for:
- React owner stack in React Native
- An issue with React holding shadow node for longer than it needed
- An issue that made `startTransition` not working with React Native.
## Changelog:
[General][Changed] - Bumped React to 19.1.1
bypass-github-export-checks
Reviewed By: cortinico
Differential Revision: D79096406
fbshipit-source-id: cbb2f846b1f08ba5ff482cfed5aaddc16df075cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52898
Changelog: [internal]
This test is flaky on Github and I haven't been able to reproduce it locally to debug exactly why, but I think it might be because there might be cross-tests pollution.
This tries to reduce that making sure we clean up everything between tests.
Reviewed By: cortinico
Differential Revision: D79163809
fbshipit-source-id: fe59315373ab74ccedd7e031816a84f0566b4aa0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52885
Since we recently touched the `MatrixMathHelper` class, as we're looking into moving more matrix operations from Kotlin to C++,
I'm going to add more tests to make sure that those matrix math function are behaving correctly.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D79094323
fbshipit-source-id: 34967b42dc92338724dd20fb7f70a68734f6db28
Summary:
- The changelog docs has broken links for the pre v0.80 markdowns due to missing extension
- There are links without corresponding changelogs
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL] [FIXED] - fix changelog links and remove versions without corresponding changelogs
Pull Request resolved: https://github.com/facebook/react-native/pull/52849
Test Plan: Click on each link to see if it opens the corresponding page at the specific section
Reviewed By: christophpurrer, cortinico
Differential Revision: D79097825
Pulled By: cipolleschi
fbshipit-source-id: a92e709ccbb45a042175bd198326132bfbf37c65
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52876
Our tooling detected a couple of vulnerabilities in our package.json.
- undici
- on-headers
This change fixes these vulnerabilities.
For the on-headers vulnerabilitiy specifically, it comes from the following dependency chain:
- rn-tester > react-native-community/cli > compression > on-headers.
To fix it, we have to force the resolution to both on-headers and compression.
## Changelog:
[General][Fixed] - Fixed vulnerability on undici and on-headers
Reviewed By: cortinico
Differential Revision: D79086335
fbshipit-source-id: 44f14403196165f5f823030304102dbd0facd0ce
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52651
Changelog: [Internal]
Last year the `hermes-canary` profile was used to enable certain apps to use Static Hermes by enabling regenerator because debugger support for generator wasn't finished yet. However, we actually could have just keyed off of `options.dev` and still kept using `hermes-stable`.
The `hermes-canary` profile is actually meant to be used to run experiments. We should free up this profile to return it to the original intended purpose.
This diff makes all hermes profiles' dev mode use regenerator. Existing SH apps using `hermes-canary` should be unaffected. And apps using Hermes will change to use regenerator in dev mode, but that should be ok.
Reviewed By: robhogan
Differential Revision: D78450695
fbshipit-source-id: eb6a87fbc1f0e08d490fd0d1baa3611248f95764
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52891
Right now these are tightly coupled for no reason. The device helper just asks the root view to send the event out, which it uses ReactContext for. We can just have that be passed in and accomplish the same task.
Changelog: [Internal]
Reviewed By: Abbondanzo, rozele
Differential Revision: D79007328
fbshipit-source-id: ef0a5ac4ec0acb52fc7c2a26010811767e3c1e67
Summary:
The `EXPECT_EQ` was leading to potentially ambiguous use of `<<` when
gtest tries to print information.
Changelog: [Internal]
Reviewed By: tsaichien
Differential Revision: D78823354
fbshipit-source-id: d26de07f02eb8bb53a4dec34b5fb302681bfbef8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52889
This brings back ContextContainer::Shared (but marks it as deprecated which was removed in https://github.com/facebook/react-native/pull/52750
Changelog: [General][Fixed] Bring back ContextContainer::Shared = std::shared_ptr<const ContextContainer> alias
Reviewed By: lenaic
Differential Revision: D79112609
fbshipit-source-id: 1cb9114b98d745b846d5ddc56a01786527049e50
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52886
RNTester was using just a plain `by lazy{}` which gets flagged by our internal linter over and over.
This fixes it.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D79094496
fbshipit-source-id: 856864bf8b5e4ec1254d1793dba9e97377696408
Summary:
Update `RCTTextInputComponentView` to recycle and properly clean its `inputAccessoryView` dependency. Currently, `RCTTextInputComponentView` does not clean up this dependency during recycling, which can result in the `inputAccessoryView` being incorrectly applied to `TextInput` components that do not use an accessory view."
Related issue: https://github.com/facebook/react-native/issues/52824
Snack of the issue: https://snack.expo.dev/arturkalach/privileged-blue-sodahttps://github.com/user-attachments/assets/46a1f172-a75c-4e88-beee-059d4d2e1d0c
## Changelog:
[IOS][FIXED] Update recycling logic to clean up the `inputAccessoryView` dependency.
<!-- 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/52825
Test Plan:
```
1. Render more than eight TextInput components on the screen, each with an AccessoryView.
2. Unmount the TextInput components using conditional rendering.
3. Open a Modal that contains a KeyboardAvoidingView and a TextInput.
4. Focus on the TextInput inside the Modal.
```
https://github.com/user-attachments/assets/8be1fdef-e8ab-4030-a2c5-e952c22ef743
Reviewed By: christophpurrer
Differential Revision: D78966221
Pulled By: cipolleschi
fbshipit-source-id: 35b6748cc44c41056051b2eecd626d61c4641cdf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52877
We moved the HelloWorld package from `packages`to `private` but we didn't update the path to React Native that is consumed by metro.
This change fixes this.
## Changelog:
[Internal] -
Reviewed By: huntie
Differential Revision: D78493478
fbshipit-source-id: 8795c2963dec036693a73a16c18be381f19e11c4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52870
# Changelog: [Internal]
Defines a set of static serializers for parts of the "Profile" and "ProfileChunk" Trace Events.
Mainly for 2 reasons:
1. To follow the same pattern of static serializers for Tracing.
2. To save on string copying, since ProfileChunk could contain hundreds of unique frames, all of them could have unique function names. The previous approach would copy the strings and populate a new `folly::dynamic` object.
Reviewed By: huntie
Differential Revision: D78919218
fbshipit-source-id: 303a4fc259d6b1720ce982e144037ee56cd47e9b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52869
# Changelog: [Internal]
We are exctracting a logic for serialization of TraceEvent into a dedicated serializer class.
Conceptually:
- PerformanceTracer would be a local TraceEvent engine that is responsible for constructing and buffering TraceEvents.
- TraceEventSerializer will have a single responsibility: transforming from local structs to serialized json objects that are ready to be dispatched over CDP Tracing domain.
This would help avoid scenarios, where we are passing around `folly:dynamic` between internal subsystems: serialization should only happen right before emtting a CDP message.
Reviewed By: huntie
Differential Revision: D78738370
fbshipit-source-id: a8e33e857192a02dc048d504abe072679ef8ce82
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52868
# Changelog: [Internal]
Mainly, 2 changes:
- Callback that emits `Tracing.dataCollected` events will receive chunks as rvalues refs (`&&`), instead of `const &`.
- The RuntimeSamplingProfile will be passed to the serializer as rvalue ref.
Reviewed By: huntie
Differential Revision: D78919223
fbshipit-source-id: 7f65e0627c8839d507e6b2d088fdb0b560906b6a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52867
# Changelog: [Internal]
There are currently no reasons for these struct not to be plain, plus this would allow us avoiding potentially expensive copying, when returning `const &`.
Reviewed By: huntie
Differential Revision: D78919222
fbshipit-source-id: 7b39d754c05b25915f07202d7e4839b10a08a47c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52866
# Changelog: [Internal]
There are currently no reasons for these struct not to be plain, plus this would allow us avoiding potentially expensive copying, when returning `const &`.
Reviewed By: huntie
Differential Revision: D78919221
fbshipit-source-id: 7d3628bb213fdecadbdafa9b2b5c42472ebd77be
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52865
# Changelog: [Internal]
These doesn't have any custom internal logic, so can be flattened for simplicity.
Reviewed By: huntie
Differential Revision: D76986727
fbshipit-source-id: cf23adf43eefda92674a46217a7269399cf81f0a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52878
Now that Metro is bumped to also support node >= 20.19.4
we should be able to run test_js on `main` against 20.19.4
Changelog:
[Internal] [Changed] -
Reviewed By: robhogan, motiz88
Differential Revision: D79087608
fbshipit-source-id: 2161a893ab2fd88dc7eb1b35aa385704962018e8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52871
## Changelog:
[Internal] -
As in the title, this adds a basic Fantom benchmark test for the Image component.
Reviewed By: rubennorte
Differential Revision: D79085957
fbshipit-source-id: 4098415353c8a04992c39e39d9a1dd20270f20d7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52861
Changelog: [internal]
We added this mode recently to support all local Hermes variants, but this doubles the number of build type combinations which regresses test execution time and give us little benefit, so we're removing it.
Reviewed By: rshest
Differential Revision: D79080370
fbshipit-source-id: e1b536427acb98ec01edfd44829e2fef9be9b18d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52863
Changelog: [internal]
We're seeing some issues in stress runs for Fantom tests in optimized mode, failing when compiling the bytecode with Hermes. The specific error in the Hermes compiler isn't clear, but this started failing when we changed the folders for output. It's possible that it's due to race conditions in stress runs, where multiple workers are attempting to compile in the same locations.
This forces every output in every runner to be in a different file to prevent these possible collisions.
Reviewed By: rshest
Differential Revision: D79084242
fbshipit-source-id: b4540e2e6c5378c7fc8630ac2fea674e0ef78a14
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52848
This diff declares the `DataDetectorType` enum and defined the `dataDetectorType` property on the Android Paragraph props.
The conversions.h file holding the state conversion to MapBuffer was renamed to stateConversions.h so that it wouldn't clash with the Android conversions.h file.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D79025294
fbshipit-source-id: 52dc519ea51191f28745d91fe31e36eaba29a731
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52847
Adding the missing Android Text selectionColor prop to the `ParagraphProps` to correctly support the prop with Props 2.0
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D79023868
fbshipit-source-id: 10e04d438d9d118e6b80e8d8854e0bbb76b430ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52846
Adding the Paragraph `disabled` property for RN Android.
This diff also adds a new Text example to RNTester for disabled text.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D78990840
fbshipit-source-id: dd25b890597bc9f728f929b38c2f680631b7f476
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52845
With Android having its own props for the Paragraph component, we need to create a Host Platform specific version for the `ParagraphProps` to hold those platform specific properties.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D78990838
fbshipit-source-id: 722777a338f960fcc54846d8e8f106f51cac162c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52837
# Changelog
[Internal] -
This feature has been enabled by default for a while, and has been proven to both not cause correctness issues, and also provide tangible performance improvements.
We can remove the corresponding feature flag to improve code maintainability.
Reviewed By: rubennorte
Differential Revision: D78978302
fbshipit-source-id: 45cb865321f6e0eb449427845772fc522221514a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52225
## Changelog:
[Internal] - Fantom in RN CLI
This diff prepares the RN CI to build and run Fantom Tests
Reviewed By: cortinico
Differential Revision: D70097944
fbshipit-source-id: 163cb3f5204f7e5491f94f2fbebe11b514919cdf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52842
## Changelog:
[Internal] [Fixed] - keep track of last direct manipulation props
* so that at next time there's a ShadowTree commit (regardless of which thread), they're merged into the update mutation
* the props will stay until the view is disconnected from props node via Animated API or the view is removed/deleted. This should be expected behavior, because in RN we expect that once Animated changes a prop, subsequent react commits should not change the value.
Reviewed By: sammy-SC
Differential Revision: D78702843
fbshipit-source-id: b5e6e01a7a4f6caeea4cc1eeafaef9c3c7e51691
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52809
**Context**
Experimental V2 Performance Monitor prototype, beginning by bringing the [Interaction to Next Paint (INP)](https://web.dev/articles/inp) metric to React Native.
**This diff**
Add two new feature flags:
- `fuseboxInteractionMetricsEnabled` — Will configure sending of interaction live metrics to CDP clients, independent of an active performance profiling session.
- `perfMonitorV2Enabled` — Will enable the backend + UI for the V2 Perf Monitor.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D78894857
fbshipit-source-id: 7605357b3cc9255d76f66bde605f9e520dda9750
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52836
# Changelog
[Internal] -
This adds a basic benchmarking test for `Text` component creation, similarly to the one we already have for the e.g. `View`.
Reviewed By: rubennorte
Differential Revision: D78975332
fbshipit-source-id: e1b54e59a54e8c7f8f19738f2ffeaa02ca5c09ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52832
# Changelog
[Internal] -
Make use of `Fantom.unstable_benchmark.testArg` API added in D78970312 for the existing View benchmark test - this makes it more succinct/maintainable.
Reviewed By: rubennorte
Differential Revision: D78970311
fbshipit-source-id: 2db35cb2edfa366311d62c4b1d141c3813a31e53
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52831
# Changelog
[Internal] -
The corresponding `testWithArg` API is similar to the existing `test` one for the Fantom benchmarks, except it would allow to run the same test several times in a parametrized manner, with the set of parameters specified as an array (for now, of numbers).
This allows to easily implement testing patterns such as we have in a View benchmark test, whereas we have a mostly duplicated test body doing a similar thing with 100, 1000, 1500 view component instances etc.
Reviewed By: rubennorte
Differential Revision: D78970312
fbshipit-source-id: 504b7aada648c7213ce698f088ac71d9fde8884b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52813
Changelog: [General][Changed] CDP backend now accepts addBinding and removeBinding methods earlier, before a Runtime exists.
Allows managing CDP binding subscriptions at any point in time, including at the very beginning of a session when a `RuntimeAgent` doesn't yet exist (due to `registerRuntime` not having been called yet).
"Adding" a binding with the `Runtime.addBinding` method is actually two actions in one:
1. Subscribing the current session to events from a particular binding name, from one or more Runtime(s) that may exist now or in the future (optionally targetable by execution context ID/name).
2. Installing a JSI function with the given `name` on the global object of the targeted Runtime(s), if they exist at the time of the method call.
NOTE: "Removing" a binding only involves managing the subscription and never causes the corresponding JSI function to be uninstalled - presumably because it may have been captured by user code anyway.
We currently do both (1) and (2) in `RuntimeAgent`, but this means subscriptions can't be managed before a `RuntimeTarget` has been created, which can cause problems if we want to set up certain bindings programmatically during React Native's initialisation. As this is an unnecessary restriction, here we move (1) to `HostAgent` and keep only (2) in `RuntimeAgent`.
Reviewed By: huntie
Differential Revision: D78739067
fbshipit-source-id: 9a39f4503d1b5e7c7a6e4c80dfbaabdd2549fb8d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52807
changelog: [internal]
Fixes a crash that occurs when event driven animation is attached to a view that is unmounted.
Reviewed By: zeyap
Differential Revision: D78889689
fbshipit-source-id: 6bc534c3d80a7ed2fc5e0ac378e58343fef45430
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52834
changelog: [internal]
we have seen some problems with the fabric commit and believe there is a race condition in the implementation.
Here, we introduce an option to disable it.
Reviewed By: rozele
Differential Revision: D78972655
fbshipit-source-id: 99005c77dbe4dde3816b9e6a692f170cf287f7cd