feat: migrate SvgViewManager from ReactViewManager to typed ViewGroupManager #2304
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
Explain the motivation for making this change: here are some points to help you:
ReactViewManager
to typedViewGroupManager
. Initially it was meant to help with Kotlin migration as Kotlin has more strict type checking, however it appears that this PR will also solve issue of need to implement tons of properties that are not applicable to SVG or were just delegating calls to super class.SvgView
extends fromReactViewManager
toViewGroupManager<SvgView>
SvgView
component on Android platform (large portion of unsupported anyway properties was removed)hitSlop
implementation now falls back to default implementation instead having our own that was there due to different signature between RN versions. This is no longer issue after 0.70 version.Test Plan
No changes applicable to end user
What's required for testing (prerequisites)?
Android simulator with example app
What are the steps to reproduce (after prerequisites)?
Check if there are no behavior changes between previous implementation and current
Compatibility
Checklist
README.md
__tests__
folder