Summary:
This PR fixes https://github.com/facebook/react-native/issues/41874.
## 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
-->
[iOS] [Fixed] - Fix NSAppTransportSecurity being overwritten during pod install
Pull Request resolved: https://github.com/facebook/react-native/pull/41875
Test Plan:
1. Delete the whole `NSAppTransportSecurity` in Info.plist and run `pod install`: `NSAllowsArbitraryLoads` and `NSAllowsLocalNetworking` are added as expected.
2. Modify `NSAppTransportSecurity` to only contain `NSExceptionDomains` and run `pod install`: `NSAllowsArbitraryLoads` and `NSAllowsLocalNetworking` are added, and `NSExceptionDomains` is still there.
3. Run `pod install` again: nothing changes.
Reviewed By: christophpurrer
Differential Revision: D52032400
Pulled By: dmytrorykun
fbshipit-source-id: 48cf29809c283af80613ffbf1ac0dc663a0a2fb5
Summary:
Bridgeless dev menu couldn't open due to self.bridge being null here.
Changelog:
[Android][Changed] - Fix dev menu not open for Bridgeless
Reviewed By: cortinico
Differential Revision: D51746610
fbshipit-source-id: 2e9bab686c965271bbfad264ff22ff61e28849c3
Summary:
To unlock ~~certain OOT platform capabilities~~ seamless `init` integration for out-of-tree platforms with CLI, we need to pass the package name to it. This change landed on 0.73 branch already: https://github.com/facebook/react-native/pull/41530
Depends on https://github.com/facebook/react-native/issues/41722
## Changelog:
[INTERNAL] [ADDED] - Fix init for out-of-tree platforms by passing name to CLI
Pull Request resolved: https://github.com/facebook/react-native/pull/41723
Test Plan: CI green
Reviewed By: christophpurrer
Differential Revision: D51979329
Pulled By: dmytrorykun
fbshipit-source-id: 451f70dc42ae0667bc65cba2e77898c9eec8d9ec
Summary:
Small edit to point to the newer React Native docs guide for Metro, which includes more clarity on the `metro.config.js` file setup in React Native projects.
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/41855
Test Plan: —
Reviewed By: christophpurrer
Differential Revision: D52031862
Pulled By: huntie
fbshipit-source-id: 705418f35e5f6a3eddbec129e283773bb9d0f89c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41880
Pull Request resolved: https://github.com/facebook/react-native/pull/41664
Moving the check for Fabric i.e. `ReactFeatureFlags.enableFabricRenderer` to old JSI Module path logic instead of new UIManagerProvider path for Fabric initialization
Reviewed By: philIip
Differential Revision: D51610399
fbshipit-source-id: 1d868111dd2b65ac8d69198f7ab115ac8a2b43ec
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41852
I'm doing a pass and converting the last Java Unit Tests we had to Kotlin
I've also re-enabled multiple tests that were disabled in the past.
Changelog:
[Internal] [Changed] - Convert the last Unit Tests to Kotlin
Reviewed By: mdvacca
Differential Revision: D51891716
fbshipit-source-id: 7f953cf039a7b45bd773d1995253b4db262f8d22
Summary:
This PR adds build generated files to *ignore config files. This allows to locally run `yarn lint`
## Changelog:
[INTERNAL] [ADDED] - Add build generated files to local config files
Pull Request resolved: https://github.com/facebook/react-native/pull/41826
Test Plan: CI Green
Reviewed By: huntie
Differential Revision: D51939024
Pulled By: cortinico
fbshipit-source-id: cfd6c1c13dd23c692859cd06fa5955024fafc522
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41835
This removes internal usages of `onCatalystInstanceDestroy`.
The method is still available inside `NativeModule` but is `Deprecated(forRemoval = true)` so we're getting warning of its usages all over the places.
Changelog:
[Internal] [Changed] - Remove internal references of onCatalystInstanceDestroy()
Reviewed By: hoxyq
Differential Revision: D51589276
fbshipit-source-id: 84ed4d099a444977b95b4ef00e53750b79018e6f
Summary:
X-link: https://github.com/facebook/yoga/pull/1490
Pull Request resolved: https://github.com/facebook/react-native/pull/41692
In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing
Reviewed By: NickGerleman
Differential Revision: D51404489
fbshipit-source-id: 604495d651eb67cfdcca40df9d8d3a125c5741a8
Summary:
X-link: https://github.com/facebook/yoga/pull/1487
Pull Request resolved: https://github.com/facebook/react-native/pull/41691
The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side.
Reviewed By: NickGerleman
Differential Revision: D51383792
fbshipit-source-id: 372835a44edff361dbd84dd92ff9f2ec844b9f9c
Summary:
X-link: https://github.com/facebook/yoga/pull/1489
Pull Request resolved: https://github.com/facebook/react-native/pull/41690
Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child
Reviewed By: NickGerleman
Differential Revision: D51383625
fbshipit-source-id: 6bbbace95689ef39c35303bea4b99505952df457
Summary:
X-link: https://github.com/facebook/yoga/pull/1485
Pull Request resolved: https://github.com/facebook/react-native/pull/41686
The size of the containing block is the size of the padding box of the containing node for absolute nodes. We were looking at `containingNode->getLayout().measuredDimension(Dimension::Width)` which is the border box. So we need to subtract the border from this.
Added a test that was failing before this change as well
Reviewed By: NickGerleman
Differential Revision: D51330526
fbshipit-source-id: adc448dfb71b54f1bbed0d9d61c5553bda4b106c
Summary:
X-link: https://github.com/facebook/yoga/pull/1482
Pull Request resolved: https://github.com/facebook/react-native/pull/41685
This is the final step (that I know of) to get the core features of static working. Here we turn on all of the tests and pass down the correct owner size for the call to `calculateLayoutInternal` that is in `layoutAbsoluteChild`
Reviewed By: NickGerleman
Differential Revision: D51293606
fbshipit-source-id: 972259e7ebecb19b55aef2ef866bd7cb57aaf0ca
Summary:
X-link: https://github.com/facebook/yoga/pull/1481
Pull Request resolved: https://github.com/facebook/react-native/pull/41684
Absolute nodes can be laid out by themselves and do not have to care about what is happening to their siblings. Because of this we can make `positionAbsoluteChild` the sole place where we handle this logic. Right now that is scattered around algorithm with many `if (child is absolute)` cases everywhere. This makes implementing position static a lot harder since we are relying on the CB to do all this work, not the parent.
With this change the only time we set position for an absolute node and it matter (i.e. not overwritten) is in `positionAbsoluteChild`
Reviewed By: NickGerleman
Differential Revision: D51290723
fbshipit-source-id: 405d81b1d28826cbb0323dc117c406a44d381dff
Summary:
This enables the network panel/inspector by passing the `unstable_enableNetworkPanel=true` to the React Native JS Inspector. (See https://github.com/facebookexperimental/rn-chrome-devtools-frontend/pull/2)
By setting this inside the `experiments`, we can enable/disable network related CDP handlers within the proxy.
## Changelog:
[GENERAL] [ADDED] - Add `enableNetworkInspector` experiment to enable Network panel and CDP handlers in inspector proxy
Pull Request resolved: https://github.com/facebook/react-native/pull/41787
Test Plan: TBD, will provide a repository using an Expo canary / RN 0.73.0-rc release.
Reviewed By: NickGerleman
Differential Revision: D51811892
Pulled By: huntie
fbshipit-source-id: 541d96b6f0735104a4050a24a152e1158871ed1d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41828
Bumping the docker image used inside CircleCI to v12
This image contains NDK 26.0.10792818 which was bumped recently.
Without it the CI will attempt to download it everytime consuming time and bandwidth
Changelog:
[Internal] [Changed] - Bump Android Docker Image to v12
Reviewed By: NickGerleman
Differential Revision: D51897068
fbshipit-source-id: a510568efc2574917d94371eeab6f0a53550bc1d
Summary:
This PR convert `ReactPropForShadowNodeSetterTest` to kotlin as part of https://github.com/facebook/react-native/issues/38825
## Changelog:
[INTERNAL] [CHANGED] - Convert ReactPropForShadowNodeSetterTest to kotlin
<!-- 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/41774
Test Plan:
```
./gradlew :packages:react-native:ReactAndroid:test
```
Reviewed By: NickGerleman
Differential Revision: D51882685
Pulled By: cortinico
fbshipit-source-id: ff1cce824dc342200f1f5ccbb297b955747b10c8
Summary:
As the title says, if we discover that an issue needs a repro, then we should also apply
the "Needs: Author Feedback" as that will make the issue stale quicker (30 days) rather than (90)
Changelog:
[Internal] [Changed] - Adds "Needs: Author Feedback" if "Needs: Repro" is applied
Reviewed By: NickGerleman
Differential Revision: D51895945
fbshipit-source-id: 3ed651aec96795ada3e7c28b0f1e68d68f7fc870
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41815
Our Apps in OSS ends up shipping with too many .so files.
I'm attempting to move several libraries from dynamic to static.
This is a first round of it affecnting only libraries which are not
exposed via prefab and that are not having an OnLoad method
Changelog:
[Internal] [Changed] - Move several libraries to static linking
Reviewed By: NickGerleman
Differential Revision: D51895785
fbshipit-source-id: 1ba2dbbbae6b6c2639ba0e064f1b331b2a157f03
Summary:
Adds changelog for the 0.73.0 release. The changelog was generated using the following command: `npx rnx-kit/rn-changelog-generator --base v0.73.0-rc.4 --compare v0.73.0-rc.8`
## 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
-->
[INTERNAL] [CHANGED] - Add changelog for the 0.73.0 release.
Pull Request resolved: https://github.com/facebook/react-native/pull/41741
Test Plan: Read the changelog 🤞
Reviewed By: rubennorte
Differential Revision: D51892080
Pulled By: huntie
fbshipit-source-id: 191ece6dbb1a65210efb16e13fdab49b55b84145
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41806
Changelog: [Internal]
Adds `isChildPublicInstance` to renderers implementations, which makes it available for usage from `RendererProxy`.
Reviewed By: rubennorte
Differential Revision: D51822905
fbshipit-source-id: 3ac92ead9d31dd3c7e5e7764daf27fe5f0eca942
Summary:
Apple will require XCode 15 next year to ship to the app store, and it aligns with how we build and test React Native internally.
XCode 15 and 14.3 add support for a lot of [missing C++ 20 features](https://developer.apple.com/xcode/cpp/#c++20) from earlier versions as well.
Last I was aware, Riccardo was onboard with bumping min supported in 0.74 to XCode 15. This change does a slightly more conservative bump to min 14.3, and main of 15.0 (though we might want to move these before 0.74 comes out).
All of this will get migrated over to GHA soon enough as well, but... formalizing this is the only thing blocking usage of C++ 20 ranges today.
Changelog:
[ios][breaking] - Require XCode >= 14.3
Pull Request resolved: https://github.com/facebook/react-native/pull/41798
Test Plan:
1. CircleCI Passes
2. Can still boot RNTester from XCode with code signing related changes.
Reviewed By: cortinico
Differential Revision: D51840617
Pulled By: NickGerleman
fbshipit-source-id: 58f8951a436eb7c892a00432a8aad0ddd0a49da1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41812
# Changelog:
[Internal]-
This makes sure that unit tests that use okhttp, do consistently use okhttp v4 for both gradle and buck based workflows when running tests.
Reviewed By: christophpurrer
Differential Revision: D51864344
fbshipit-source-id: 7fd80fd1e7e9ccdc5ec75a41c5dd03f9fc2751a0
Summary:
Changelog: [Internal]
This makes a couple objects more exact. Nothing critical, just noticed
this old branch I had created when doing some Flow upgrades in the past.
DiffTrain build for commit https://github.com/facebook/react/commit/f498aa299292d4d1e999f66d1c769440ad10d57c.
Reviewed By: hoxyq
Differential Revision: D51824015
Pulled By: kassens
fbshipit-source-id: ecadc98ffb233d6458c65c38150a29ff65a10121
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41811
In this diff I'm extracting binaryCompatibilityValidator configuration into gradle.properties file. The goal is to reuse these properties from BUCK
changelog:[Internal] internal
Reviewed By: cortinico
Differential Revision: D51402033
fbshipit-source-id: 9b585dd07c5c00a39caadac47a2f0d605c5419f2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41804
Those 4 tests are Ignored since a while and I haven't found a easy way to re-enable them. I believe we can safely delete them.
Changelog:
[Internal] [Changed] - Remove dead unit tests related to text/layout property settings.
Reviewed By: sammy-SC
Differential Revision: D51848089
fbshipit-source-id: 89880f5402774cb0560ac8fe4ba21e1e44c24889
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41800
I've cleaned up the new issue template:
1. Added Expo to the template selector list
2. Added a short blurb with relevant links at the beginning of every issue template
3. I've added a dedicated field for reproducer and one for extra
4. I've added rendering to the react-native info block
5. I've added another rendered blog for stacktraces.
6. I've added a drop-down item for affected platform
Changelog:
[Internal] [Changed] - Refresh the New Issue template
Reviewed By: GijsWeterings
Differential Revision: D51847659
fbshipit-source-id: 565a2dcab4913825f441e2315ae9b4dd34fd2f4f
Summary:
X-link: https://github.com/facebook/yoga/pull/1494
Pull Request resolved: https://github.com/facebook/react-native/pull/41788
Those tests are currently disabled due to Yoga attempting to do JNI calls.
I've added infra to bypass .so loading during tests, and we should be good to re-enable those tests by now.
Changelog:
[Internal] [Changed] - Re-enabled disabled tests ReactPropForShadowNodeSpecTest and ReactPropForShadowNodeSetterTest
Reviewed By: NickGerleman
Differential Revision: D51814491
fbshipit-source-id: adbbace19c94a0c6d8947f61221fafafd7797ac8
Summary:
X-link: https://github.com/facebook/yoga/pull/1495
Pull Request resolved: https://github.com/facebook/react-native/pull/41794
This is a copy of D51369722 to make it so that it preserves the file history
CalculateLayout.cpp is massive and approaching 3k lines. I added a few large functions dealing with layout of absolute nodes and was thinking it would be nice if that logic was just in its own file so it was more isolated and easier to reason about. So I made AbsoluteLayout.cpp and AbsoluteLayout.h to house this logic. In order for this to work I had to expose calculateLayoutInternal in CalculateLayout.h as layoutAbsoluteChild calls it. This is unideal and I would like to find a better way...
I also make LayoutUtils.h to house misc small helper methods as they are called in AbsoluteLayout.cpp and CalculateLayout.cpp
Reviewed By: NickGerleman
Differential Revision: D51824115
fbshipit-source-id: 9b27449e3c1516492c01e6167a6b2c4568a33807
Summary:
X-link: https://github.com/facebook/yoga/pull/1479
Pull Request resolved: https://github.com/facebook/react-native/pull/41682
There are two ways to get the value of a style for a specific edge right now:
1) From the inline start/end edge which is determined via the writing direction (ltr or rtl), assuming you do not have errata on
2) From the flex start/end edge which is determined via the flex direction (row, row-reverse, column, column-reverse)
There is a weird curiosity in the second case: you can define a style to be on the "start" or "end" edge when writing the stylex/css. The physical edge that this refers to is dependent on the writing direction. So `start` would be `left` in `ltr` and `right` in `rtl`, with `end` the opposite. It is **never** determined via the flex direction. Additionally, `start`/`end` takes precedence over the physical edge it corresponds to in the case both are defined.
So, all of this means that to actually get the value of a style from the flex start/end edges, we need to account for the case that one of these relative edges was defined and would overwrite any physical edge. Since this mapping is solely determined by the writing direction, we need to pass that in to all the flex start/end getters and do that logic. This is done in `flexStartRelativeEdge`/`flexEndRelativeEdge` which was added earlier but for some reason only being used on border.
Reviewed By: NickGerleman
Differential Revision: D51293315
fbshipit-source-id: 26fafff54827134e7c5b10354ff9bfdf67096f5b
Summary:
X-link: https://github.com/facebook/yoga/pull/1473
Pull Request resolved: https://github.com/facebook/react-native/pull/41491
To simplify the logic a bit I introduce a new function called `positionAbsoluteChild`. This function will, eventually, be the **sole function that matters** when determining the layout position of an absolute node. Because [absolute nodes do not participate in flex layout](https://drafts.csswg.org/css-flexbox/#abspos-items), we can determine the position of said node independently of its siblings. The only information we need are the node itself, its parent, and its containing block - which we have all of in `layoutAbsoluteChild`.
Right now, however, this is purely a BE change with no functionality different. There was a big set of if statements at the end of `layoutAbsoluteChild` that would position the node on the main and cross axis for certain cases. The old code had it so that the main and cross axis had basically the same logic but the code was repeated. This puts that logic, as is, in `positionAbsoluteChild` and calls that from `layoutAbsoluteChild`.
I will soon edit this function to actually do what it is envisioned to do (i.e. be the sole place that position is set for absolute nodes).
Reviewed By: NickGerleman
Differential Revision: D51272855
fbshipit-source-id: 68fa1f0e0f4d595faf2af1d9eaceb467382ca406
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41490
X-link: https://github.com/facebook/yoga/pull/1472
This change has most of the logic needed for supporting `position: static`. We do two things here that fix a lot of the broken static test:
1) We pass in the containing node to `layoutAbsoluteChild` and use it to properly position the child in the case that insets are defined.
2) We rewrite the absolute child's position to be relative to it's parent in the event that insets are defined for that child (and thus it is positioned relative to its CB). Yoga's layout position has always be relative to parent, so I feel it is easier to just adjust the coordinates of a node to adhere to that design rather than change the consumers of yoga.
The "hard" part of this algorithm is determining how to iterate the offset from the containing block needed to do this translation described above. That is handled in `layoutAbsoluteDescendants`.
Reviewed By: NickGerleman
Differential Revision: D51224327
fbshipit-source-id: ae6dc54fe2a71bebb4090ba21a0afb0125264cbc