Commit Graph

33616 Commits

Author SHA1 Message Date
Blake Friedman 14cce6c313 [RN][CI] Fix typo in template action watcher script
Trivial typo

Changelog: [Internal]
2024-10-29 14:45:28 +00:00
Samuel Susla 741ae296d9 ship optimisation enableTextPreallocationOptimisation (#47257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47257

changelog: [internal]

Reviewed By: NickGerleman, rshest

Differential Revision: D65068406

fbshipit-source-id: 2e54e0e42e9d30f14c139ac039378d3cb4897067
2024-10-29 07:20:16 -07:00
Samuel Susla 21b99d9981 delete stale flag enableCleanTextInputYogaNode (#47256)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47256

changelog: [internal]

no plans to ship this. Let's delete the feature flag for now.

Reviewed By: rshest

Differential Revision: D65068295

fbshipit-source-id: 0b68e331c54c4989e6227d3e40a3bade30aa49d1
2024-10-29 07:20:16 -07:00
Rubén Norte 5f45f8a71c Remove unused flags for Hermes VM (#47244)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47244

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D65062303

fbshipit-source-id: 7372536643636b8a1923d9e1194ebca45f856e57
2024-10-29 06:20:13 -07:00
Pieter De Baets f503fe3f10 Reduce public API for DevToolsReactPerfLogger (#47275)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47275

Changelog: [Android][Removed] DevToolsReactPerfLogger stats gathering now uses an internal API

Reviewed By: cortinico, fabriziocucci

Differential Revision: D65133420

fbshipit-source-id: 360e86b69b1e4ba757090ae3fb87fc82d49163e7
2024-10-29 05:19:02 -07:00
Parsa Nasirimehr c1e964aa1f fix(iOS): migrate from RCTSharedApplication() for RCTDeviceInfo's RCTIsIPhoneNotched method (#47220)
Summary:
Far as i can see it, this is the last direct reference to how we used to get windows before the introduction of scenes. Everything now uses the new Scenes system (potentially we could start adding a `RCTSceneDelegate` if we ever want to move in that direction)

I also threw in a nullability check. Theoretically, that shouldn't happen, but honestly, who knows what platform will come in the future, better safe than sorry. Let me know if you think i should remove it

## Changelog:

[INTERNAL] [FIXED] - Potentially Migrate the last `KeyWindow` usage to `RCTKeyWindow` instead of tapping to the `UIWindow` directly via RCTSharedApplication

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

Test Plan:
yarn test:
<img width="1784" alt="Screenshot 2024-10-26 at 23 48 22" src="https://github.com/user-attachments/assets/3c0c6b2b-6aa1-4e7a-b663-327a363e4de6">
iOS test: Sadly it seems like it is still broken on Xcode 16 on my machine. Will leave it up to the CI to test it. I can see that there are more that are potentially broken. Might try to take a look and see if i can fix it in another PR.
<img width="1840" alt="Screenshot 2024-10-26 at 23 53 47" src="https://github.com/user-attachments/assets/2e302aee-bc57-41fe-baf3-0292dc65485e">

Reviewed By: philIip

Differential Revision: D65057289

Pulled By: cipolleschi

fbshipit-source-id: a5b2e875e681120a54e57ede90d67e66e9376a56
2024-10-29 04:37:24 -07:00
Nick Gerleman 52cdedb40e Fix missing emitter attributes on iOS TextInput when controlled component value specified using value instead of children (#47269)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47269

There were [reports](https://github.com/reactwg/react-native-releases/issues/595) that patching in the fixes for iOS controlled input did not work as expected.

I think tracked this down to a difference in how I tested, where the controlled component I used passed value as a child of the `TextInput`, instead of via `value`. Passing via `value` triggers a secondary bug, where we don't correctly pass a reference to correct ShadowView when creating attributedstring, specifically in the iOS TextInputShadowNode impl.

We previously passed nothing for the ShadowView (only the first two struct fields). This was exposed in D52589303 which enabled `-Wextra`, but there, I went with same behavior of passing empty ShadowView, instead of the correct behavior (like Android impl) of passing a ShadowView of the current ShadowNode.

After fixing this, we now correctly create event emitters in the passed attributedstring, which matches expectations for pargraph-level eventemitter now in typing attributes. We don't seem actually use this on iOS for TextInput right now (just Text), but this is likely the right foundation for events regardless.

Changelog:
[iOS][Fixed] - Fix missing emitter attributes on iOS TextInput when controlled component value specified using `value` instead of `children`

Reviewed By: cipolleschi

Differential Revision: D65108163

fbshipit-source-id: 499fe28439fabd2579eca6ded7fd13fd8ea2e43e
2024-10-29 03:43:10 -07:00
David Vacca 4076dbfc86 Convert ReactFeatureFlags to Kotlin (#47260)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47260

Convert ReactFeatureFlags to Kotlin

changeLog: [Android][Changed] Migrate ReactFeatureFlags to Kotlin

Reviewed By: shwanton, javache

Differential Revision: D65070217

fbshipit-source-id: 8939326c1e1e7cd634347a58123ad8c0795c309e
2024-10-28 18:49:19 -07:00
David Vacca 03797dda03 Convert LongStreamingStats to Kotlin (#47261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47261

Convert LongStreamingStats to Kotlin

changeLog: [internal] internal

Reviewed By: javache

Differential Revision: D65070215

fbshipit-source-id: b4e3ca9152ea382e516d1b598401df6bf38135eb
2024-10-28 18:49:19 -07:00
David Vacca b5696e6172 Migrate PreAllocateViewMountItem to Kotlin (#47258)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47258

Migrate PreAllocateViewMountItem to Kotlin

changeLog: [internal] internal

Reviewed By: shwanton

Differential Revision: D65070220

fbshipit-source-id: 3785f36747ea54304e45234daf377d20381f3c6c
2024-10-28 18:49:19 -07:00
David Vacca 0705eb8b91 Assert FeatureFlags in Bridgeless initialization only on Debug mode (#47263)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47263

Assert FeatureFlags in Bridgeless initialization only on Debug mode

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D65078365

fbshipit-source-id: 79a40ba84e140b9784660ac9d1c14fd0f7426653
2024-10-28 14:23:51 -07:00
Samuel Susla 92d743a9ab surface setup issues in EventBeat and Scheduler (#47253)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47253

changelog: [internal]

Add assert statements to make sure EventBeat and Scheduler classes are correctly setup.

Scheduler must receive RuntimeScheduler through ContextContainer.
Callers of EventBeat must set beatCallback before calling request.

Reviewed By: javache

Differential Revision: D65001802

fbshipit-source-id: 5e044e1e6b0249bc89c11cccd51801add2e85b88
2024-10-28 13:17:43 -07:00
Eli White 3111473d57 Add test for native module returning enum (#47229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47229

Adding a test case for an enum value in a fromNative position

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D65038107

fbshipit-source-id: ed323d9a8b226be3ff571c86fda617cabc17cdb9
2024-10-28 12:03:33 -07:00
Zeya Peng b5b65275c6 move multiline and submitBehavior down to BaseTextInputProps (#47205)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47205

move `multiline` and `submitBehavior` from ios and android respectively to BaseTextInputProps

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D64494449

fbshipit-source-id: ac737af27ba21ee886c92667f6c51945738bfc02
2024-10-28 10:17:02 -07:00
Zeya Peng db835e28d8 Make textInputProps.submitBehavior on android an enum type (#47206)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47206

Share definition of `SubmitBehavior` enum on ios, and use it on android

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D64718150

fbshipit-source-id: a078c9be44c625cc5e9001e4ae25d32eaaf5d8e4
2024-10-28 10:17:02 -07:00
Samuel Susla 8b9535f101 add missing breaks in PointerEvent (#47233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47233

changelog: [internal]

This looks like a missing break statement when it was refactored in https://github.com/facebook/react-native/pull/41519

Reviewed By: rubennorte

Differential Revision: D65040504

fbshipit-source-id: c4d52792099a5764d00c16708e400fa8a0046c93
2024-10-28 10:14:34 -07:00
Riccardo Cipolleschi e4e68db2bc Backport to main fixes in publishing the template (#47250)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47250

This commit backports to main [#47116](https://github.com/facebook/react-native/pull/47116)

## Changelog
[Internal] - Backport fix to publishTemplate from 0.76 to main

Reviewed By: blakef

Differential Revision: D65066047

fbshipit-source-id: 2c8fcca8ea7b75495aa5ad1bd4e3f53379cb3246
2024-10-28 09:58:38 -07:00
Samuel Susla 9a5d3efb12 remove EventEmitter::toggleEventTargetOwnership_ (#47224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47224

changelog: [internal]

not used, let's remove it.

Reviewed By: rshest

Differential Revision: D65004362

fbshipit-source-id: 7cedf18bf1d685510da3512cf40628897b357bcf
2024-10-28 09:20:04 -07:00
Blake Friedman cf8250a79f verify template is published method (#47243)
Summary:
This step called an old reference, this function identifier was updated.

Changelog: [Internal]

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

Reviewed By: cipolleschi

Differential Revision: D65063054

Pulled By: blakef

fbshipit-source-id: 640a4c501818c9b83cebb27c89ba6efd82800be8
2024-10-28 08:15:35 -07:00
Pieter De Baets bd133b5dd5 Add featureflag to not re-order mount items in FabricMountingManager (#46702)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46702

In https://github.com/facebook/react-native/pull/44188, we've started combining multiple transactions in a single transaction, to meet React's atomicity requirements, while also dealing with the constraints of Android's Fabric implementation.

This revealed a bug where in some scenarios (especially when using transitions), a node may be deleted and created during the same transaction. The current implementation of FabricMountingManager assumes it can safely reorder some operations, which it does to optimize the size of IntBufferBatch mount items. This is however incorrect and unsafe when multiple transactions are merged.

**Example:**

Differentiator output:

```
# Transaction 1
Remove #100 from #11
Delete #100

# Transaction 2
Create #100
Insert #100 into #11
```
FabricMountingManager output
```
Remove #100 from #11
Insert #100 into #11
Delete #100
```

Note that the create action is also skipped, because we only update `allocatedViewTags` after processing all mutations, leading FabricMountingManager to assume creation is not required.

This leads to an invalid state in SurfaceMountingManager, which will be surfaced as a crash in `getViewState` on the next mutation that interacts with these views.

Changelog: [Android][Fixed] Fix crash in getViewState when using suspense fallbacks.

Reviewed By: sammy-SC

Differential Revision: D63148523

fbshipit-source-id: 07ae26b2f7b7eba1b9784041dd3059b0956c035e
2024-10-28 06:18:43 -07:00
Samuel Susla dd432790b8 Use RuntimeScheduler in EventBeat 2nd try (#47196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47196

changelog: [internal]

EventBeat can use RuntimeScheduler directly, no need to go through RuntimeExecutor.

Reviewed By: christophpurrer

Differential Revision: D64927936

fbshipit-source-id: 9fb317d7c98da588d3438424ab9923dc0c0259c1
2024-10-28 05:50:15 -07:00
zhongwuzw e271b23fad Fixes regression of RCTWindowFrameDidChangeNotification not fired (#47236)
Summary:
Fixes https://github.com/facebook/react-native/issues/47234. regression from https://github.com/facebook/react-native/commit/391680fe844aad887e497912378c699aed13464b#diff-b7fda5d350ac535115fa683faa7317b43aa11f3448f95266ef9ff051c3753a6fL63

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - Fixes regression of RCTWindowFrameDidChangeNotification not fired

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

Test Plan: Demo in https://github.com/facebook/react-native/issues/47234.

Reviewed By: blakef

Differential Revision: D65058105

Pulled By: cipolleschi

fbshipit-source-id: 0e286182ed93f289cb853710e2e00801ef2d4f73
2024-10-28 05:23:52 -07:00
Riccardo Cipolleschi 4192678bd7 Pin Xcodeproj to < 1.26.0 (#47237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47237

The Xcodeproj gem has been released yesterday to version 1.26.0 and it broke the CI pipeline of react native.

This should fix the issue

## Changelog
[Internal] - Pin Xcodeproj gem to 1.26.0

Reviewed By: blakef

Differential Revision: D65057797

fbshipit-source-id: f4035a1d3c75dd4140eb1646ab2aa0ccb08fb16b
2024-10-28 04:20:31 -07:00
Pieter De Baets dc2000c875 Improve correctness of textTransform: capitalize (#47219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47219

We received reports that textTransform does not correctly match the web behaviour for capitalize, eg. capitalized characters should not be lowercased when using `capitalize`.

Example input: 'hello WORLD', should become 'Hello WORLD'.

Changelog: [General][Fixed] TextTransform: capitalize better reflects the web behaviour

Reviewed By: NickGerleman

Differential Revision: D65023821

fbshipit-source-id: 8ba5fdbd7afb1460193bf82a2f4021c3aff2110a
2024-10-26 17:57:26 -07:00
Jakub Piasecki 33e1ae13f8 Add tests for LayoutableChildren iterator
Summary:
Adds unit tests that directly cover the order in which `LayoutableChildren` iterator goes over the descendant nodes. The covered cases are as follows (nodes with `display: contents` are marked green):

### Single `display: contents` node

```mermaid
flowchart TD
R((R)) --> A((A))
R --> B((B))
R --> C((C))

B --> D((D))
B --> E((E))

style B fill:https://github.com/facebook/yoga/issues/090
```

Correct order: `A, D, E, C`

### Multiple `display: contents` nodes

```mermaid
flowchart TD
R((R)) --> A((A))
R --> B((B))
R --> C((C))

A --> D((D))
A --> E((E))

B --> F((F))
B --> G((G))

C --> H((H))
C --> I((I))

style A fill:https://github.com/facebook/yoga/issues/090
style B fill:https://github.com/facebook/yoga/issues/090
style C fill:https://github.com/facebook/yoga/issues/090
```

Correct order: `D, E, F, G, H, I`

### Nested `display: contents` nodes

```mermaid
flowchart TD
R((R)) --> A((A))
R --> B((B))
R --> C((C))

B --> D((D))
B --> E((E))

E --> F((F))
E --> G((G))

style B fill:https://github.com/facebook/yoga/issues/090
style E fill:https://github.com/facebook/yoga/issues/090
```

Correct order: `A, D, F, G, C`

### Leaf `display: contents` node

```mermaid
flowchart TD
R((R)) --> A((A))
R --> B((B))
R --> C((C))

style B fill:https://github.com/facebook/yoga/issues/090
```

Correct order: `A, C`

### Root `display: contents` node

```mermaid
flowchart TD
R((R)) --> A((A))
R --> B((B))
R --> C((C))

style R fill:https://github.com/facebook/yoga/issues/090
```

Correct order: `A, B, C` - `LayoutableChildren` goes over the children with `display: contents` property, setting it on the root node should have no effect.

Changelog: [Internal]

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

Reviewed By: joevilches

Differential Revision: D64981779

Pulled By: NickGerleman

fbshipit-source-id: ee39759c663a40f96ad313f1b775d53ab68fb442
2024-10-25 18:01:20 -07:00
Samuel Susla db09e7c2e5 delete shouldYield from commit options (#47191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47191

changelog: [internal]

not used, let's delete it.

Reviewed By: javache, rubennorte

Differential Revision: D64916432

fbshipit-source-id: 182848c85ca58d4e8fae3c6ab67c781807803dff
2024-10-25 17:41:06 -07:00
Jakub Piasecki a88ddcecc9 Fix for nodes with display: contents not being cleaned in some cases (#47194)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47194

Fixes a case where a node with `display: contents` would not be cleaned up in some cases. This was caused by it being called after some early returns handling different quick paths. This PR moves the call to `cleanupContentsNodesRecursively` earlier so that it's always called.

The problem here wasn't mutating before cloning, but leaving a node marked as dirty after the layout has finished.

The exact case in which I found this was a node with a single `display: contents` child which needs to be a leaf. Then in the parent node [this](https://github.com/facebook/yoga/blob/b0b842d5e75d041e3af7e0ac55abfb8929fbbf21/yoga/algorithm/CalculateLayout.cpp#L1339) condition is true, so `cleanupContentsNodesRecursively` doesn't get called and the child node is never visited and cleaned. I assume the same will happen in the other paths with an early return here.

Changelog:
[General][Fixed] - Fix for nodes with `display: contents` not being cleaned in some cases

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

Reviewed By: rozele

Differential Revision: D64910099

Pulled By: NickGerleman

fbshipit-source-id: 6d56f8fbf687b7ee5af889c0b868406213c9cee8
2024-10-25 17:34:36 -07:00
Ramanpreet Nara 4f47439a02 cleanup: ExceptionsManager: Delete updateExceptionMessage (#47167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47167

I couldn't find any usages of this method in javascript.

Removing, so that the native code is easier to read.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D64606928

fbshipit-source-id: 1d52d58437370ae3d99e9c44500080687f137191
2024-10-25 15:12:40 -07:00
Ramanpreet Nara f8788963b9 cleanup: ExceptionsManager: Delete reportUnhandledException (#47166)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47166

This method wasn't used from javascript.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D64607415

fbshipit-source-id: 2fb7eeee9479de85284d05629ed8e1bfb9fa5917
2024-10-25 15:12:40 -07:00
Ramanpreet Nara 0941b51e9d earlyjs: Make ExceptionsManager the js interface for c++ pipeline (#47165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47165

The c++ pipeline needs a javascript interface.

We could just re-use exceptions manager (for now).

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D64779068

fbshipit-source-id: 4e300668a01fa22e194ea9f149ef1d936d5e0834
2024-10-25 15:12:40 -07:00
Ramanpreet Nara 2247e0b983 earlyjs: Make JsErrorHandler work for all js throwables
Summary:
Now, handleError can be called with a JSError that wraps a non-error object!

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D64706198

fbshipit-source-id: 562ed7d4e2a13eaef48acfdf3499296462e54166
2024-10-25 15:12:40 -07:00
Samuel Susla 3fff4cf966 delete MountingCoordinator::Shared typealias (#47207)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47207

changelog: [internal]

delete typealias `MountingCoordinator::Shared` and use `std::shared_ptr<const MountingCoordinator>` directly.

Reviewed By: christophpurrer

Differential Revision: D64917023

fbshipit-source-id: 586ffcd5d22ea48b22d8a6cf86aa5fdf87fdefd0
2024-10-25 12:51:57 -07:00
David Vacca eddc0a1d49 Delete CoreFeatures class (#45626)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45626

I'm deleting CoreFeatures class and all its imports because it was fully replaced by ReactNativeFeatureFlags

Changelog: [Internal][Removed] Delete CoreFeatures class in favor of ReactNativeFeatureFlags

Reviewed By: rubennorte

Differential Revision: D60137380

fbshipit-source-id: 8bf918cdd1ce66e315aa95e1c5a28879445ff9f9
2024-10-25 08:32:20 -07:00
David Vacca a01e2e4165 Delete CoreFeatures::excludeYogaFromRawProps (#45627)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45627

I'm deleting CoreFeatures::excludeYogaFromRawProps in favor of ReactNativeFeatureFlags::excludeYogaFromRawProps();

changelog: [internal] internal

Reviewed By: rubennorte

Differential Revision: D60124448

fbshipit-source-id: 1dfec40d638c4051ebfebe712abe0bee6764e584
2024-10-25 08:32:20 -07:00
David Vacca 26278b10b1 Migrate enableCppPropsIteratorSetter to ReactNativeFeatureFlags (#45602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45602

Migrate enableCppPropsIteratorSetter to ReactNativeFeatureFlags

Changelog: [Internal] internal

Reviewed By: rubennorte

Differential Revision: D60022936

fbshipit-source-id: 88fe6f41af3dea0ac5de4a097901a7e8df39efb2
2024-10-25 08:32:20 -07:00
David Vacca 143b9d172c Expose JSBundleLoader as parameter of DefaultReactHost (#47179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47179

In this diff I'm exposing the new parameter (JSBundleLoader) as parameter of DefaultReactHost.

changelog: [Android][Breaking] Added JSBundleLoader as parameter of DefaultReactHost

Reviewed By: cortinico

Differential Revision: D64381501

fbshipit-source-id: dd0d56441802f7db53c67c659bbcae63c4b1b613
2024-10-25 02:08:32 -07:00
David Vacca 80f846948a Remove unused dependencies from facebook/react/interfaces (#47115)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47115

Remove unused dependencies from facebook/react/interfaces

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D64585748

fbshipit-source-id: fd42b63dd25cb4b6d4d7bb4f05912cff3f167db8
2024-10-25 02:08:32 -07:00
David Vacca 2cb5198f1b Delete CompositeReactPackage from RN (#47128)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47128

Delete CompositeReactPackage from RN, these classes were deprecated for a long time and they can be deleted now, there are no internal usages

changelog: [Android][Breaking] Deleting deprecated CompositeReactPackage

Reviewed By: cortinico

Differential Revision: D64382211

fbshipit-source-id: d4fdfd51177612a64dde918cd68d6e852ef1b0e2
2024-10-25 02:08:32 -07:00
Parsa Nasirimehr 795a21a471 fix(iOS): migrate from depracated websocket method in RCTCxxInspectorWebSocketAdapter (#47197)
Summary:
Saw this while going through the remaining warnings of the project. I double checked, and i can't find any other usages left behind, so this is probably the last one

## Changelog:

[INTERNAL] [FIXED] - Switch to using the new sendString method for Websocket

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

Test Plan:
yarn test:
<img width="933" alt="Screenshot 2024-10-25 at 00 55 58" src="https://github.com/user-attachments/assets/dbfebb90-4957-4fc9-8a90-153c03055ac9">
Running the tests in Xcode with `CMD+U` or the objc-test: I could not get it to pass in either the old code or the modified code. I know the test documentation said it needs a WebSocket, but it was a bit too vague , and even turning metro on did not help, so i have no idea how to test it. If anyone can guide me on that one, please let me know

Reviewed By: blakef

Differential Revision: D64934981

Pulled By: cipolleschi

fbshipit-source-id: c6f13d3da5aafe3eed8b99b98f04904fcdcc4115
2024-10-24 23:49:13 -07:00
Blake Friedman 94fdc38822 fix: mitigate DangerJS transpilation bug (#47192)
Summary:
Danger seems to have a bug where it's not transpiling the import of
rnx-kit/rn-changelog-generator. This mitigates the issue to get our
project back on track.

This can be replicated locally by:

```bash
DEBUG="*" DANGER_GITHUB_API_TOKEN=$GITHUB_TOKEN yarn danger pr https://github.com/facebook/react-native/pull/47182
```
You can see it running correctly here when switching to the branch with the fix.  **I'm a little concerned that this is still failing on the PR**.  Thoughts?

 {F1946190275}

Changelog: [internal]

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

Reviewed By: cortinico

Differential Revision: D64924466

Pulled By: blakef

fbshipit-source-id: 68df0521620809effe3a78ce842e043382ad64a6
2024-10-24 20:07:20 -07:00
Riccardo Cipolleschi e851e73c18 Add yoga to app search paths (#47195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47195

When a user wants to create a Fabric Component i their app (not in a separate library) the app fails to build because:
- The custom component has to inherit from `RCTViewComponentView`
- `RCTViewComponentView` imports `ViewProps.h`
- `ViewProps.h` imports `HostPlatformViewProps.h`
- `HostPlatformViewProps.h` imports `BaseViewProps.h`
- `BaseViewProps.h` imports `YogaStylableProps.h`

which is a Yoga private header and the App has not visibility over it.

It is also not possible to fix this issue with forward declaring the `YogaStylableProps`, because `BaseViewProps` inherit from the yoga's props, so the compiler needs the full declaration of `YogaStylableProps` to work

This needs to be picked in 0.76

## Changelog
[iOS][Fixed] - Give apps access to Yoga headers

Reviewed By: blakef

Differential Revision: D64925222

fbshipit-source-id: e724076bbfb0a678948340dfab2ce609e6509533
2024-10-24 17:16:50 -07:00
Sunny Luo d293fdd27a Add jsBundleFile to DefaultReactNativeHost.kt (#47188)
Summary:
The JsBundleFilePath has been ignored when converting DefaultReactNativeHost to ReactHost

Changelog:
[Internal] [Changed] - Add jsBundleFile to DefaultReactNativeHost.kt

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

Reviewed By: javache

Differential Revision: D64914149

Pulled By: cortinico

fbshipit-source-id: d437ca81df5a170e0c5f01a22ccda83f43a09dd2
2024-10-24 14:59:21 -07:00
David Vacca 70c7616535 Make ReactHost.createSurface() method non nullable (#47189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47189

ReactHost.createSurface() should not return a nullable surface, I'm changing that here.

changelog: [Android][Breaking] Make ReactHost.createSurface() method non nullable

Reviewed By: tdn120

Differential Revision: D64910107

fbshipit-source-id: ce8c5efd2c1e36eba0a85ae89cd1cd2a6305e885
2024-10-24 13:04:23 -07:00
Thomas Nardone d825a4d712 Add OnLayoutChange API for scroll views (#47177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47177

Changelog: [Android][Added] Add OnLayoutChange API for scroll views

Reviewed By: lyahdav, mdvacca

Differential Revision: D64843826

fbshipit-source-id: 3161730ccd0b3816d1704d07a02714a2ff04ae3a
2024-10-24 11:05:38 -07:00
Alan Lee ba061a5d18 Bump NDK to 27.1 (#46357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46357

Bumping NDK to 27.1.12297006 as we need it to build native libraries with 16KB page size support.

See:
- Changelog r27: https://github.com/android/ndk/wiki/Changelog-r27
- 16KB page sizes: https://developer.android.com/guide/practices/page-sizes

Changelog:
[Android] [Changed] - Android NDK to 27.1

Reviewed By: cortinico

Differential Revision: D62278654

fbshipit-source-id: 9968a45d9f41031571dfa1bb1671d6ad71d0644d
2024-10-24 10:58:09 -07:00
Alan Lee 37375d8aba bump Folly to 2024.10.14.00 (#47033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47033

Lastest Folly has updates to fix build errors with LLVM 19 which is also llikely needed for NDK 27

- https://github.com/facebook/folly/commit/bf46c8a21ffa288d756cea2ad455b5f012c3231f

- also add folly's new dependency fast_float
- update fmt version

Changelog:
[General][Changed] - Bump Folly to 2024.10.14.00

Reviewed By: NickGerleman

Differential Revision: D64372125

fbshipit-source-id: 1a88f1bc2af7bedce96437f2dba5b6e0fe9ea772
2024-10-24 10:10:19 -07:00
Riccardo Cipolleschi dc7e9e2d83 Exclude generation of app-defined components from RCTThirdPartyFabricComponentsProvider (#47176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47176

While writing the guide for the New Architecture, we realized that we need to exclude the generation of the Cls function in the RCTThirdPartyFabricComponentsProvider for components defined in the app.

This is needed because a component that is defined in the app will have those function defined in the app project. However, the RCTThirdPartyFabricComponentsProvider is generated in Fabric, inside the Pods project.

The pod project needs to build in isolation from the app and cocoapods then link the app to the pods project. But the compilation of the pods project fails if one of the symbol needed by the pods lives in the app.

By disabling the generation of that function in th RCTThirdPartyFabricComponentsProvider, we can successfully build the app.

The downside is that the user needs to register the component manually, but this is not an issue because if they are writing a component in the app space, they have all the information tomanually register it in the AppDelegate

## Changelog
[iOS][Fixed] - Do not generate the ComponentCls function in the RCTThirdPartyFabricComponentsProvider for components deined in the app.

Reviewed By: cortinico, blakef

Differential Revision: D64739896

fbshipit-source-id: 0eca818ea0198532a611377d14a3ff4c95cb5fe3
2024-10-24 09:36:07 -07:00
Sam Zhou ad341e3969 Add as const cast and make types readonly to prepare for natural inference (#47184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47184

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D64859497

fbshipit-source-id: 2cff5e2671e210a4e8cefb5a2d8c0fb56d5a0d1b
2024-10-23 23:32:37 -07:00
David Vacca 5e21232717 Assert enableBridgelessArchitecture is true when starting Bridgeless (#47145)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47145

Staring Bridgeless without previously setting ReactNativeFeatureFlags.enableBridgelessArchitecture() is UB, we should assert enableBridgelessArchitecture is true when starting Bridgeless

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D64641081

fbshipit-source-id: d7964f8a9d5a2e6dad9d44b8fd5cd5a52d1b2cf4
2024-10-23 22:53:44 -07:00
Cody Pizzaia 2d97a6ccb0 Revert D64631346: Use RuntimeScheduler in EventBeat
Differential Revision:
D64631346

Original commit changeset: b82dca150c13

Original Phabricator Diff: D64631346

fbshipit-source-id: 89ef52e5891d9fef33494fbfcc4252cade4aa803
2024-10-23 19:50:46 -07:00