Commit Graph

38536 Commits

Author SHA1 Message Date
Ben Handanyan 462fae4a29 Use configuration type when adding ndebug flag to pods in release (#48193)
Summary:
While I was [working on fixing the iOS debugger logic](https://github.com/facebook/react-native/pull/48174) based on configuration name regex match, I wanted to know if other logic was also based on configuration names. I think I found and fixed the only other configuration name-based logic in the repo in this PR.

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

[IOS] [CHANGED] - Use configuration type when adding ndebug flag to pods in release

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

Test Plan:
In a fresh react-native project, I added to the Podfile:
```ruby
    installer.aggregate_targets.each do |aggregate_target|
      aggregate_target.xcconfigs.each do |config_name, config_file|
          is_release = aggregate_target.user_build_configurations[config_name] == :release
          puts "aggregate_targets #{config_name} is_release: #{is_release}"
        end
    end

    installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
      target_installation_result.native_target.build_configurations.each do |config|
          is_release = config.type == :release
          puts "target_installation_results #{config.name} is_release: #{is_release}"
      end
    end
```

to confirm my logic. It output the following:
```
aggregate_targets Release is_release: true
aggregate_targets Local is_release: false
...
target_installation_results Local is_release: false
target_installation_results Release is_release: true
...
```

I also updated the applicable tests I could find for this logic.

Reviewed By: cortinico

Differential Revision: D67025325

Pulled By: cipolleschi

fbshipit-source-id: 45d68ee86e3255d843275a72916883c8c4bbc13d
2024-12-11 04:37:48 -08:00
Christoph Purrer 7d771de8a7 Share common ShadowNode functionality in BaseTextInputShadowNode for iOS (#48164)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48164

[Changelog] [Internal] - Share common ShadowNode functionality in BaseTextInputShadowNode for iOS

The current Android and iOS implementations have quite some overlapping functionality. Not sharing common logic makes it also harder to reuse this [functionality] for out of tree platforms.

This change moves the current iOS implementation into a shared location.
The next change allows to reuse it for Android.

Reviewed By: NickGerleman

Differential Revision: D66901676

fbshipit-source-id: a870155633875377d881fbd9f41fafb305672949
2024-12-10 18:05:42 -08:00
Pieter De Baets 93c6be496e Configure __RCTProfileIsProfiling for perfetto builds (#48201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48201

For any build for which we enable the perfetto build flag, we should probably enable the `__RCTProfileIsProfiling` so we get systrace markers.

Changelog: [Internal]

Reviewed By: bgirard

Differential Revision: D67031171

fbshipit-source-id: 5e7f56f911acacd3156778bd9151202fc809e291
2024-12-10 16:53:05 -08:00
Mateo Guzmán 9ecf290d27 Paper: TextInput maxLength is not working in old arch (#48126)
Summary:
Fixes https://github.com/facebook/react-native/issues/47563

It seems like a regression from https://github.com/facebook/react-native/issues/45401, where it was aimed to fix `onChangeText` being called multiple times when changing the text programmatically in an input with the `multiline` prop set as true.

This PR reverts that partially, as the `maxLength` check is not being evaluated correctly before setting the text. Not reverting it completely as when removing the second part of the fix, the `onChangeText` gets called multiple times again.

## Changelog:

[IOS] [FIXED] - Fixing TextInput `maxLength` not working in old arch

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

Test Plan:
The issue could be reproduced in the rn-tester. See my videos with the before and after the fix.

<details>
<summary>Before:</summary>

https://github.com/user-attachments/assets/86fd67eb-fc14-469a-a5f8-8e83b49f857c

</details>

<details>
<summary>After:</summary>

https://github.com/user-attachments/assets/368383b1-c1bd-4e0b-ac44-c78022462fa0

</details>

Reviewed By: cortinico

Differential Revision: D67025182

Pulled By: cipolleschi

fbshipit-source-id: 720c400eef362618106ae434aef421c7529214fe
2024-12-10 11:57:48 -08:00
zhongwuzw d20897f6d4 Fabric: Fixes transform when there are multiple values that contain a matrix (#47477)
Summary:
Fixes https://github.com/facebook/react-native/issues/47467 .

## Changelog:

[IOS] [FIXED] - Fabric: Fixes transform when there are multiple values that contain a matrix

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

Test Plan: Repro in Fixes https://github.com/facebook/react-native/issues/47467

Reviewed By: javache

Differential Revision: D65594337

Pulled By: cipolleschi

fbshipit-source-id: 50f255e753e2f233415099c3fbdd0e43b0afefc0
2024-12-10 10:29:29 -08:00
Mateo Guzmán 9a21b99918 Making RCTNetworking js exports consistent (#48166)
Summary:
Fixes https://github.com/facebook/react-native/issues/39260

Right now, there is a small issue when you try debugging the Networking library methods as it seems like they are empty in Android. This is not an actual functional issue as everything in code works fine, but rather an inconsistency in how the iOS and Android methods are being exported. In iOS it was exported as an object, in Android it was a class.

## Changelog:

[INTERNAL] - Making `RCTNetworking` js exports consistent

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

Test Plan:
I've checked that `XMLHttpRequest` is still working as expected, as this is used mostly there.

And below there are screenshots of how the module methods are logged after the refactor. Which addresses what was reported in the linked issue.

```js
import {Networking} from 'react-native';
import AndroidNetworking from 'react-native/Libraries/Network/RCTNetworking.android.js';
import IOSNetworking from 'react-native/Libraries/Network/RCTNetworking.ios.js';

console.log({Networking, AndroidNetworking, IOSNetworking});
```

Before | After
-- | --
<img width="1196" alt="image" src="https://github.com/user-attachments/assets/b7ab1dcd-9dd1-4ed9-ade5-d90251a77d5e"> | <img width="1196" alt="image" src="https://github.com/user-attachments/assets/5ae17c6a-b068-462a-b228-576dcf08ef12">

Reviewed By: fabriziocucci

Differential Revision: D67022711

Pulled By: javache

fbshipit-source-id: 81f9988295fb3f559a795077f09ee0f14827dc86
2024-12-10 10:17:42 -08:00
Rubén Norte 6ba8b65e9f Remove legacy ReactNativeConfig abstraction (#47247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47247

Changelog: [internal]

Bye bye `ReactNativeConfig` 👋.

All existing usages of the API have been cleaned up or migrated to `ReactNativeFeatureFlags`, so this is no longer needed.

Reviewed By: GijsWeterings

Differential Revision: D65062306

fbshipit-source-id: 76afcd48ad72023b6dc2a90955ae2f03a1164cca
2024-12-10 09:34:27 -08:00
Rubén Norte c24f963330 Make ReactNativeConfig an empty interface (#47246)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47246

Changelog: [internal]

Just to use CI to verify there are no more existing usages of the API before cleaning it up.

Reviewed By: GijsWeterings

Differential Revision: D65062302

fbshipit-source-id: e1b71d39ef1fba23cc68e36fe0a0b57cfc2a614e
2024-12-10 09:34:27 -08:00
Pieter De Baets 746d584a23 Fix animation.stop not being flushed (#48199)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48199

`animatedShouldUseSingleOp` relies on a queue always being active, or for a call to `flushQueue` later down the line. If these are missing, a call will be queued up but only executed whenever the next animation flush happens.

Changelog: [General][Fixed] Animation.stop() executes when `animatedShouldUseSingleOp` is enabled.

Reviewed By: yungsters

Differential Revision: D67025831

fbshipit-source-id: 66a7f50d833b7bbaf9f16dd04d24b90c7a699fa0
2024-12-10 09:24:05 -08:00
Riccardo Cipolleschi 8ab524312a Skip hidden folders when looking for third party components (#48182)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48182

Maintainers from SVG reached out because of an edge case they inencountered when generating the ComponentProvider. In their setup, they had a `.git` folder in the repo and the algorithm was spending a lot of time crawling the git folder.

In general, we should avoid crawling hidden folders.

This change fix that.

## Changelog:
[General][Fixed] - Skip hidden folders when looking for third party components.

Reviewed By: javache

Differential Revision: D66959345

fbshipit-source-id: 992a79f3cff22cd6a459e0272c8140bc329888da
2024-12-10 02:32:10 -08:00
Blake Friedman 538fa01fb3 Add Changelog for 0.77.0-rc.2 (#48192)
Summary:
Add Changelog for 0.77.0-rc.2

Changelog: [Internal] - Add Changelog for 0.77.0-rc.2

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

Reviewed By: christophpurrer

Differential Revision: D66998575

Pulled By: blakef

fbshipit-source-id: 4dbfa3cae00b69ed8dd199a2b36cbd095ef4cbc2
2024-12-10 01:57:59 -08:00
Alex Taylor (alta) 8aeba2a3b8 Deploy 0.256.0 to xplat (#48190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48190

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D66979174

fbshipit-source-id: d94e8c42edd225fe367aac75e55d2c1d054acc07
2024-12-10 01:47:05 -08:00
Blake Friedman 3b079f38f4 Add Changelog for 0.76.5 (#48191)
Summary:
Add Changelog for 0.76.5

Changelog: [Internal] - Add Changelog for 0.76.5

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

Reviewed By: christophpurrer

Differential Revision: D66993996

Pulled By: blakef

fbshipit-source-id: 4d69bcea64822aa108c2bac24a3ab399aacd5419
2024-12-09 23:31:40 -08:00
Andrew Datsenko a298ccabe2 Add snapshot update / delete capability (#48096)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48096

Changelog: [Internal]

Managing snapshot state internally by adding / updating snapshot data.

Reviewed By: christophpurrer

Differential Revision: D66707175

fbshipit-source-id: 0366d834eafa0ca702f03de0210392181fd90a58
2024-12-09 19:09:57 -08:00
Andrew Datsenko a8a136f3ef Add .toMatchSnapshot() (#48029)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48029

Changelog: [Internal]

Adding snapshot support for rendered output only for now.
This will only work if snapshot is created beforehand by hand.

# Next steps
* Create snapshot when no prior snapshot is available
* Pass and update if instructed

Reviewed By: christophpurrer

Differential Revision: D66601387

fbshipit-source-id: fe528cded43c5ba36d314bd9af8e3fb84b98ac3e
2024-12-09 19:09:57 -08:00
Andrew Datsenko a4a2c2867a Add jest-snapshot (#48095)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48095

Changelog: [Internal]
Add `jest-snapshot` `v29.7.0`

Reviewed By: christophpurrer

Differential Revision: D66714069

fbshipit-source-id: 783584519e95b337d36c4a00610bcd970a041d4d
2024-12-09 19:09:57 -08:00
Jorge Cabiedes Acosta 6d235853fb Fix background getting clipped when border-radius is set (#47939)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47939

Before we were clipping Android background drawable to the padding box. This is not how its done on web.

The background should remain under the border so that if the border is traslucent you can see the background underneath

Reviewed By: NickGerleman

Differential Revision: D66463305

fbshipit-source-id: 427acea760b2748a07cc28bbd362aaaae0811093
2024-12-09 18:35:45 -08:00
Christoph Purrer 0b866aa40d Share common (Base)TextInputState properties (#48133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48133

[Changelog] [Internal] -  Share common (Base)TextInputState properties

This change allows to share common TextInput State properties between various platforms.

Reviewed By: rshest

Differential Revision: D66855831

fbshipit-source-id: d0f85c419b82445ac84bfcc606f1bf752f5dba73
2024-12-09 15:02:58 -08:00
heoblitz 331d99a941 Update YGNodeStyleGetGap to return YGValue (#47973)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47973

Gap can be styled using both `points` and `percentages`, but YGNodeStyleGetGap currently returns a float value.

To maintain alignment with the `padding` and `margin` functionalities and allow it to be handled in bridging code, this function has been updated to return YGValue.

X-link: https://github.com/facebook/yoga/pull/1753

Reviewed By: joevilches

Differential Revision: D66513236

Pulled By: NickGerleman

fbshipit-source-id: b7110855c037f20780f031f22a945bde4446687d
2024-12-09 13:38:05 -08:00
Pieter De Baets 4ec4a85b1b Unbreak OSS Android CI (#48186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48186

Broken by https://github.com/facebook/react-native/commit/37c532a063c6054ea974612a40551f7c1399c147 since we use different OkHttp versions internally and in open-source.

Changelog: [Internal]

Reviewed By: tdn120

Differential Revision: D66968229

fbshipit-source-id: a110cec0f9bd55e6ae5c90b766e8e6220703e6c3
2024-12-09 13:11:18 -08:00
Christoph Purrer 7ea5deb802 Remove unused defaultThemePaddingStart|End|Top|Bottom from AndroidTextInputState (#48161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48161

[Changelog] [Internal] -  Remove unused defaultThemePaddingStart|End|Top|Bottom from AndroidTextInputState

This data is set, but never read

Reviewed By: javache

Differential Revision: D66904641

fbshipit-source-id: 4db1cd49e9ec63b62f75070b478d2006ea101f8c
2024-12-09 11:22:57 -08:00
Nick Lefever aef13d1f43 Enable shadow node reference updates by default (#48180)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48180

Changelog: [Internal]

Releasing runtime shadow node reference updates, enabling it by default now that the fix for RN Windows landed.

Reviewed By: javache

Differential Revision: D66959896

fbshipit-source-id: dcf1c4a7257fe60ae0faffe1952fc2c80effe406
2024-12-09 10:52:21 -08:00
Pieter De Baets c31b42aaa2 Fix flow-type of selectionColor (#48184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48184

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D66962089

fbshipit-source-id: cd45784d830a12a620800290235a5a1cad3097f3
2024-12-09 10:20:12 -08:00
Jakub Piasecki 47822e9048 Fix adjustsFontSizeToFit for strings with a single character (#47082)
Summary:
Fixes https://github.com/facebook/react-native/issues/47045

On Android `adjustsFontSizeToFit` relies on two metrics:
- Text with line breaks results in more lines than `maximumNumberOfLines`
- The overall height of the text is larger than the available height

None of these two was fulfilled when a single-character string had a higher width than the available one (a single character will not be broken into multiple lines). This PR adds exactly that as a third option to trigger the scaling algorithm - a single-character string that has a higher width than the available one.

On iOS `adjustsFontSizeToFit` relies on `truncatedGlyphRangeInLineFragmentForGlyphAtIndex` which seems to be returning `NSNotFound` when a single-character sting gets truncated. Similarly to Android, this PR adds an additional check to make sure that single-character strings actually fit inside the container.

## Changelog:

[GENERAL] [FIXED] - Fixed `adjustsFontSizeToFit` not working for text with a single character

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

Test Plan:
Tested on the code from the issue:

|Android (old arch)|Android (new arch)|iOS (old arch)|iOS (new arch)|
|-|-|-|-|
|<img width="406" alt="android_old" src="https://github.com/user-attachments/assets/91b1af41-4ef7-46cc-bb04-374f860d93ac">|<img width="406" alt="android_new" src="https://github.com/user-attachments/assets/90e3cde1-e6c0-4b25-8325-c62a37773002">|<img width="546" alt="ios_old" src="https://github.com/user-attachments/assets/902b9c10-84e0-4372-bcc8-07cd1ef006f6">|<img width="546" alt="ios_new" src="https://github.com/user-attachments/assets/f4df4f0e-7649-47f3-9c81-e38f8665d9a2">|

Reviewed By: javache

Differential Revision: D64664351

Pulled By: NickGerleman

fbshipit-source-id: b68f318a0fbd5ebed947a70d1e3fb0515b5fb409
2024-12-09 10:12:10 -08:00
Ben Handanyan eda4f185b3 Enable hermes debugger by configuration type instead of configuration name (#48174)
Summary:
Fixes an [issue](https://github.com/facebook/react-native/issues/48168) where only iOS configurations with "Debug" in the name are configured to use the hermes debugger.

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

[IOS] [FIXED] - Enable hermes debugger by configuration type instead of configuration name

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

Test Plan:
Added new test scenarios that all pass:
```
ruby -Itest packages/react-native/scripts/cocoapods/__tests__/utils-test.rb
Loaded suite packages/react-native/scripts/cocoapods/__tests__/utils-test
Started
Finished in 0.336047 seconds.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
56 tests, 149 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
166.64 tests/s, 443.39 assertions/s
```

In a personal project with the following configurations:
```
project 'ReactNativeProject', {
    'Local' => :debug,
    'Development' => :release,
    'Staging' => :release,
    'Production' => :release,
  }
```
I added the following to my Podfile:
```
installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        puts "#{config.name} is debug? #{config.type == :debug}"
    end
end
```
To confirm that my logic is correct:
```
Local is debug? true
Development is debug? false
Staging is debug? false
Production is debug? false
```

Reviewed By: robhogan

Differential Revision: D66962860

Pulled By: cipolleschi

fbshipit-source-id: 7bd920e123c9064c8a1b5d45df546ff5d2a7d8be
2024-12-09 08:51:00 -08:00
Pieter De Baets 0916d530f0 Allow CookieJar to be disabled in NetworkingModule (#48113)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48113

Processing cookies can have a non-trivial impact on startup-time. It requires reading OkHttp's `PublicSuffixDatabase` but also allocating various WebKit components. Instead handle the cookiejar being set to non-CookieJarContainer instances gracefully, which allows a custom client builder to set `CookieJar.NO_COOKIES`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D66787514

fbshipit-source-id: bf790691496f674ec743ba4791552b12e06eda29
2024-12-09 08:37:32 -08:00
Mateo Guzmán 37c532a063 test(image): [android] react okhttp network fetcher cache control tests (#47953)
Summary:
This is a follow up for the new cache control options for the Android Image component introduced in https://github.com/facebook/react-native/issues/47182, https://github.com/facebook/react-native/issues/47348 & https://github.com/facebook/react-native/issues/47426. And to make sure the cache control header works as expected and avoid missing the issue fixed in https://github.com/facebook/react-native/issues/47922, this PR introduces test cases to make sure this is getting applied as expected in the `ReactOkHttpNetworkFetcher`.

## Changelog:

[INTERNAL] [ADDED] - `ReactOkHttpNetworkFetcher` cache control tests

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

Test Plan:
```bash
yarn test-android
```

Reviewed By: rshest

Differential Revision: D66498305

Pulled By: javache

fbshipit-source-id: 7a9a0cc596e49964943e59189614743ca8a472a1
2024-12-09 07:36:46 -08:00
Rubén Norte 3cc67fed36 Add Fantom mode for development with Hermes bytecode (#48178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48178

Changelog: [internal]

Adds a new mode for Fantom to run tests with dev-mode bytecode. Right now the modes were only dev (development with source code) or opt (optimized bytecode).

Reviewed By: rshest

Differential Revision: D66888986

fbshipit-source-id: 34b2566a65d138790e16f8fb5787fd9c2bcde536
2024-12-09 05:43:27 -08:00
Rubén Norte 4d07fb7662 Use enum for Fantom modes (#48179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48179

Changelog: [internal]

Migrating this type to an enum, which is safer, because it prevents errors like:

```
// when it's actually 'dev'
if (mode === 'development') {

}
```

Reviewed By: rshest

Differential Revision: D66888985

fbshipit-source-id: 4f3f91fad6ca5256baa2123425b2bad11fe036f9
2024-12-09 05:43:27 -08:00
Rubén Norte 07a7b63fdd Only prewarm in CI (#48151)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48151

Changelog: [internal]

We have global setup step in Fantom to prewarm caches to properly attribute test running time, but this isn't necessary when running tests locally. Attribution isn't as important there. This disables the prewarming step so we can run individual tests as fast as we can.

Reviewed By: sammy-SC

Differential Revision: D66877990

fbshipit-source-id: 1f33c19a3c537c1c0e499fd7a6c405450cb9f86d
2024-12-09 05:43:27 -08:00
Rubén Norte 82abba9936 Implement warmup for optimized mode (#48150)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48150

Changelog: [internal]

We're starting to have some Fantom tests that run in optimized mode, but we're not currently prewarming for that case. This adds that capability to do proper attribution of run time for tests.

Reviewed By: javache

Differential Revision: D66877991

fbshipit-source-id: dccb80cd6a4f664de7df0661456bad78d960826d
2024-12-09 05:43:27 -08:00
Rubén Norte 47589f53b1 Add tests for Fantom modes (#48123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48123

Changelog: [internal]

This verifies that the modes specified in the pragmas are applied correctly.

Reviewed By: andrewdacenko

Differential Revision: D66822377

fbshipit-source-id: 420f21f171c5d356ab91b49f7a33345386f6f0c0
2024-12-09 05:43:27 -08:00
Rubén Norte d05214665c Delete tests migrated to Fantom and unnecessary mocks for FabricUIManager, DOM, etc. (2nd attempt) (#48117)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48117

Changelog: [internal]

Re-land https://github.com/facebook/react-native/pull/48087 with some CI fixes.

Reviewed By: rshest

Differential Revision: D66820310

fbshipit-source-id: 1df4559c1daf5ec0085b299d702ce36deaa681b5
2024-12-09 05:05:07 -08:00
Pieter De Baets 351b1bae95 Use OkHttp3 for NetworkingModuleTest (#48012)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48012

Match the OkHttp version we use for NetworkingModule and FrescoModule, to unblock pulling in D66498305

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D66595222

fbshipit-source-id: 1c29b061866be5d8bcc87aaa0c8a1de846198e4e
2024-12-09 05:00:41 -08:00
Nicola Corti 8babc21b79 Convert com.facebook.react.jstasks to Kotlin (#48147)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48147

This converts all the classes inside `com.facebook.react.jstasks` to Kotlin

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D66875442

fbshipit-source-id: 0a9d485e3902626a04db5e7a1a0ccad32b2bc44c
2024-12-09 04:17:14 -08:00
Blake Friedman 4165884b70 Add Changelog for 0.76.4 (#48163)
Summary:
Add Changelog for 0.76.4

Changelog: [Internal] - Add Changelog for 0.76.4

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

Reviewed By: cipolleschi

Differential Revision: D66908649

Pulled By: blakef

fbshipit-source-id: cb64fcc5dbc6a1f758d99f99c451f24374fd4768
2024-12-07 09:46:51 -08:00
Christoph Purrer e9f92fad0a Remove unused code in AndroidTextInputShadowNode.h|cpp (#48136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48136

[Changelog] [Internal] -  Remove unused code in AndroidTextInputShadowNode.h|cpp

A bit of code clean-up to simplify a planned refactoring of this class

Reviewed By: rshest

Differential Revision: D66862820

fbshipit-source-id: 88114d8711b572f105d804cdddc6c087c94e3f49
2024-12-06 20:38:43 -08:00
Dmitry Rykun 6200a4d330 Annotate the experimental image prefetching API as @UnstableReactNativeAPI (#48120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48120

This diff annotates the experimental image prefetching API as `UnstableReactNativeAPI` instead of `Deprecated`.

Changelog: [Internal]

Reviewed By: cortinico, philIip

Differential Revision: D66822045

fbshipit-source-id: a95ef3112a621a0735d4dcda0aed6078be7d7a38
2024-12-06 17:49:40 -08:00
Jorge Cabiedes Acosta 4102aa4a6b Revise iOS's implementation of ensureNoOverlap for borders (#48094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48094

There were a few math inaccuracies in the algorithm for overlapping radii. After fixing there were also minor pixel differences on the unit tests but this is the most correct implementation.

Also, improved the algorithm's verbiage since stuff like "EdgeInset" is not really related and is misleading to what the algorithm is actually doing. (Edge Insets play no part in this)

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D66728227

fbshipit-source-id: 56a6d59504e784fc245ed6fe306402a15cfd9611
2024-12-06 16:05:44 -08:00
Joe Vilches 0b40cb8b7f Use crossAxisOwnerSize instead of ownerHeight in cross axis bound call (#48080)
Summary:
X-link: https://github.com/facebook/yoga/pull/1763

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

Small bug that I noticed while doing intrinsic sizing. We have the ownerHeight as the axis size despite bounding the length of the cross axis. This should therefore be the crossAxisOwnerSize, which might be the width in some cases

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D66736539

fbshipit-source-id: 528fc438b3327cd6f7890ea0ba408e4ce7b0f02c
2024-12-06 15:34:06 -08:00
Pieter De Baets 3c5019a376 Remove enableFabricRendererExclusively feature-flag (#48157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48157

Changelog: [Internal]

Reviewed By: jehartzog

Differential Revision: D66787414

fbshipit-source-id: f27cc551fd7ceabf9fc656db2810476815fce1bf
2024-12-06 14:49:10 -08:00
Zeya Peng 4238299bf3 Allow setting debugID on all types of AnimatedNode and Animation (#48129)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48129

Continuation of https://github.com/facebook/react-native/pull/48106

* Every AnimatedNode subclasses now have an optional `config` arg as last arg in constructor. `Animation` base constructor already takes in config with debugID, since last PR.
* thread down debugID value to all the native configs

Changelog: [Internal] Allow setting debugID on all types of AnimatedNode and Animation

Reviewed By: yungsters

Differential Revision: D66834935

fbshipit-source-id: 18e5cbc3f701114ef945a237cb5944ef5eb6408e
2024-12-06 14:47:30 -08:00
Christoph Purrer d47ff26f37 Allow to provide a custom TextLayoutManager for cxx platform (#48127)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48127

[Changelog] [Internal] -  Allow to provide a custom TextLayoutManager for cxx platform

This change allows target platforms to pass a platform specific or app specific TextLayoutManager implementation

Reviewed By: zeyap

Differential Revision: D66802434

fbshipit-source-id: a64e28d357bf601c7234b43f86538f49e62c8435
2024-12-06 13:38:58 -08:00
Blake Friedman 05b4146270 ci: verify JS build artifacts aren't committed (#48091)
Summary:
Building our JS packages dirties the repo. This makes sure we don't
accidentally commit these to the repo, as it'll break Flow tests with an
obscure error message.

Changelog: [Internal]

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

Test Plan:
Ran this locally, the GH lint action should run on this PR.
I'll intentionally add a build artifact to validate.
| A | B | C |
| - | - | - |
| ![CleanShot 2024-12-04 at 14 11 16@2x](https://github.com/user-attachments/assets/11c05c32-12c8-4d85-9a28-b3bdffb42ea0) | ![CleanShot 2024-12-04 at 14 11 22@2x](https://github.com/user-attachments/assets/b4c4f1dc-2cb9-4138-8931-13e71c015a6d) | ![CleanShot 2024-12-04 at 14 19 31@2x](https://github.com/user-attachments/assets/953bf783-57ba-4832-bbd8-b36e23a2ccb4) |

Reviewed By: cipolleschi

Differential Revision: D66760144

Pulled By: blakef

fbshipit-source-id: 81f20fa0a83d5f17b5773d1608664b683ba74409
2024-12-06 13:21:23 -08:00
Kudo Chien e42a3a6b84 Migrate jsc-android to mavenCentral (#47972)
Summary:
Since people mostly use Hermes, it doesn't make sense to download jsc-android from npm even when jsc is not used. This PR migrates the jsc-android to [mavenCentral](https://repo1.maven.org/maven2/io/github/react-native-community/jsc-android/2026004.0.0/). The new jsc-android supports Android 16KB memory page sizes and packaged by prefab.
Relevant PRs:
  - https://github.com/react-native-community/jsc-android-buildscripts/pull/184
  - https://github.com/react-native-community/jsc-android-buildscripts/pull/185

## Changelog:

[ANDROID] [CHANGED] - Migrate jsc-android to mavenCentral

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

Test Plan: CI passed

Reviewed By: cipolleschi

Differential Revision: D66772407

Pulled By: cortinico

fbshipit-source-id: e34d2d138996e394763ef67d7aad65bb3e7b13dc
2024-12-06 12:50:34 -08:00
Dmitry Rykun c9ac94a000 Rename shouldNotify to shouldNotifyLoadEvents (#48100)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48100

This diff renames `shouldNotify` to `shouldNotifyLoadEvents` as it is named in the spec.
Changelog: [Internal]

Reviewed By: javache

Differential Revision: D66769660

fbshipit-source-id: 64282c08ab82101d51dedb583e0c34476ed90eeb
2024-12-06 12:06:33 -08:00
Mateo Guzmán f5506dc1d0 Migrate HeadlessJsTaskEventListener to Kotlin (#48103)
Summary:
Migrate `HeadlessJsTaskEventListener` to Kotlin

## Changelog:

[INTERNAL] - Migrate `HeadlessJsTaskEventListener` to Kotlin

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

Test Plan:
```bash
yarn test-android
```

Reviewed By: javache

Differential Revision: D66814483

Pulled By: cortinico

fbshipit-source-id: 5aef4ce020f97164845e3e0d53a107c7e407a6aa
2024-12-06 12:06:20 -08:00
Nicola Corti 4560fc0497 Fix crash on HeadlessJsTaskService on old architecture (#48124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48124

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

The logic in HeadlessJsTaskService is broken. We should not check whether `getReactContext` is null or not.
Instead we should use the `enableBridgelessArchitecture` feature flag to understand if New Architecture was enabled or not.

The problem we were having is that `HeadlessJsTaskService` was attempting to load the New Architecture even if the user would have it turned off. The Service would then die attempting to load `libappmodules.so` which was correctly missing.

Changelog:
[Android] [Fixed] - Fix crash on HeadlessJsTaskService on old architecture

Reviewed By: javache

Differential Revision: D66826271

fbshipit-source-id: 2b8418e0b01b65014cdbfd0ec2f843420a15f9db
2024-12-06 12:05:58 -08:00
Nicola Corti ddfa2120ba Cleanup NoRetryPolicy unnecessary visibility. (#48146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48146

The NoRetryPolicy class is `internal`. Having those `public` modifiers on methods has no effect
and can be safely removed.

Changelog:
[Internal] [Changed] -

Reviewed By: fabriziocucci

Differential Revision: D66875443

fbshipit-source-id: 64c63c7000617cf94c36ce3d25927d3a270ac370
2024-12-06 12:05:53 -08:00
Tim Yung 8793b7d89b RN: Backout "Scheduling Animated End Callbacks in Microtask" (#48132)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48132

Backs out D63573322 and D65645981, reverting the change that makes callbacks passed to `animation.start(<callback>)` scheduled for execution in a microtask.

This is being reverted becuase the latency introduced by the current macro and pending micro tasks can introduce visible latency artifacts that diminish the fidelity of animations.

Changelog:
[General][Changed] - Reverts #47503. (~~Callbacks passed to `animation.start(<callback>)` will be scheduled for execution in a microtask. Previously, there were certain scenarios in which the callback could be synchronously executed by `start`.~~)

Reviewed By: javache

Differential Revision: D66852804

fbshipit-source-id: 08434b9876813fe9e8b189b6b467198933843bf0
2024-12-06 12:05:46 -08:00