Add missing BaseViewManager props to BaseViewManagerDelegate#46934
Closed
NickGerleman wants to merge 2 commits into
Closed
Add missing BaseViewManager props to BaseViewManagerDelegate#46934NickGerleman wants to merge 2 commits into
NickGerleman wants to merge 2 commits into
Conversation
Summary:
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
Summary: BaseViewManagerDelegate is a handcrafted second source of truth, used specifically for codegen. The organization here has some problems, but this diff adds the props currently missing from it, so that these work correctly in generated view managers. Changelog: [Android][Fixed] - Add missing BaseViewManager props to BaseViewManagerDelegate Differential Revision: D64137615
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D64137615 |
NickGerleman
added a commit
to NickGerleman/react-native
that referenced
this pull request
Oct 9, 2024
…k#46934) Summary: BaseViewManagerDelegate is a handcrafted second source of truth, used specifically for codegen. The organization here has some problems, but this diff adds the props currently missing from it, so that these work correctly in generated view managers. Changelog: [Android][Fixed] - Add missing BaseViewManager props to BaseViewManagerDelegate Differential Revision: D64137615
Contributor
|
This pull request has been merged in 6741fd9. |
Collaborator
|
This pull request was successfully merged by @NickGerleman in 6741fd9 When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
BaseViewManagerDelegate is a handcrafted second source of truth, used specifically for codegen.
The organization here has some problems, but this diff adds the props currently missing from it, so that these work correctly in generated view managers.
Changelog:
[Android][Fixed] - Add missing BaseViewManager props to BaseViewManagerDelegate
Differential Revision: D64137615