Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51844
These just redefine the existing `receiveCommand` from the ViewManagerDelegate which already has this codegen'ed
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D75869325
fbshipit-source-id: c8ba482075c2586caf33f46a871b5b5e16fda213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51619
RNTester Android is currently instacrashing in OSS due to 3rd-party packages not having the `RN_SERIALIZABLE_STATE` definition.
That's because the `INTERFACE` definition is not properly propagated on the prefab boundaries.
This was happening for `react-native-popup-menu-android` and `react-native-test-library` and will also happen for Codegen libraries.
This fixes it. 3p developers with custom CMake files will also have to use the `target_compile_reactnative_options` functions to make sure the compilation flag are properly populated.
Changelog:
[Android] [Breaking] - Correctly propagate RN_SERIALIZABLE_STATE to 3rd party CMake targets. Users with custom CMake and C++ code should update to use `target_compile_reactnative_options` inside their CMakeLists.txt files. See the 0.81 release notes for more information.
Reviewed By: cipolleschi
Differential Revision: D75441245
fbshipit-source-id: 3855fdf11cbe7f4b01f68e0dde68b63b3240ad35
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51185
Was running into issues with split Android ParagraphState, because a lot of code is tied to `#ifdef ANDROID`, which also builds for react-native-cxx.
This does that spliitting, and also introduces `RN_SERIALIZABLE_STATE` to replace previous ANDROID checks related to state serialization, so we can cofine that to just the Android platform. These changes are dependent on each other.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D74374376
fbshipit-source-id: ffb246ea2e16773f85de12209f2d88a95f8bb792
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49274
In this diff I'm updating all the non-codegen ViewManagerInterfaces to extend ViewManagerWithGeneratedInterface to make it consistent with codenerated ViewManagerInterfaces
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D69206247
fbshipit-source-id: 6a577d9ee7410be990a03e78847333b61b429e88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49212
Currently, developers can't use `popup-menu-android` at all because the Gradle file we publish is referencing
internal machinery.
I'm adding a pre-publish script that manipulates the Gradle. This is the easiest solution without having to do
crazy setup inside RNGP or having duplicated version codes around in the monorepo.
Fixes https://github.com/facebook/react-native/issues/49112
Changelog:
[Android] [Fixed] - Fix react-native/popup-menu-android not building for 3rd party developers
Reviewed By: cipolleschi
Differential Revision: D69192874
fbshipit-source-id: 9f9e8a0a6e76308e598a09f4c70dbc659c238b00
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46809
BaseViewManagerInterface isn't adding much value right now. It was added in D16984121 to allow codegen generated ViewManager delegates to apply to view managers which derive from ViewMangager instead of BaseViewManager (if they did some cleverness, to make VM delegate apply to a no-op class, still implementing all of BaseViewManager's methods).
All of the cases where that was used have since been moved to `SimpleViewManager`, and `BaseViewManagerAdapter` (needed to wire this together) doesn't exist anymore, so it's not possible to take any advantage of this interface existing. We should remove it, since its existence is a source of error (e.g. it was missing setters for `accessibilityValue` or those related to pointer events), and is more generally confusing for anyone adding to `BaseViewManager` in the future.
This is a breaking change, because there are some libraries which vendor a copy of generated ViewManagerDelegate when building against legacy arch to be able to share code normally generated at build time. That means these will need to be updated to maintain compatibility with RN versions of 0.77+ with new arch disabled. This will not effect compatibility of these libraries against the default new arch, and the updated delegate is still compatible with older RN version.
```
sourceSets.main {
java {
if (!isNewArchitectureEnabled()) {
srcDirs += [
"src/paper/java",
]
}
}
}
```
1. `react-native-picker/picker`
2. `rnmapbox/maps`
3. `react-native-gesture-handler`
4. `react-native-screens`
5. `react-native-svg`
6. `react-native-safe-area-context`
7. `react-native-pdf`
Changelog:
[Android][Breaking] - Remove BaseViewManagerInterface
Reviewed By: cortinico
Differential Revision: D63819044
fbshipit-source-id: 7e4935c8e43706b168f0f599a6676e8abfa66937
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46390
As React Native's minSdkVersion is not 24, clean up version checks and code that is using deprecated version from OSS
Changelog:
[Internal] - code cleanup for minSdkVersion 24
Reviewed By: philIip
Differential Revision: D62362059
fbshipit-source-id: a851d0908d4175269524f41955acca5f2da69cad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45735
This merges several 2 external libraries from .so to be included inside
libappmodules.so.
Changelog:
[Internal] [Changed] - Move react_codegen_* libraries for RNTester to OBJECT
Reviewed By: rozele, rshest
Differential Revision: D60290806
fbshipit-source-id: 6bfa40995d7538e075819d916e8a204464edb75b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43909
As we're moving towards a single `libreactnative.so` file, we need to remove several of our prefab targets. Here I'm cleaning up those that are not having an OnLoad.cpp file which needs to be loaded from SoLoader.
This is breaking for libraries using native dependencies via Prefab (i.e. search for `ReactAndroid::` in CMakeLists.txt files for your project).
If so, the CMakeLists.txt files should be updated as follows:
```diff
- ReactAndroid::react_render_debug
+ ReactAndroid::reactnative
```
This applies to every prefab dependencies (the example is just for `react_render_debug`
Changelog:
[General] [Breaking] - Remove several libs from default App CMake setup
Reviewed By: cipolleschi
Differential Revision: D55751683
fbshipit-source-id: 3aca7897852b5f323d60ede3c5036cae2f81e6c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44799
This is the final part of core autolinking:
1. I split RNGP into an `app-plugin` and a `settings-plugin`. This was necessary as the Gradle modules need to be loaded inside the settings.gradle.kts.
2. I've introduced a Settings Plugin to take care of either invoking the `config` command from CLI or receiving a file in input.
3. I've removed the former `RunAutolinkingConfigTask` as now the command is invoked inside the settings plugin
4. I've added hashing computed based on the lockfiles so we won't be re-executing teh `config` command if the lockfiles are not changed.
5. I've updated RN-Tester to use the core autolinking rather than manual linking for the 2 libraries it's using.
Changelog:linking
[Internal] [Changed] - RNGP - Autolinking. Add support for linking projects
Reviewed By: blakef
Differential Revision: D58190363
fbshipit-source-id: 6ab8b36729e77ca715f50a4a00aa0ca4eb5b63b1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44379
A common pattern to implement `ViewManagerOnDemandReactPackage` is to use a `getViewManagersMap` helper. If we capture `ReactApplicationContext` there, we will indefinitely retain the the very first ReactApplicationContext, and break/leak across reloads. Instead we should pass the `ReactApplicationContext` whenever we construct the ViewManager.
Changelog: [Internal]
Reviewed By: RSNara
Differential Revision: D56838427
fbshipit-source-id: 76583dd7f5564ed29f0dbfcef33d8d288cbb90e0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44103
Changes here fixes events in PopupMenuAndroid not being triggered correctly.
Issuses were:
1) naming mismatch
2) wrong parameters were set for the Event Map
3) missing code in .cpp
Applied fixes:
1) consistent event naming
2) fixed key used for event mapping
3) re-ran codegen to update .cpp files
## Changelog:
[Android] [internal] - Fix issue with PopupMenuAndroid event callback not working
Steps took to run codegen for this diff: https://www.internalfb.com/intern/phabricator/paste/markdown/P1214671854/
This diff is patching issues from D55531870
Reviewed By: RSNara
Differential Revision: D56164235
fbshipit-source-id: 4cf66ad3cfd753c146c5e219f27910834731e183
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43785
Deprecated `UIManager.showPopupMenu()` had success callback that would be triggered on 1) item selection or 2) dismiss.
New `PopupMenuAndroid` only has item selection callback so adding in missing dismiss callback.
Changelog:
[Android][Added] - Add (optional) onPopupDismiss() callback for PopupMenuAndroid
Reviewed By: cortinico
Differential Revision: D55531870
fbshipit-source-id: 26f3992ef6c85fbc6d8dfff00cb723ac4aae3762
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43755
This is another place where the OSS build went ahead of the internal source of truth, which has caused build breaks more than once.
This enables warnings as errors in `rn_android_library` for consistency. This is used for a couple libraries outside of ReactAndroid that might need fixup/suppression.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D55623682
fbshipit-source-id: 37da30c642de2c3d8390334a0d0bff365a4ed7a1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43696
This just sets explicitApi to true for every module inside ReactAndroid
Changelog:
[Internal] [Changed] - Flip explicitApi to True for everyone
Reviewed By: tdn120
Differential Revision: D55478674
fbshipit-source-id: c9aeba89ad5b0f88bca7fd480c6aa66e0152a456
Summary:
**History:** This component was originally introduced into React Native core in D52712758, to replace UIManagerModule.showPopupMenu().
**Problem:** But, React Native core should be lean. Adding this component to React Native bloats the core.
**Changes:** So, this diff pulls PopupMenuAndroid out into its own package in the react-native GitHub repository.
In the future, this will be migrated to a community package!
Changelog: [Android][Removed] Move PopupMenu out of React Native core
Reviewed By: NickGerleman
Differential Revision: D53328110
fbshipit-source-id: 469d8dc3e756c06040c72e08fa004aafa1bd6e18