-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fabric support for maintainVisibleContentPosition on Android #35994
Closed
janicduplessis
wants to merge
1
commit into
facebook:main
from
janicduplessis:@janic/mvcp-android-fabric
Closed
Add fabric support for maintainVisibleContentPosition on Android #35994
janicduplessis
wants to merge
1
commit into
facebook:main
from
janicduplessis:@janic/mvcp-android-fabric
Conversation
This file contains 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
facebook-github-bot
added
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Contributor
A React Native contributor.
labels
Jan 27, 2023
Base commit: 8d5f880 |
@cortinico Could you have a look at this? Both PR that this depends on have been merged, so now MVCP is only missing support for Android Fabric, which this implements. |
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
cortinico
approved these changes
Apr 5, 2023
@cortinico merged this pull request in 1f384f7. |
kelset
pushed a commit
that referenced
this pull request
May 3, 2023
) Summary: Implement a few missing bits for `maintainVisibleContentPosition` to work with fabric. The main thing needed is to add 2 fabric renderer listener methods to allow to hook into specific parts of the rendering process. We need some code to execute before view updates are executed and after view updates are executed. The current methods that are exposed do not work for this case. `willDispatchViewUpdates` is called from JS thread, and there doesn't seem to be a way to add UI blocks that will be executed at the right time like we do in paper. `didDispatchMountItems` is called for every frame which we don't want and will cause lots of overhead. After that we simply need to call the right methods in the new renderer listener methods. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID] [ADDED] - Add fabric support for maintainVisibleContentPosition on Android For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> Pull Request resolved: #35994 Test Plan: Tested in RN tester maintainVisibleContentPosition example on Android with fabric enabled. Reviewed By: cipolleschi Differential Revision: D44131763 Pulled By: cortinico fbshipit-source-id: 32c0b5867d460537b18a70d472fd58052da6cf80
jeongshin
pushed a commit
to jeongshin/react-native
that referenced
this pull request
May 7, 2023
…ebook#35994) Summary: Implement a few missing bits for `maintainVisibleContentPosition` to work with fabric. The main thing needed is to add 2 fabric renderer listener methods to allow to hook into specific parts of the rendering process. We need some code to execute before view updates are executed and after view updates are executed. The current methods that are exposed do not work for this case. `willDispatchViewUpdates` is called from JS thread, and there doesn't seem to be a way to add UI blocks that will be executed at the right time like we do in paper. `didDispatchMountItems` is called for every frame which we don't want and will cause lots of overhead. After that we simply need to call the right methods in the new renderer listener methods. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID] [ADDED] - Add fabric support for maintainVisibleContentPosition on Android For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> Pull Request resolved: facebook#35994 Test Plan: Tested in RN tester maintainVisibleContentPosition example on Android with fabric enabled. Reviewed By: cipolleschi Differential Revision: D44131763 Pulled By: cortinico fbshipit-source-id: 32c0b5867d460537b18a70d472fd58052da6cf80
OlimpiaZurek
pushed a commit
to OlimpiaZurek/react-native
that referenced
this pull request
May 22, 2023
…ebook#35994) Summary: Implement a few missing bits for `maintainVisibleContentPosition` to work with fabric. The main thing needed is to add 2 fabric renderer listener methods to allow to hook into specific parts of the rendering process. We need some code to execute before view updates are executed and after view updates are executed. The current methods that are exposed do not work for this case. `willDispatchViewUpdates` is called from JS thread, and there doesn't seem to be a way to add UI blocks that will be executed at the right time like we do in paper. `didDispatchMountItems` is called for every frame which we don't want and will cause lots of overhead. After that we simply need to call the right methods in the new renderer listener methods. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID] [ADDED] - Add fabric support for maintainVisibleContentPosition on Android For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> Pull Request resolved: facebook#35994 Test Plan: Tested in RN tester maintainVisibleContentPosition example on Android with fabric enabled. Reviewed By: cipolleschi Differential Revision: D44131763 Pulled By: cortinico fbshipit-source-id: 32c0b5867d460537b18a70d472fd58052da6cf80
This was referenced Aug 10, 2023
This was referenced Jan 4, 2024
This was referenced Feb 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Contributor
A React Native contributor.
Merged
This PR has been merged.
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
Implement a few missing bits for
maintainVisibleContentPosition
to work with fabric. The main thing needed is to add 2 fabric renderer listener methods to allow to hook into specific parts of the rendering process. We need some code to execute before view updates are executed and after view updates are executed. The current methods that are exposed do not work for this case.willDispatchViewUpdates
is called from JS thread, and there doesn't seem to be a way to add UI blocks that will be executed at the right time like we do in paper.didDispatchMountItems
is called for every frame which we don't want and will cause lots of overhead.After that we simply need to call the right methods in the new renderer listener methods.
Changelog
Test Plan
Tested in RN tester maintainVisibleContentPosition example on Android with fabric enabled.