Summary:
Refactor unique -> shared pointer in Component. This will be necessary in the next diffs of the stack
changelog: [intenal] internal
Differential Revision: D41629759
fbshipit-source-id: 335161c350692e25ac3443bd19675a89f9df60c4
Summary:
Consolidates creation of OkHttpClients used by RN panel apps into PanelAppOkHttpClientProvider. This diff adds no functional changes; however, a followup diff will leverage this to add an Interceptor for overriding the network tier.
Changelog:
[Internal] - Enable passing in custom OkHttpClient to NetworkingModule
Reviewed By: rshest
Differential Revision: D41621244
fbshipit-source-id: 8954f9adc6a0cfdf6312678e2dbd6be8ef9aa5ca
Summary:
On main, We download and store `hermes.tar.gz` locally during builds.
If another commit on the Hermes repo lands, Gradle might not re-download the hermes.tar.gz
file.
This commit fixes it by using `useETag` that allows us to use ETag that Github exposes
to understand if the tarball has been updated or not.
Changelog:
[Internal] [Changed] - Ensure local hermes.tar.gz doesn't get stale between subsequent runs.
Reviewed By: javache
Differential Revision: D41652865
fbshipit-source-id: 9f6e02957989acb02f419286c94b05df701c8a04
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35521
Inside RC3 the jscexecutor target was prepared for prefab consumption
but not properly exposed.
This was not caught by the CI as we're not effectively using this target,
but some of our popular libraries do (i.e. Reanimated). I'm exposing it here.
Changelog:
[Internal] [Changed] - Properly expose `jscexecutor` as a prefab target
Reviewed By: javache
Differential Revision: D41648349
fbshipit-source-id: 1a04bc21aa50eece304828ce1d99ae795a51af48
Summary: `dispatchPreallocationInBackground_` is removed and we don't need to use the lambda function anymore.
Reviewed By: javache
Differential Revision: D41574447
fbshipit-source-id: 9c2b8a067fb86b75320b338e3f8c7989315f9b8b
Summary:
Color support for AnimatedInterpolation was incomplete with native drivers, as only rgba type strings were supported. There was also an issue where color props instead a StyleAnimatedNode would never get applied. We were also potentially duplicating color parsing support, which is already centralized in `normalizeColor` / `processColor`.
Changelog: [Android][Added] Enable AnimatedInterpolation to interpolate arbitrary color types.
Reviewed By: mdvacca
Differential Revision: D40571873
fbshipit-source-id: 41857ab0391279c5307bc31b855ea8fbcb4cccd8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35506
In our build we had a mixture of `_` and `-` to separate targets.
Dashes don't play well with Gradle + as we expose them now via Prefab,
let's stick to use only underscores
Changelog:
[Internal] [Changed] - Rename target to don't use dashes
Reviewed By: cipolleschi
Differential Revision: D41578938
fbshipit-source-id: 8aa44aa2dc7bf4822b45e5044532837b989817d2
Summary:
Noticed that we weren't receiving pointer events for nested Text spans when the new pointer events implementation was enabled.
Changelog: [Internal]
Reviewed By: lunaleaps
Differential Revision: D41496672
fbshipit-source-id: 9d0ed83d1bb5f42211ec655328035651f25fa471
Summary:
These experiments have been removed already, but we still have references to them in C++.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D41549465
fbshipit-source-id: 1158fb391b4279ef4eb6ad7123cb8113d7ecccef
Summary: Changelog: [Internal] - Internal usage broke existing behavior, reverting to check if a flag is set.
Reviewed By: javache
Differential Revision: D41502122
fbshipit-source-id: 296bb1578cd63f935e4111bfec8d58f965149640
Summary:
This is the last library that we should expose via Prefab.
Thanks to cipolleschi 's work here moving the file to `/ReactCommon/jsc` folder
we can easily expose it to be consumed by third parties.
Changelog:
[Internal] [Changed] - Expose `jscruntime` to be consumed via Prefab
Reviewed By: cipolleschi
Differential Revision: D41534564
fbshipit-source-id: fb4b2d801def8caf71638dcb74eb87f8230984d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35482
This change moves the JSCRuntime.h/cpp into a `jsc` folder.
This change is required for several reasons:
1. on iOS, the new `jsi`, `jsidynamic` and `jsc` setup is breaking the `use_frameworks!` with `:linkage => :static` option with the old architecture. So it is a regression.
2. JSCRuntime is required by some libraries and needs to be exposed as a prefab and the current setup makes it hard to achieve.
allow-large-files
## Changelog:
[General][Changed] - Move JSCRuntime into a separate pod/prefab
Reviewed By: cortinico
Differential Revision: D41533778
fbshipit-source-id: 642240c93a6c124280430d4f196049cb67cb130b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35436
Using std::optional as react-native has been using C++17 for quite some time
changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D41415031
fbshipit-source-id: d786647f64b4f90cf75409109830ae0885460c17
Summary:
We have two warnings on MapBuffer which I'd like to resolve as they show up on console every time.
1. We're using a deprecated method receiveCommand, which is actually legit but was missing a propagation of the warning. I'm adding it.
2. We had a null check that that was always not null. That is enforced by the Kotlin type system. I've checked the code and
we're actually always returning non-nulls there or raising exceptions instead.
Changelog:
[Internal] [Changed] - Fix compilation warnings for MapBuffer
Reviewed By: javache
Differential Revision: D41522129
fbshipit-source-id: c2dbb660f95a2ff7dac6e4fcdf476e4058cf730e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35461
This is another library which is adding prefab support as it's needed by
Expo libraries and Reanimated.
Changelog:
[Internal] [Changed] - Allow `reactnativejni` to be consumed via prefab
Reviewed By: cipolleschi
Differential Revision: D41520801
fbshipit-source-id: 91142a5b5051cfba478d93a2475a178eed6fbb29
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35460
Reanimated reported that `react_nativemodule_core` was missing some headers.
Specifically the one from ReactAndroid::react_debug, ReactAndroid::react_render_core, ReactAndroid::glog,
and ReactAndroid::react_render_debug.
I'm adding them here so they get included in the shipped headers for `react_nativemodule_core`
Changelog:
[Internal] [Changed] - Add missing headers to `react_nativemodule_core` prefab module
Reviewed By: cipolleschi
Differential Revision: D41520751
fbshipit-source-id: 4627a2d0f880d4bb3ff2f0e43cd735cf9a3f2f9a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35458
We're adding prefab support for those modules as they're needed by Reanimated
and we're exposing headers for them as well.
Changelog:
[Internal] [Changed] - Add prefab for _uimanager _scheduler and _mounting
Reviewed By: cipolleschi
Differential Revision: D41520606
fbshipit-source-id: 76f3c81705e99057b92cd9b86d0601a2b1410f95
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35457
This exposes `hermes-executor` to be consumed via prefab so that
libraries can depend on it and use its symbols if needed (Expo and Reanimated need it).
Changelog:
[Internal] [Changed] - Expose `hermes-executor` to be consumed via prefab
Reviewed By: cipolleschi
Differential Revision: D41520019
fbshipit-source-id: d590a043ea89fdd8ff41b0ed20900c9cf381a1e4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35454
Historically, we used to have hermes-executor debug and release as separate dynamic libraries.
This makes it impossible to prefab this library, so I have to reconcile it into a single library.
This will also help keep the setup consistent with the internal (BUCK) where we have a single target.
Changelog:
[Internal] [Changed] - Consolidate hermes-executor-debug and -release inside a single target
Reviewed By: cipolleschi
Differential Revision: D41519119
fbshipit-source-id: d9ddc30b72164daa29c735836ea433fd4d917fc8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35435
This raises the C++ language standard to C++17 which is needed to remove some folly:: dependencies
changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D41482821
fbshipit-source-id: 62af6e95e6e78378112a4ce4e9c3ab7df0587218
Summary:
In this diff I'm refactoring ViewGroupManager to implement IViewGroupManager
This will be used by ViewManagers that require to add views but don't depend on ViewGroupmanager
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D41386918
fbshipit-source-id: 427b9689eb3408c2477cf38494d42280b41fd7d8
Summary:
In this diff I'm introducing IViewGroupManager to extract methods required to add/remove views from a viewGroup
This will be used by ViewManagers that require to add views but don't depend on ViewGroupmanager
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D41386920
fbshipit-source-id: a7d893d92d0f12766dcc71dfd1b22539c3b9687d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35392
Changelog:
[General][Added] - For supporting Dev Loading View across platforms, adding the DevLoadingViewController without an activity/context.
Reviewed By: rshest
Differential Revision: D40947239
fbshipit-source-id: de124b0a7ee39dc7da3c1c45972a6703eff2f0ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35379
This diff moves the publishing coordinates from:
```
com.facebook.react:react-native
com.facebook.react:hermes-engine
```
to
```
com.facebook.react:react-android
com.facebook.react:hermes-android
```
I've picked those they are the most layout friendly when building from source, but we can discuss if we want others.
I've updated the Gradle plugin to have a dependencySubstitution rule + update the template with those changes.
It should now be possible to still use `implementation("com.facebook.react:react-native:+")` inside libraries
on 0.71+ and RNGP will resolve dependencies correctly.
Changelog:
[Android] [Changed] - Void the Maven coordinates for react-native and hermes-engine
Reviewed By: cipolleschi
Differential Revision: D41380525
fbshipit-source-id: 91e059fa261acb89bee7ca0c79c30c3d856a2c80
Summary:
From exception logging, found crashes due to `Attempt to invoke virtual method 'int android.view.ViewGroup.getChildCount()' on a null object reference`. Tracing through the stack, it appears the constructor for `ViewGroup` conditionally calls `initializeScrollbarsInternal()`, which in turn calls `getChildCount()`. However `ReactModalHostView` overrides `getChildCount()`, so `getChildCount()` is called before `ReactModalHostView` constructor completes, resulting in null reference when accessing `mHostView` from `getChildCount()`.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Android] [Fixed] - Fix crash on initialize modal
Pull Request resolved: https://github.com/facebook/react-native/pull/35380
Test Plan: In the rn-tester project, display a modal.
Reviewed By: javache, cipolleschi
Differential Revision: D41392235
Pulled By: ryancat
fbshipit-source-id: ce78e4d458ad41769e78139ea0a8a038384e830d
Summary:
Fix linter warning when pulling in some code into AR
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D41269423
fbshipit-source-id: 4305d6c362a51e62b19b4d3590fb0823073dff9a
Summary:
The goal of this diff is to introduce the scafolding of a BoxComponent. This class will be eventually shared by Android and iOS
changelog: [internal] internal
Reviewed By: sammy-SC
Differential Revision: D41205801
fbshipit-source-id: e33e58062aa33e0c8e9a48fd112309a358f0a060
Summary:
The goal of this diff is to refactor the name of Component to ComponentDeprecatedAPI
Also, I'm introducing a new very simple Component API, this new Component will evolve in the next few diffs and days
changelog: [internal] internal
Reviewed By: sammy-SC
Differential Revision: D41128461
fbshipit-source-id: b6aea08caa609153663cdd4165694cc57b4b76b6
Summary:
at some point, the `Build.FINGERPRINT` of the emulator has changed and no longer includes `generic` as an option.
It apparently now, on all platforms, includes `google/sdk_gphone` at the beginning. Older emulators may still include `generic` in the `Build.FINGERPRINT` so we should maintain that check too.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Android] [Fixed] - Fix android emulator detection for packager host
Pull Request resolved: https://github.com/facebook/react-native/pull/35111
Test Plan: When running on a modern emulator, ensure that the packager attempts to load from `10.0.2.2`.
Reviewed By: cipolleschi
Differential Revision: D41266071
Pulled By: GijsWeterings
fbshipit-source-id: 43115dbde6a411fe2ebde23e720dff4812a4309f
Summary:
Changelog:
[Internal][Changeded] - https://github.com/facebook/react-native/pull/31841 introduced customisations for DevSupportManager which made this create() redundant, hence deprecating and adding the annotation.
Reviewed By: cipolleschi
Differential Revision: D41292920
fbshipit-source-id: 9fc348a3f4f8f64ba6f7aee85f302e87e10e8cd5
Summary:
Hi, while adjusting [react-native-screens](https://github.com/software-mansion/react-native-screens) to `0.71.0-rc.0` I encountered the same problems as reported [here](https://github.com/reactwg/react-native-releases/discussions/41#discussioncomment-4085694) by WoLewicki.
Basically inside `CMake`'s `foreach` loop iterator variable is not being expanded to the actual value:
```cmake
foreach(autolinked_library ${AUTOLINKED_LIBRARIES})
target_link_libraries(autolinked_library common_flags) // <-- here we are literally linking to "autolinked_library".
endforeach()
```
## Changelog
[Android] [Fixed] - Fix Android autolinking failing because of not expanded variable
Pull Request resolved: https://github.com/facebook/react-native/pull/35306
Reviewed By: christophpurrer, cipolleschi
Differential Revision: D41220408
Pulled By: rshest
fbshipit-source-id: 12ce993f0c5227ca7d3c2cc272fe3739126930b3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35256
Changelog:
[General][Added] - Making Dev Loading View cross platform by abstracting out the activity/context logic from the controller in a polymorph class.
Reviewed By: rshest
Differential Revision: D40908923
fbshipit-source-id: db8e94f8ded5ffe0deeb88335cd7f3d1bf87243a
Summary:
When a __rounded__ View on Android has a border, a small gap appears between the border and the center of the view (most noticeably when the background and border colors are the same)
Since the border is drawn on top of the other layers, the approach here is to make the center of the View slightly larger so that there is an overlap with the border, and closing the visible gap
There are 2 cases for a View with a border:
1. `borderWidth` is set for a consistent border width around all 4 edges
2. Uneven border widths are set (using `borderTopWidth`, `borderLeftWidth, ...)
**How is a rounded rectangle drawn?**
__Case 1__: `borderWidth` is set for a consistent border width around all 4 edges
- Before:
- first, `mInnerClipPathForBorderRadius` was used to draw the center of the View
- then the border is drawn along the path of `mCenterDraw` with a stroke width of the border width
- Now:
- `mBackgroundColorRenderPath` is used to draw the center of the View and is exactly a slightly enlarged version of `mInnerClipPathForBorderRadius`
__Case 2__: Uneven border widths are set (using borderTopWidth, borderLeftWidth, ...)
- Before:
- `mInnerClipPathForBorderRadius` was used to draw the center of the View
- for each edge, a quadrilateral is drawn
- `mOuterClipPathForBorderRadius` clips the outer edge of the border
- `mInnerClipPathForBorderRadius` (same is used to draw the center of the View) clips the inner edge of the border
- Now:
- `mBackgroundColorRenderPath` is used to draw the center of the View, allowing `mInnerClipPathForBorderRadius` to persist as the path that clips the inner edge of the border
When `mGapBetweenPaths` = 0, `mBackgroundColorRenderPath` == `mInnerClipPathForBorderRadius`, which is exactly the original implementation
Changelog:
[Internal][Fixed] - rounded Views with borders shows small gap
Reviewed By: mdvacca
Differential Revision: D39979567
fbshipit-source-id: 6db71d14ead6256e1b7becf73862e0a537c6a47b
Summary:
>Expandable and Collapsible are unique in the Android Accessibility API, in that they are not represented as properties on the View or AccessibilityNodeInfo, but are only represented as AccessibilityActions on the AccessibilityNodeInfo. This means that Talkback determines whether or not a node is "expandable" or "collapsible", or potentially even both, by looking at the list of AccessibilityActions attached to the AccessibilityNodeInfo.
>When setting the accessibilityState's expandable property, it should correlate to adding an action of either AccessibilityNodeInfoCompat.ACTION_EXPAND or AccessibilityNodeInfoCompat.ACTION_COLLAPSE on the AccessibilityNodeInfo. This work should be done in the ReactAccessibilityDelegate class's
>Currently, this feature is being "faked" by appending to the contentDescription in the BaseViewManager class. This should be removed when this feature is implemented properly.
fixes https://github.com/facebook/react-native/issues/30841
## Changelog
[Android] [Fixed] - using AccessibilityNodeInfo#addAction to announce Expandable/Collapsible State
Pull Request resolved: https://github.com/facebook/react-native/pull/34353
Test Plan:
- On some components, the state expanded/collapsed is properly announced on focus, on some it is not.
- On some components only the expanded/collapsed state is announced, and not other component text.
- Upon change, state change is not always announced.
- The accessibilityState's "expanded" field does not seem to work on all element types (for example, it has no effect on 's).
- using accessibilityActions it is possible to add an action for expand/collapse, but these are treated as custom actions and must have their own label defined, rather than using Androids built in expand/collapse actions, which Talkback has predefined labels for.
https://snack.expo.io/0YOQfXFBi
Tests 15th August 2022:
- Paper [Tests](https://github.com/facebook/react-native/pull/34353#issuecomment-1217425302)
- Fabric [Tests](https://github.com/facebook/react-native/pull/34353#issuecomment-1217781734)
Tests 6th September 2022:
- [Button which keeps control of extended/collapsed state in JavaScript with onAccessibilityAction, accessibilityActions and accessibiltyState (Paper)](https://github.com/facebook/react-native/pull/34353#issuecomment-1237601847)
- [TouchableWithoutFeedback keeps control of extended/collapsed state in Android Widget (Paper)](https://github.com/facebook/react-native/pull/34353#issuecomment-1237616304)
- [TouchableWithoutFeedback keeps control of extended/collapsed state in Android Widget (Fabric)](https://github.com/facebook/react-native/pull/34353#issuecomment-1237624755)
- [TouchableOpacity announces visible text and triggers expanded/collapsed with onPress and accessiblity menu (Fabric)](https://github.com/facebook/react-native/pull/34353#issuecomment-1237627857)
Announcing state with custom actions on Fabric (FAIL).
The issue is not a regression from this PR, as documented in https://github.com/facebook/react-native/pull/34353#issuecomment-1207744977. It will be fixed in a separate PR.
Reviewed By: NickGerleman
Differential Revision: D39893863
Pulled By: blavalla
fbshipit-source-id: f6af78b1839ba7d97eca052bd258faae00cbd27b