Summary:
## Changelog:
[Android] [Internal] - As in the title
Reviewed By: cortinico
Differential Revision: D72971263
fbshipit-source-id: 8bd0c4e29e48f7e3d47a97f1a4e988e7b0282646
Summary:
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Only Error was supressed in previous diff, also suppress warning.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D73085528
fbshipit-source-id: a38a6e15e8ca33d4e93678c54d337ad9e86c2bbe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50748
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D73079163
fbshipit-source-id: 1928b00acbba5bc6577a248bc46a091d5b970f10
Summary:
const val NAME had quotes around it breaking native module loading from CoreReactPackage
This error was uncaught in previous diff.
Changelog:
[Internal]
Reviewed By: makovkastar
Differential Revision: D73070533
fbshipit-source-id: a7f14f4b4bd25003529c625d9182554dd2c2ee3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50744
Crash was discovered after converting source code from Java to Kotlin.
This was due to type checking against Kotlin types instead of Java types.
Also added minor refactoring of code
Changelog:
[Internal]
Reviewed By: Abbondanzo
Differential Revision: D73064216
fbshipit-source-id: 3429f0627740438be3bbc345c9e7b2c4a535da7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50586
# Changelog: [Internal]
We are going to record microtasks phase of the Event Loop.
RAII reporter that was added in D69399955 will be updated to support phase as a parameter.
There is one downside of the current implementation. Every Event Loop task will have a corresponding "Run Microtasks" block displayed, even if the microtasks queue was empty. There is no API in `jsi` that would allow us to get the size of the queue. If we had that, we could emit this event only when there is something in a microtasks queue.
The good this is that these frames usually have duration of 1-2 microseconds, so they are not visible, until user fully zooms in.
Reviewed By: rubennorte
Differential Revision: D72649816
fbshipit-source-id: d597f5b75aaf0975b14f61d2aa28b9c8bc34f4d5
Summary:
The check nightlies job is failing on some libraries because the library key contains `/` and ` ` characters that fails to be used properly when they are part of a path.
With this change, we are replacing those characters with `_` so this is a valid path were CI can save the outcome that needs to be collected later.
## Changelog:
[Internal] - Fix folder path
Pull Request resolved: https://github.com/facebook/react-native/pull/50726
Test Plan: Running in GHA
Reviewed By: cortinico
Differential Revision: D73036049
Pulled By: cipolleschi
fbshipit-source-id: 147b9fa15b4dfa08e94f01715e5a175479230d80
Summary:
*Hi,*
I made a small update to the dependency array in `useLayoutEffect`, changing it from `[native]` to `[native.value]` for better precision. Since JavaScript compares objects by reference, this change can lead to a minor performance improvement. Additionally, as `useLayoutEffect` is render-blocking, I wanted to ensure we optimize its usage as much as possible.
As a micro-optimization and in line with good coding practices, I also changed a `let + if` variable to `const`. While the performance gain is minimal, it contributes to cleaner and more consistent code.
Please feel free to review, and I sincerely apologize if I made any mistakes in the process.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
*[General] [Changed]* – Refined `useLayoutEffect` dependency array from `[native]` to `[native.value]` for improved precision and efficiency in re-renders.
*[General] [Changed]* – Replaced `let` with `const` where applicable for better code standards and micro-optimization.
Pull Request resolved: https://github.com/facebook/react-native/pull/50682
Reviewed By: huntie
Differential Revision: D72979663
Pulled By: yungsters
fbshipit-source-id: 64ac09811b78ca67be903d8cd91da8cd6f0a45fa
Summary:
Implemented ReactLifecycleStateManager.java in Kotlin as part of Kotlin-ifying RN Round 3
## Changelog:
[ANDROID] [CHANGED] - Migrate ReactLifecycleStateManager to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50685
Test Plan: Run RN-Tester and interacted with Mulitple components(Image, Flatlist, Input ) with both new architecture enabled and disabled
Reviewed By: rshest
Differential Revision: D73003097
Pulled By: cortinico
fbshipit-source-id: 27b90a0b94c17aa42cbb1665ca6fcf06db7cbf96
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50396
Integrates the `yarn build-types` script into our CI workflows.
**Notes**
- Will validate type generation in future PRs as part of the `test-all` workflow (this has been stable (i.e. successfully runs for our codebase) for the last 3 weeks).
- This is not load bearing in production code until D71969602.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71975705
fbshipit-source-id: a234a05008b5e75976bbd5258948c37fcc1eeb76
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50718
On Windows `path.join` returns path with separators unsupported by resolution mechanism. This change enforces the use of `/` separators in `no-deep-imports` rule tests.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D73021185
fbshipit-source-id: d4799c01a5aef5b27fad961d774b58627115d213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50714
This diff changes the category used by LegacyArchitectureLogger soft errors to be SOFT_ASSERTIONS
changelog: [internal] internal
Reviewed By: makovkastar
Differential Revision: D72999455
fbshipit-source-id: b5378fb92b22a3d06dda550192c7eba0db97ddcb
Summary:
Migrated ReactClippingViewGroupHelper.java to Kotlin as part of the React Native Kotlin migration initiative.
This change helps modernize the React Native Android codebase and improve maintainability.
No functional changes were introduced—only a language conversion while preserving the original logic and behavior.
## Changelog:
[ANDROID] [CHANGED] - Migrated ReactClippingViewGroupHelper.java to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50679
Test Plan:
✅ Ran yarn && yarn android in the root directory and verified RNTester builds successfully.
✅ Opened RNTester on an Android emulator/device and navigated through various screens to ensure the app works as expected.
✅ Specifically tested views with removeClippedSubviews enabled to confirm runtime behavior remains unchanged.
✅ Used [KtFmt](https://github.com/facebook/ktfmt) to format the Kotlin file properly.
Reviewed By: arushikesarwani94
Differential Revision: D72973621
Pulled By: cortinico
fbshipit-source-id: e6f426a0cb7eb583935a560660900b29786df4c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50105
Pull Request resolved: https://github.com/facebook/react-native/pull/49543
When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.
This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.
With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.
We then prevent the clipping of the topmost parent of the next focusable view to lay out the entire containing element in case we have some necessary context in the parent
Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled
Reviewed By: joevilches
Differential Revision: D71324219
fbshipit-source-id: b55b7735a30714b2a5e1c9e0ed4ae84ab43f6694
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50404
Add another function to fabric to get the topmost stacking context parent given a root and a child.
This is to be used on focus searching algorithm in the case where the next focusable child is deeper in the hierarchy meaning we need to find the top most parent in the Android hierarchy and lay that out as well before transferring focus.
If we don't lay out the parent as well as the next focusable view:
- The next focusable view might lack context given by the parent
- If the parent is a scrollview and has removeClippedSubviews enabled then laying out the next focusable view will not work
- If the view is deeper in the android hierarchy in some cases it won't be layed out unless the parent is
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D72178408
fbshipit-source-id: 7b91ea695e236f3a92f9703bcc9ca943bf0dec24
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50196
Currently when `removeClippedSubviews` is enabled on Android keyboard navigation breaks and we can never focus the elements that are clipped. iOS has a similar issue but not as drastic, it only happens when elements on the FlatList have a lot of margin between them.
This algorithm aims to find the next focusable view and return it to native so that we can prevent the clipping of the view on the view clipping algorithm and hence fix keyboard navigation. For more information see D71324219
Fabric algorithm to find the next focusable view given:
`parentTag`: Top most relevant parent of the focused view
`focusedTag`: Tag of the currently focused view
`direction`: Direction in which focus is moving
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71558965
fbshipit-source-id: 1a13c82d067834337e7f7936860780f467c9a15d
Summary:
Introduce a trait to be able to tell if a ShadowNode is focusable by keyboard. This will be used for focus ordering that delegates the work to the shadow tree when Native platforms don't have enough information to define the next focusable node
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D72258544
fbshipit-source-id: dcc2410b408eab5dbefc4512e0680cbe7f18c811
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50638
There were two issues with inset shadows here that I fixed
* If spread was big enough it would "invert" the clear region. [RectF's inset](https://developer.android.com/reference/android/graphics/RectF#inset(float,%20float)) method does not bound to a 0x0 rect, it will instead start making the rect bigger if the inset value is large enough.
* If the clear region was outside the rect the shadow disappeared. This is because [Canvas's drawDoubleRoundRect](https://developer.android.com/reference/android/graphics/Canvas#drawDoubleRoundRect(android.graphics.RectF,%20float[],%20android.graphics.RectF,%20float[],%20android.graphics.Paint)) will fail to draw if the inner rect is not completely inside of the outer.
Changelog: [Android][Fixed] - Fix inset shadow edge cases
Reviewed By: GijsWeterings
Differential Revision: D72833275
fbshipit-source-id: 3f42fb767630319c51a380f8ea28d682df9771a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50666
This diff updates the assert message in ReactNativeNewArchitectureFeatureFlags to reflect the behavior required by the assert
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D72868428
fbshipit-source-id: 7a43aa9d3b3a2ee60e88cf77d117d97edc955af3