Closed
Conversation
|
@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90902079. |
Summary: This diff adds the ability to experiment with using `NestedScrollView` instead of `ScrollView` as the parent class for `ReactScrollView` on Android. Since Java doesn't support multiple inheritance or conditional parent class selection, this is implemented using code generation: - A Python script (`generate-nested-scroll-view.py`) generates `ReactNestedScrollView.java` and `ReactNestedScrollViewManager.kt` from their respective source files - The generated files are identical to the originals except they extend `NestedScrollView` instead of `ScrollView` - A Buck genrule verifies the generated files stay in sync with source files at build time - The `useNestedScrollViewAndroid` feature flag controls which implementation is used at runtime This approach allows us to safely A/B test the NestedScrollView implementation without requiring JS changes, since both managers register with the same `REACT_CLASS` name (`"RCTScrollView"`). Changelog: [Internal] Differential Revision: D90902079
bb91855 to
9dda7ca
Compare
Contributor
|
If this lands, my PR from 2024: #44099 will be eligible for closing. |
|
This pull request has been merged in 5e93036. |
Collaborator
|
This pull request was successfully merged by @Abbondanzo in 5e93036 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:
This diff adds the ability to experiment with using
NestedScrollViewinstead ofScrollViewas the parent class forReactScrollViewon Android.Since Java doesn't support multiple inheritance or conditional parent class selection, this is implemented using code generation:
generate-nested-scroll-view.js) generatesReactNestedScrollView.javaandReactNestedScrollViewManager.ktfrom their respective source filesNestedScrollViewinstead ofScrollViewuseNestedScrollViewAndroidfeature flag controls which implementation is used at runtimeThis approach allows us to safely A/B test the NestedScrollView implementation without requiring JS changes, since both managers register with the same
REACT_CLASSname ("RCTScrollView").Changelog: [Internal]
Differential Revision: D90902079